5. Maven and You
❖Who will enjoy this talk?
❖Current Maven user
❖Familiar with POM syntax
❖Interested in preparing for Maven 3.0
❖Comfortable with betas
6. Maven and Me
❖ Tenure
❖ Using it for 8 years since 0.7
❖ Contributing to the codebase via patches
❖ Authoring archetypes
❖ 30 open source how-to projects
7. Maven and Me
❖ Tenure
❖ Using it for 8 years since 0.7
❖ Contributing to the codebase via patches
❖ Authoring archetypes
❖ 30 open source how-to projects
❖ Mentoring
❖ 3 virtual Sonatype classes a month
❖ Several on-site classes around the globe per year
❖ 30+ global conference and user group talks to date
❖ 50+ enterprise Maven-consulting clients
8. Maven and Me
❖ Tenure
❖ Using it for 8 years since 0.7
❖ Contributing to the codebase via patches
❖ Authoring archetypes
❖ 30 open source how-to projects
❖ Mentoring
❖ 3 virtual Sonatype classes a month
❖ Several on-site classes around the globe per year
❖ 30+ global conference and user group talks to date
❖ 50+ enterprise Maven-consulting clients
❖ Writing
❖ O’Reilly: Maven The Definitive Guide by Tim O’Brien
❖ Promotional materials, testimonial on the back cover
❖ DZone Maven RefCard
❖ 8th most-downloaded card of all time
29. POM XML Syntax
❖ No POM syntax changes for Maven 3.0
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ambientideas</groupId>
<artifactId>sample-barestbones</artifactId>
<version>1.0-SNAPSHOT</version>
</project>
30. POM XML Validations
❖ Heavily validated against common mistakes
❖ Forward-test with Maven 3.0
❖Switch back to 2.x for production
❖ 3.0 POMs run better on 2.x
40. Parent POM References
❖ Parent POMs now prefer to resolve from
repositories
❖Better consistency on multi-module builds
❖ Version-less parent references may be
allowed (not ready yet)
❖Will require <relativePath> tag
❖MNG-624
60. Core Changes: Plugins
❖Plugin version auto-selection favors
RELEASEs over SNAPSHOTs
❖Affects command-line invocation of plugins
61. #Maven 2.x
#Will run the newest SNAPSHOT, if one is cached locally
mvn archetype:generate
#...actually running
mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-SNAPSHOT:generate
#Maven 3.x
#Will always run the newest RELEASE in Maven 3.x
mvn archetype:generate
#...actually running
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0:generate
Command Line
62. Core Changes: Plugins
❖Plugins versions cannot be specified as
RELEASE or LATEST
❖Affects pom.xml configuration and command
line fully-qualified invocation