SlideShare a Scribd company logo
Apache Maven
Endrigo Antonini
segunda-feira, 22 de julho de 13
Apache Maven
From the reason to the implementation
Endrigo Antonini
segunda-feira, 22 de julho de 13
Endrigo Antonini
segunda-feira, 22 de julho de 13
Agenda
What is Maven?
Why use Maven?
How POM works?
What is a Repository?
Why using a Local Cache sever?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is ...
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Was originally designed to simplify the build
processes in the Jakarta Turbine project;
Create a standard way to build the project
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Allow a developer to comprehend the
complete state of the development;
The main goal!!
Endrigo Antonini
segunda-feira, 22 de julho de 13
The main goal!!
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Build process easy:
Make the build process transparent to
the developer;
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Build process easy:
Make the build process transparent to
the developer;
You still need to know what’s happening
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Uniform build system
Just learn once how the build process
works;
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Uniform build system
Just learn once how the build process
works;
Using the POM (Project Object Model) - we will
talk about this later!
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Provide quality project information
Dependency list;
Unit test, coverage;
Developer list...
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Best practices development
Separate test code of the main code;
Test cases do not affect the main
distribution
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Best practices development
Separate test code of the main code;
Test cases do not affect the main
distribution
Maven also suggests a project structure to easily
work with the projects
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is Maven?
Migration to new features
Easy way to update the maven, plugin,
dependency.
Endrigo Antonini
segunda-feira, 22 de julho de 13
Why use Maven?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Why use Maven?
Well adopted by Java developers;
Make easy to start a project;
Don’t need to download the same lib over and
over again!
Different developers,
same config!
Endrigo Antonini
segunda-feira, 22 de julho de 13
How POM works?
Endrigo Antonini
segunda-feira, 22 de julho de 13
How POM works?
POM -> Project Object Model
XML based
Single file configuration
Structural configuration
Endrigo Antonini
segunda-feira, 22 de julho de 13
How POM works?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Divided in sections:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eidoscode.utils</groupId>
<artifactId>generics-utils</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Generics Utils</name>
<description>...</description>
<url>http://www.eidoscode.com/</url>
<inceptionYear>2012</inceptionYear>
<dependencies> ... </dependencies>
<developers> ... </developers>
<build> ... </build>
<reporting> ... </reporting>
</project>
How POM works?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Divided in sections:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eidoscode.utils</groupId>
<artifactId>generics-utils</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Generics Utils</name>
<description>...</description>
<url>http://www.eidoscode.com/</url>
<inceptionYear>2012</inceptionYear>
<dependencies> ... </dependencies>
<developers> ... </developers>
<build> ... </build>
<reporting> ... </reporting>
</project>
How POM works?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Divided in sections:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eidoscode.utils</groupId>
<artifactId>generics-utils</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Generics Utils</name>
<description>...</description>
<url>http://www.eidoscode.com/</url>
<inceptionYear>2012</inceptionYear>
<dependencies> ... </dependencies>
<developers> ... </developers>
<build> ... </build>
<reporting> ... </reporting>
</project>
How POM works?
Project
Information
Endrigo Antonini
segunda-feira, 22 de julho de 13
Divided in sections:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eidoscode.utils</groupId>
<artifactId>generics-utils</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Generics Utils</name>
<description>...</description>
<url>http://www.eidoscode.com/</url>
<inceptionYear>2012</inceptionYear>
<dependencies> ... </dependencies>
<developers> ... </developers>
<build> ... </build>
<reporting> ... </reporting>
</project>
How POM works?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Divided in sections:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/
maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.eidoscode.utils</groupId>
<artifactId>generics-utils</artifactId>
<version>1.1.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Generics Utils</name>
<description>...</description>
<url>http://www.eidoscode.com/</url>
<inceptionYear>2012</inceptionYear>
<dependencies> ... </dependencies>
<developers> ... </developers>
<build> ... </build>
<reporting> ... </reporting>
</project>
How POM works?
Main group
Information
Endrigo Antonini
segunda-feira, 22 de julho de 13
Dependency?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated the full name of a
dependency, version, and scope
Dependency?
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated the full name of a
dependency, version, and scope
Dependency?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated the full name of a
dependency, version, and scope
Dependency?
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
The scope can be devided in:
• compile (default)
• provided
• runtime
• test
• system
• import
Endrigo Antonini
segunda-feira, 22 de julho de 13
Developers?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated the team of the project
Developers?
<developers>
<developerser>
<id>eantonini</id>
<name>Endrigo Antonini</name>
<url>http://www.eidoscode.com/</url>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
Endrigo Antonini
segunda-feira, 22 de julho de 13
Builds?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated plugins configurations about
the build process
Builds?
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Endrigo Antonini
segunda-feira, 22 de julho de 13
Reporting?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Used to indicated plugins configurations about
the generated reports
Reporting?
<reporting><plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-changes-plugin</artifactId>
<version>2.8</version>
<reportSets><reportSet>
<reports>
<report>github-report</report>
</reports>
</reportSet></reportSets>
</plugin>
</plugins></reporting>
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is a repository?
Endrigo Antonini
segunda-feira, 22 de julho de 13
What is a repository?
Stores libraries and it’s different versions;
There are several repositories throught the
web;
Anyone can create a repository of his own libs;
Easy to download libs;
Easy to distribute libs;
Endrigo Antonini
segunda-feira, 22 de julho de 13
Why using a Local
Cache Server?
Endrigo Antonini
segunda-feira, 22 de julho de 13
Why using a Local
Cache Server?
Reduces the internet conectivity;
Guarantee that all developers use the same lib;
First download is slow (through the internet)
other downloads are faster (local network);
Easy to distribute private libs;
Endrigo Antonini
segunda-feira, 22 de julho de 13
Reference:
Endrigo Antonini
segunda-feira, 22 de julho de 13
Reference:
http://maven.apache.org/
Endrigo Antonini
segunda-feira, 22 de julho de 13
Endrigo Antonini
http://www.linkedin.com/in/endrigoantonini/
http://www.github.com/eidoscode/
http://www.github.com/antonini/
segunda-feira, 22 de julho de 13

More Related Content

PPT
Presentation3
PDF
Automated prometheus benchmarking pushing it to its limits until it breaks
PDF
Precambrico
PPTX
Planet Ganges videos
PDF
Android Survival Guide - Two years of software development
PDF
Maker weedend 10th drone 101 - presented by dony
PDF
NUIとKinect
PDF
Documenting First
Presentation3
Automated prometheus benchmarking pushing it to its limits until it breaks
Precambrico
Planet Ganges videos
Android Survival Guide - Two years of software development
Maker weedend 10th drone 101 - presented by dony
NUIとKinect
Documenting First

Viewers also liked (20)

PPTX
High Performance Continuous Delivery - Versioning and Release Management Aligned
PPTX
Versioning schemes and branching models for Continuous Delivery - Continuous ...
PPT
Introduction to Apache Maven
ODP
Maven university-course
KEY
Next Generation Development Infrastructure with the Maven Enterprise Stack
PPTX
Maven
PPTX
DevOps Summit 2016 - Release Management em Ambientes Híbridos
PDF
(E)Git + Tycho + Gerrit + Mylyn = #WIN @ Eclipse Day Toulouse 2012
PDF
Scalable Semantic Version Control for Linked Data Management (presented at 2n...
PPTX
Semantic Versioning
PPT
Effective ALM
PDF
Lifecyce Analytics TFS BI webinar
PPTX
Franklyn Korea Power Point
PDF
Semantic Versioning
PDF
HR Search - 輕鬆管理面試者
PPTX
[DevOps Carioca] Continuous Delivery
PPTX
SemVer, the whole story
PPT
Alm tce parallel development
PDF
XebiCon'16 : Wescale - GoCD démystifié Aurélien Maury, Directeur Technique et...
PDF
WasteManagement
High Performance Continuous Delivery - Versioning and Release Management Aligned
Versioning schemes and branching models for Continuous Delivery - Continuous ...
Introduction to Apache Maven
Maven university-course
Next Generation Development Infrastructure with the Maven Enterprise Stack
Maven
DevOps Summit 2016 - Release Management em Ambientes Híbridos
(E)Git + Tycho + Gerrit + Mylyn = #WIN @ Eclipse Day Toulouse 2012
Scalable Semantic Version Control for Linked Data Management (presented at 2n...
Semantic Versioning
Effective ALM
Lifecyce Analytics TFS BI webinar
Franklyn Korea Power Point
Semantic Versioning
HR Search - 輕鬆管理面試者
[DevOps Carioca] Continuous Delivery
SemVer, the whole story
Alm tce parallel development
XebiCon'16 : Wescale - GoCD démystifié Aurélien Maury, Directeur Technique et...
WasteManagement
Ad

Similar to Apache Maven - From the reason to the implementation (20)

PPTX
Instrumentation 101
PDF
Enterprise Maven Repository BOF
PPTX
Django simplified : by weever mbakaya
ODP
JMockit
PDF
Implementing Quality on Java projects
PPTX
Continuous Integration of Mobile Apps with Docker and Appium
PDF
Lightweight javaEE with Guice
PDF
Arduino simulation procedure
PPT
Net Beans Jasig Jun2006
PDF
API Doc Smackdown
PDF
Opencast Architecture
PPTX
Lecture #3 activities and intents
PDF
GWTcon 2015 - Beyond GWT 3.0 Panic
PDF
Developing modern java web applications with java ee 7 and angular js
PDF
Adopt OpenJDK presentation (slide deck)
PDF
Develop Android/iOS app using golang
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
PPTX
Introduction to Protractor - Habilelabs
PDF
Boquet manager
PDF
SEO methods in Single Page Applications
Instrumentation 101
Enterprise Maven Repository BOF
Django simplified : by weever mbakaya
JMockit
Implementing Quality on Java projects
Continuous Integration of Mobile Apps with Docker and Appium
Lightweight javaEE with Guice
Arduino simulation procedure
Net Beans Jasig Jun2006
API Doc Smackdown
Opencast Architecture
Lecture #3 activities and intents
GWTcon 2015 - Beyond GWT 3.0 Panic
Developing modern java web applications with java ee 7 and angular js
Adopt OpenJDK presentation (slide deck)
Develop Android/iOS app using golang
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Introduction to Protractor - Habilelabs
Boquet manager
SEO methods in Single Page Applications
Ad

Recently uploaded (20)

PDF
project resource management chapter-09.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Hybrid model detection and classification of lung cancer
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Chapter 5: Probability Theory and Statistics
project resource management chapter-09.pdf
Encapsulation theory and applications.pdf
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Unlocking AI with Model Context Protocol (MCP)
Heart disease approach using modified random forest and particle swarm optimi...
Assigned Numbers - 2025 - Bluetooth® Document
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Programs and apps: productivity, graphics, security and other tools
Building Integrated photovoltaic BIPV_UPV.pdf
Group 1 Presentation -Planning and Decision Making .pptx
WOOl fibre morphology and structure.pdf for textiles
Hybrid model detection and classification of lung cancer
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
SOPHOS-XG Firewall Administrator PPT.pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
DP Operators-handbook-extract for the Mautical Institute
1 - Historical Antecedents, Social Consideration.pdf
Chapter 5: Probability Theory and Statistics

Apache Maven - From the reason to the implementation

  • 2. Apache Maven From the reason to the implementation Endrigo Antonini segunda-feira, 22 de julho de 13
  • 4. Agenda What is Maven? Why use Maven? How POM works? What is a Repository? Why using a Local Cache sever? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 5. What is ... Endrigo Antonini segunda-feira, 22 de julho de 13
  • 6. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 7. What is Maven? Was originally designed to simplify the build processes in the Jakarta Turbine project; Create a standard way to build the project Endrigo Antonini segunda-feira, 22 de julho de 13
  • 8. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 9. What is Maven? Allow a developer to comprehend the complete state of the development; The main goal!! Endrigo Antonini segunda-feira, 22 de julho de 13
  • 10. The main goal!! What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 11. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 12. What is Maven? Build process easy: Make the build process transparent to the developer; Endrigo Antonini segunda-feira, 22 de julho de 13
  • 13. What is Maven? Build process easy: Make the build process transparent to the developer; You still need to know what’s happening Endrigo Antonini segunda-feira, 22 de julho de 13
  • 14. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 15. What is Maven? Uniform build system Just learn once how the build process works; Endrigo Antonini segunda-feira, 22 de julho de 13
  • 16. What is Maven? Uniform build system Just learn once how the build process works; Using the POM (Project Object Model) - we will talk about this later! Endrigo Antonini segunda-feira, 22 de julho de 13
  • 17. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 18. What is Maven? Provide quality project information Dependency list; Unit test, coverage; Developer list... Endrigo Antonini segunda-feira, 22 de julho de 13
  • 19. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 20. What is Maven? Best practices development Separate test code of the main code; Test cases do not affect the main distribution Endrigo Antonini segunda-feira, 22 de julho de 13
  • 21. What is Maven? Best practices development Separate test code of the main code; Test cases do not affect the main distribution Maven also suggests a project structure to easily work with the projects Endrigo Antonini segunda-feira, 22 de julho de 13
  • 22. What is Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 23. What is Maven? Migration to new features Easy way to update the maven, plugin, dependency. Endrigo Antonini segunda-feira, 22 de julho de 13
  • 24. Why use Maven? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 25. Why use Maven? Well adopted by Java developers; Make easy to start a project; Don’t need to download the same lib over and over again! Different developers, same config! Endrigo Antonini segunda-feira, 22 de julho de 13
  • 26. How POM works? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 27. How POM works? POM -> Project Object Model XML based Single file configuration Structural configuration Endrigo Antonini segunda-feira, 22 de julho de 13
  • 28. How POM works? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 29. Divided in sections: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.eidoscode.utils</groupId> <artifactId>generics-utils</artifactId> <version>1.1.3-SNAPSHOT</version> <packaging>jar</packaging> <name>Generics Utils</name> <description>...</description> <url>http://www.eidoscode.com/</url> <inceptionYear>2012</inceptionYear> <dependencies> ... </dependencies> <developers> ... </developers> <build> ... </build> <reporting> ... </reporting> </project> How POM works? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 30. Divided in sections: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.eidoscode.utils</groupId> <artifactId>generics-utils</artifactId> <version>1.1.3-SNAPSHOT</version> <packaging>jar</packaging> <name>Generics Utils</name> <description>...</description> <url>http://www.eidoscode.com/</url> <inceptionYear>2012</inceptionYear> <dependencies> ... </dependencies> <developers> ... </developers> <build> ... </build> <reporting> ... </reporting> </project> How POM works? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 31. Divided in sections: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.eidoscode.utils</groupId> <artifactId>generics-utils</artifactId> <version>1.1.3-SNAPSHOT</version> <packaging>jar</packaging> <name>Generics Utils</name> <description>...</description> <url>http://www.eidoscode.com/</url> <inceptionYear>2012</inceptionYear> <dependencies> ... </dependencies> <developers> ... </developers> <build> ... </build> <reporting> ... </reporting> </project> How POM works? Project Information Endrigo Antonini segunda-feira, 22 de julho de 13
  • 32. Divided in sections: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.eidoscode.utils</groupId> <artifactId>generics-utils</artifactId> <version>1.1.3-SNAPSHOT</version> <packaging>jar</packaging> <name>Generics Utils</name> <description>...</description> <url>http://www.eidoscode.com/</url> <inceptionYear>2012</inceptionYear> <dependencies> ... </dependencies> <developers> ... </developers> <build> ... </build> <reporting> ... </reporting> </project> How POM works? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 33. Divided in sections: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/ maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.eidoscode.utils</groupId> <artifactId>generics-utils</artifactId> <version>1.1.3-SNAPSHOT</version> <packaging>jar</packaging> <name>Generics Utils</name> <description>...</description> <url>http://www.eidoscode.com/</url> <inceptionYear>2012</inceptionYear> <dependencies> ... </dependencies> <developers> ... </developers> <build> ... </build> <reporting> ... </reporting> </project> How POM works? Main group Information Endrigo Antonini segunda-feira, 22 de julho de 13
  • 35. Used to indicated the full name of a dependency, version, and scope Dependency? <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> </dependencies> Endrigo Antonini segunda-feira, 22 de julho de 13
  • 36. Used to indicated the full name of a dependency, version, and scope Dependency? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 37. Used to indicated the full name of a dependency, version, and scope Dependency? <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> </dependency> </dependencies> The scope can be devided in: • compile (default) • provided • runtime • test • system • import Endrigo Antonini segunda-feira, 22 de julho de 13
  • 39. Used to indicated the team of the project Developers? <developers> <developerser> <id>eantonini</id> <name>Endrigo Antonini</name> <url>http://www.eidoscode.com/</url> <roles> <role>Developer</role> </roles> </developer> </developers> Endrigo Antonini segunda-feira, 22 de julho de 13
  • 41. Used to indicated plugins configurations about the build process Builds? <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> Endrigo Antonini segunda-feira, 22 de julho de 13
  • 43. Used to indicated plugins configurations about the generated reports Reporting? <reporting><plugins> <plugin> <artifactId>maven-javadoc-plugin</artifactId> <version>2.9</version> </plugin> <plugin> <artifactId>maven-changes-plugin</artifactId> <version>2.8</version> <reportSets><reportSet> <reports> <report>github-report</report> </reports> </reportSet></reportSets> </plugin> </plugins></reporting> Endrigo Antonini segunda-feira, 22 de julho de 13
  • 44. What is a repository? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 45. What is a repository? Stores libraries and it’s different versions; There are several repositories throught the web; Anyone can create a repository of his own libs; Easy to download libs; Easy to distribute libs; Endrigo Antonini segunda-feira, 22 de julho de 13
  • 46. Why using a Local Cache Server? Endrigo Antonini segunda-feira, 22 de julho de 13
  • 47. Why using a Local Cache Server? Reduces the internet conectivity; Guarantee that all developers use the same lib; First download is slow (through the internet) other downloads are faster (local network); Easy to distribute private libs; Endrigo Antonini segunda-feira, 22 de julho de 13