SlideShare une entreprise Scribd logo
1  sur  165
Télécharger pour lire hors ligne
Mastering
          Maven
  ncrease your Mo Jo-tivity
I


                    by Matthew McCullough of Ambient Ideas, LLC
Matthew
http://refcardz.dzone.com/refcardz/apache-maven-2
Maven use ing
     up
on the   sw
Convention
    v e r
   o Configuration
Default
   Goal
Default Goal

‣   Often not set.
‣   Saves typing.
‣   Communicates author’s intended goal.
‣   Only one goal or phase allowed.
mvn install
<project>
  <groupId>com.ambientideas</groupId>
  <artifactId>sample-defaultgoal</artifactId>
  [...]

  <build>
    <defaultGoal>install</defaultGoal>
  </build>

  [...]
</project>
mvn install
mvn install
mvn
Super
   Pom
Super Pom
‣ Pseudo-invisible.
Super Pom
‣ Pseudo-invisible.
‣ All projects inherit it.
Super Pom
‣ Pseudo-invisible.
‣ All projects inherit it.
‣ Specifies file location defaults.
Super Pom
‣   Pseudo-invisible.
‣   All projects inherit it.
‣   Specifies file location defaults.
‣   Locks version of common plugins.
    ‣ post mvn 2.0.8.
    ‣ Increases build stability.
<!-- START SNIPPET: superpom -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <name>Maven Default Project</name>

  <build>
    <directory>target</directory>
    <outputDirectory>target/classes</outputDirectory>
    <finalName>${project.artifactId}-${project.version}</finalName>
    [...]
    <pluginManagement>
       <plugins>
          <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.0.2</version>
         </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
Super Pom


‣ Familiarize yourself with it.
‣ View it in SVN.
Saving time with
Archetypes
Project via Archetype
‣ Project templates on steroids.
  ‣   Seed unit tests.
  ‣   Standardize directory structure.
  ‣   Corporate licenses, OSS licenses.
  ‣   Bundle corporate READMEs.
‣ Doesn’t mutate like a copy-n-paste template.
‣ Replaceables for classnames, company info.
$ mvn archetype:generate
Archetype via Project

‣ Uses existing project as seed.
‣ Turns it into a maven archetype.
‣ Can publish to a repo for others to use.
$ mvn archetype:create-from-project
Archetype via Archetype

‣ “Template for templates”
Archetype via Archetype

‣ “Template for templates”
‣ Can be selected from the archetype list.
Archetype via Archetype

‣ “Template for templates”
‣ Can be selected from the archetype list.
mvn archetype:generate
$ mvn archetype:generate
  -DarchetypeGroupId=quot;org.apache.maven.archetypesquot;
  -DarchetypeArtifactId=maven-archetype-archetype
  -DarchetypeVersion=1.0
  -DgroupId=com.ambientideas
  -DartifactId=mysamplearchetype
Dependency
  Management
Dirty Tree
                                     A:A:1.0




                           B:B:1.0               C:C:1.0




             JU:JU:3.8.1               B:B:2.0             JU:JU:3.8.2




                                     JU:JU:3.8.2
How does Maven resolve versions?
Nearest
Dirty Tree
                                     A:A:1.0




                           B:B:1.0               C:C:1.0




             JU:JU:3.8.1               B:B:2.0             JU:JU:3.8.2




                                     JU:JU:3.8.2
Dirty Tree
                                     A:A:1.0




                           B:B:1.0               C:C:1.0




             JU:JU:3.8.1               B:B:2.0             JU:JU:3.8.2




                                     JU:JU:3.8.2
Then highest version?
Then highest version?
Then sequential first at same distance
Dirty Tree
                                     A:A:1.0




                           B:B:1.0               C:C:1.0




             JU:JU:3.8.1               B:B:2.0             JU:JU:3.8.2




                                     JU:JU:3.8.2
Dirty Tree
                                     A:A:1.0




                           B:B:1.0               C:C:1.0




             JU:JU:3.8.1               B:B:2.0             JU:JU:3.8.2




                                     JU:JU:3.8.2
First sequential at same level ➲




                                   [INFO]   [dependency:tree]
                                   [INFO]   root.project:ear:ear:1.0
                                   [INFO]   +- root.project:ejbs:ejb:1.0:compile
                                   [INFO]   | - junit:junit:jar:4.0:compile
                                   [INFO]   +- root.project.servlets:servlet:war:1.0:compile
                                   [INFO]   +- root.project:primary-source:jar:1.0:compile
                                   [INFO]   - root.project.projects:logging:jar:1.0:compile
First sequential at same level ➲



                                                                    4.0 is resolved
                                   [INFO]   [dependency:tree]
                                   [INFO]   root.project:ear:ear:1.0
                                   [INFO]   +- root.project:ejbs:ejb:1.0:compile
                                   [INFO]   | - junit:junit:jar:4.0:compile
                                   [INFO]   +- root.project.servlets:servlet:war:1.0:compile
                                   [INFO]   +- root.project:primary-source:jar:1.0:compile
                                   [INFO]   - root.project.projects:logging:jar:1.0:compile
First sequential at same level ➲



                                                                    4.0 is resolved
                                   [INFO]   [dependency:tree]
                                   [INFO]   root.project:ear:ear:1.0
                                   [INFO]   +- root.project:ejbs:ejb:1.0:compile
                                   [INFO]   | - junit:junit:jar:4.0:compile
                                   [INFO]   +- root.project.servlets:servlet:war:1.0:compile
                                   [INFO]   +- root.project:primary-source:jar:1.0:compile
                                   [INFO]   - root.project.projects:logging:jar:1.0:compile




                                                      Even though I have 4.4 declared as
                                                       a dependency of primary-source
Resolving Tree
                                         A:A:1.0




                               B:B:1.0               C:C:1.0




                 JU:JU:3.8.2               B:B:2.0             JU:JU:3.8.1




                                         JU:JU:3.8.2
Resolving Tree
                                         A:A:1.0




                               B:B:1.0               C:C:1.0




                 JU:JU:3.8.2               B:B:2.0             JU:JU:3.8.1
Resolving Tree
                                         A:A:1.0




                               B:B:1.0               C:C:1.0




                 JU:JU:3.8.2               B:B:2.0
Resolved Tree
                                        A:A:1.0




                              B:B:1.0             C:C:1.0




                JU:JU:3.8.2
We’ve resolved the version tree.
How about the dependency graph?
Dirty Graph
                                      A:A:1.0




                            B:B:1.0               C:C:1.0




              JU:JU:3.8.2               B:B:2.0             JU:JU:3.8.1




                                      JU:JU:3.8.2
Resolved Graph
                            A:A:1.0




                 B:B:1.0                 C:C:1.0




                           JU:JU:3.8.2
A dice roll
for complex graphs?
Declare desired versions
Advertise authorized versions
<*Management>

‣ <dependencyManagement>
 ‣ Inheritance for dependency versions.
<*Management>

‣ <dependencyManagement>
 ‣ Inheritance for dependency versions.
‣ <pluginManagement>
 ‣ Inheritance for plugin versions and config.
<dependencyManagement> and <pluginManagement>
   are essentially identical
Minimizing declarations
        with
   <*Management>
In the base pom.xml...
<pluginManagement>
 <plugins>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-antrun-plugin</artifactId>
     <version>1.1</version>
     <executions>
       <execution>
         <id>echodir</id>
         <goals>
            <goal>run</goal>
         </goals>
         <phase>install</phase>
         <configuration>
            <tasks>
              <echo>Build Dir: ${project.build.directory}</echo>
            </tasks>
         </configuration>
       </execution>
     </executions>
   </plugin>
 </plugins>
</pluginManagement>
<pluginManagement>
 <plugins>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-antrun-plugin</artifactId>
     <version>1.1</version>
     <executions>
       <execution>
         <id>echodir</id>
         <goals>
            <goal>run</goal>
         </goals>
         <phase>install</phase>
         <configuration>
            <tasks>
              <echo>Build Dir: ${project.build.directory}</echo>
            </tasks>
         </configuration>
       </execution>
     </executions>
   </plugin>
 </plugins>
</pluginManagement>
<pluginManagement>
 <plugins>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-antrun-plugin</artifactId>
     <version>1.1</version>
     <executions>
       <execution>
         <id>echodir</id>
         <goals>
            <goal>run</goal>
         </goals>
         <phase>install</phase>
         <configuration>
            <tasks>
              <echo>Build Dir: ${project.build.directory}</echo>
            </tasks>
         </configuration>
       </execution>
     </executions>
   </plugin>
 </plugins>
</pluginManagement>
<pluginManagement>
 <plugins>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-antrun-plugin</artifactId>
     <version>1.1</version>
     <executions>
       <execution>
         <id>echodir</id>
         <goals>
            <goal>run</goal>
         </goals>
         <phase>install</phase>
         <configuration>
            <tasks>
              <echo>Build Dir: ${project.build.directory}</echo>
            </tasks>
         </configuration>
       </execution>
     </executions>
   </plugin>
 </plugins>
</pluginManagement>
In the child pom.xml...
<plugins>
  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
  </plugin>
</plugins>
Dependency Lists
‣ List view
  ‣ mvn dependency:resolve
‣ Tree view
  ‣ mvn dependency:tree
‣ Plugin list view
  ‣ mvn dependency:resolve-plugins
$ mvn dependency:tree
[INFO] com.ambientideas:sample13-wicket:war:1.0-SNAPSHOT
[INFO] +- org.apache.wicket:wicket:jar:1.3.2:compile
[INFO] | - org.slf4j:slf4j-api:jar:1.4.2:compile
[INFO] +- org.apache.wicket:wicket-extensions:jar:1.3.2:compile
[INFO] +- commons-collections:commons-collections:jar:3.1:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:compile
[INFO] +- log4j:log4j:jar:1.2.14:compile
[INFO] +- junit:junit:jar:3.8.2:test
[INFO] +- org.mortbay.jetty:jetty:jar:6.1.4:provided
[INFO] | - org.mortbay.jetty:servlet-api-2.5:jar:6.1.4:provided
[INFO] +- org.mortbay.jetty:jetty-util:jar:6.1.4:provided
[INFO] - org.mortbay.jetty:jetty-management:jar:6.1.4:provided
[INFO] +- mx4j:mx4j:jar:3.0.1:provided
[INFO] - mx4j:mx4j-tools:jar:3.0.1:provided
Dependency Analysis


‣ Analyze to help prune unneeded.
 ‣ mvn dependency:analyze
Dependency Analysis


‣ See if overrides are colliding.
  ‣ mvn dependency:analyze-dep-mgt
$ mvn dependency:analyze

[WARNING] Unused declared dependencies found:
[WARNING] org.slf4j:slf4j-log4j12:jar:1.4.2:compile
[WARNING] log4j:log4j:jar:1.2.14:compile
[WARNING] org.mortbay.jetty:jetty-management:jar:6.1.4:provided
[WARNING] org.apache.wicket:wicket-extensions:jar:1.3.2:compile
[WARNING] commons-collections:commons-collections:jar:3.1:compile
DeBugging
Maven Debug Flags

‣ Output full error stacktraces.
  ‣ mvn <anygoal> -e
‣ Output debug level operational info.
  ‣ mvn <anygoal> -X
  ‣ Always use when submitting questions or bug
    reports.
$ mvn <anygoal> -X

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-
dependency-plugin:2.0:analyze' -->
[DEBUG] (f) baseDir = /Users/mccm06/Documents/Teach/
Courses/Mastering-Maven-1Hour/examples/maven-training.git/
sample13-wicket-withdependencies
[DEBUG] (f) failOnWarning = false
[DEBUG] (f) project = MavenProject:
com.ambientideas:sample13-wicket-withunneededdependencies:
1.0-SNAPSHOT @ /Users/mccm06/Documents/Teach/Courses/
Mastering-Maven-1Hour/examples/maven-training.git/sample13-
wicket-withunneededdependencies/pom.xml
[DEBUG] (f) scriptableFlag = $$%%%
[DEBUG] (f) scriptableOutput = false
[DEBUG] (f) verbose = false
Debug Maven

‣ Waits on socket for debugger to connect.
  ‣ mvnDebug <anygoal>
‣ Useful for debugging plugins.

‣ Can be used for unit test debugging.
  ‣ mvnDebug test -DforkMode=none
Debug Unit Tests

‣ Waits on socket for debugger to connect.

 mvn test -Dmaven.surefire.debug
Groovy
 Support
Groovy Support
‣ Groovy application code compilation.
  ‣ mvn archetype:generate
    ...gmaven-archetype-basic

‣ Groovy maven plugin authoring.
  ‣ mvn archetype:generate
    ...gmaven-archetype-mojo

‣ Joint compiler in both cases.

                    +
Grails Support
 ‣ Grails now fully supports Maven...
   ‣ Archetype
   ‣ Grails goals: create-controller, run-app, etc.
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-
alpha-4:generate
 -DarchetypeGroupId=org.grails 
 -DarchetypeArtifactId=grails-maven-archetype 
 -DarchetypeVersion=1.0-SNAPSHOT 
 -DarchetypeRepository=http://snapshots.repository.codehaus.org 
 -DgroupId=com.ambientideas -DartifactId=sample-grails



                               +
command line
      Help !
Maven Help Plugin

mvn help:describe -Dplugin=<anygoal>

‣ Lists and describes plugin goals.
Maven Help Plugin

mvn help:system

‣ Outputs environment variables and
  system properties.
Maven Help Plugin

mvn help:active-profiles

‣ See what profiles are being
  triggered by environment, files,
  params.
Maven Help Plugin

mvn help:effective-pom

‣ Outputs the resultant pom.
‣ Includes inherited sections.
M2Eclipse
m2eclipse Plugin
‣ Advanced Eclipse GUI for Maven
  ‣ Update site:
    http://m2eclipse.sonatype.org/update-dev/
‣ Eclipse 3.2-3.4 compatibility
  ‣ 3.5 support arrived May 09
‣ Features include:
  ‣   Exclusion/Inclusion via clicks
  ‣   Searching for artifacts
  ‣   Dependency diagrams
  ‣   Click-to-run Maven goals

                               +
mvn eclipse:eclipse
    File > Import > Existing
➊   Projects into Workspace
    Set up Eclipse Classpath
    Variable M2_REPO
mvn eclipse:eclipse
    File > Import > Existing
➊   Projects into Workspace
    Set up Eclipse Classpath
    Variable M2_REPO
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO


    mvn eclipse:m2eclipse

➋   File > Import > Existing
    Projects into Workspace
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO


    mvn eclipse:m2eclipse

➋   File > Import > Existing
    Projects into Workspace
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO



                      sa   ry
                 es
  mvn eclipse:m2eclipse

➋ File > Importc> Existing
       nn   e Workspace
  U
  Projects into
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO



                      sa   ry
                 es
  mvn eclipse:m2eclipse

➋ File > Importc> Existing
       nn   e Workspace
  U
  Projects into




➌   File > Import > Maven
    Projects
mvn eclipse:eclipse

                    te d
    File > Import > Existing
                  a
➊             tdClasspath
    Projects into Workspace
           u
      O
    Set up Eclipse
    Variable M2_REPO



                      sa   ry
                 es
  mvn eclipse:m2eclipse

➋ File > Importc> Existing
       nn   e Workspace
  U
  Projects into




➌   File > Import > Maven
    Projects
Dependency Graph
Exclusions
Eclipse command line Compiler
<plugin>
     <artifactId>maven‐compiler‐plugin</artifactId>
     <configuration>
         <compilerId>eclipse</compilerId>
         <source>1.5</source>
         <target>1.6</target>
     </configuration>
     <dependencies>
        <dependency>
           <groupId>org.codehaus.plexus</groupId>
           <artifactId>plexus‐compiler‐eclipse</artifactId>
           <version>1.5.1</version>
        </dependency>
     </dependencies>
</plugin>
Source Code Control
      Integration
Maven SCM Support
‣ Seamlessly integrates Maven
  processes with your SCM repo.
 ‣ mvn scm:diff
  ‣ Creates UNIX diff file
 ‣ mvn scm:tag
 ‣ mvn scm:status
Maven SCM Support

‣ Dozens of SCM systems supported.
 ‣ CVS
 ‣ Subversion
 ‣ Git
http://docs.codehaus.org/display/SCM/SCM+Matrix
Maven SCM Support

mvn release:prepare

‣ Increments all pom.xml version tags.
Reactor
    Plugin
Reactor Plugin

Purposes
  ‣   Spawns a new nested Maven build.
  ‣   Restart where a long-running build failed.
  ‣   Selective build based on dependency.
  ‣   Selective build based on scm-noticed changes.
Reactor Plugin
 In Use
  ‣ Resume multi-module build starting with this
    module.


$ mvn reactor:resume -Dfrom=mymodule
Reactor Plugin
  In Use
    ‣ Build all modules that are dependents of mine.
       ‣ Essentially, selective children.
       ‣ I just made a change.
       ‣ Want to ensure I didn’t break anything below me.


$ mvn reactor:make-dependents -Dmake.folders=mid1
 or
$ mvn reactor:make-dependents -Dmake.projects=com.ambientideas:mid1
Reactor Plugin

  In Use
   ‣ Build all modules that this module depends on
      ‣ Essentially, selective parents.
      ‣ Teammate informed me.
      ‣ Wants to make sure I test his changes.

$ mvn reactor:make -Dmake.folders=mid1
 or
$ mvn reactor:make -Dmake.projects=com.ambientideas:mid1
Reactor Plugin

In Use
‣ Build all modules that scm says had changed.
  ‣ Essentially, build “dirty”.



  $ mvn reactor:make-scm-changes
Running
   Apps
Exec Plugin

‣ Run any Java main class or external tool.
Exec Plugin

‣ Run any Java main class or external tool.
‣ Builds classpath from pom dependencies.
Exec Plugin

‣ Run any Java main class or external tool.
‣ Builds classpath from pom dependencies.
‣ Primarily for testing.
$ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot;
$ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot;


 or
$ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot;


 or
$ mvn exec:exec -Dexec.executable=quot;winzip.exequot;
   -Dexec.args=quot;myfile.txtquot;
Ant
Integration
Ant Build Generation

Why?
‣ Dead simple.
‣ Great for backport/legacy situations.
$ cd mymavenproj
$ cd mymavenproj
$ mvn ant:ant
$ cd mymavenproj
                              it!
                    , th at’s
$ mvn ant:ant   Yes


$ ls
build.xml
maven-build.xml
maven-build.properties
AntRun Plugin

‣   Run any Ant task.
‣   Leverage legacy in-house plugins.
‣   Great way to copy arbitrary files.
‣   Useful for echoing status or properties.
<plugins>
  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
      <execution>
        <id>echodir</id>
        <goals>
          <goal>run</goal>
        </goals>
        <phase>package</phase>
        <configuration>
          <tasks>
             <echo>BuildDir: ${project.build.directory}</echo>
             <copy todir=quot;${myspecialfolder}quot;>
               <fileset dir=quot;${myfiles}quot;/>
             </copy>
           </tasks>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>
Sitesand
  Reports
Site Generation
‣ Professional project web site
Site Generation
‣ Professional project web site
‣ Templatizable
Site Generation
‣ Professional project web site
‣ Templatizable
‣ Contributors
Site Generation
‣   Professional project web site
‣   Templatizable
‣   Contributors
‣   Licenses
Site Generation
‣   Professional project web site
‣   Templatizable
‣   Contributors
‣   Licenses
‣   Hyperlinked source ref
Site Generation
‣   Professional project web site
‣   Templatizable
‣   Contributors
‣   Licenses
‣   Hyperlinked source ref
‣   Defect tracking
Site Generation
‣   Professional project web site
‣   Templatizable
‣   Contributors
‣   Licenses
‣   Hyperlinked source ref
‣   Defect tracking
‣   Dependencies
Site Generation
‣   Professional project web site
‣   Templatizable
‣   Contributors
‣   Licenses
‣   Hyperlinked source ref
‣   Defect tracking
‣   Dependencies
‣   Plugins
Project Info
Report Generation

‣   Unit test reports
‣   Test coverage reports
‣   Checkstyle and PMD
‣   Javadocs
‣   Tag list (TODO)
Report
What’s New?
Maven 2.0.10
‣ Stability.
‣ Unit and integration tests.
‣ End of the line for 2.0.X.
Maven 2.1
‣ Parallel downloads (Don Brown)
‣ Encrypted passwords
‣ Drop in replacement
What’s Next?
Maven 3.0
‣ Encrypted passwords (from 2.1)
‣ Mercury engine
  ‣ Parallel downloads (determinate)
  ‣ New resolver
‣ Tyco OSGi bundle builder
Build Nirvana
Twitter
 @matthewmccull             Matthew
Blog
 http://www.ambientideas.com/blog
         sidebar has all my social media links


Email
 matthewm@ambientideas.com
GitHub
 http://github.com/matthewmccullough
Resources
Maven Homepage
http://maven.apache.org/

Maven Sonatype eBook
http://www.sonatype.com/book/

Matthew’s Maven Bookmarks
http://delicious.com/matthew.mccullough/maven

GMaven Plugin
http://groovy.codehaus.org/GMaven
Resources
Maven Superpom
http://maven.apache.org/pom.html#The_Super_POM

Sonatype Central Repo
http://repository.sonatype.org/

Java.net Repo
http://download.java.net/maven/2/

Archetype Mini-Guide
http://maven.apache.org/guides/mini/guide-creating-archetypes.html
Resources
GMaven Plugin
http://groovy.codehaus.org/GMaven

Grails Maven Integration
http://www.grails.org/Maven+Integration

m2eclipse Plugin Homepage
http://m2eclipse.codehaus.org/

m2eclipse Eclipse Update Site
http://m2eclipse.sonatype.org/update-dev/

m2eclipse Documentation
http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+IDE
Resources
Archetype Guide
http://maven.apache.org/guides/mini/guide-creating-archetypes.html

Sonatype eBook Archetype Chapter
http://propellors.net/maven/book/archetypes.html
http://www.sonatype.com/books/maven-book/reference/archetypes.html

Archetype create-from-project Mojo
http://maven.apache.org/plugins/maven-archetype-plugin/create-from-project-
mojo.html

JavaWorld Reporting Article
http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html
Resources
Maven Dependency Plugin
http://maven.apache.org/plugins/maven-dependency-plugin/

Maven AntRun Plugin
http://maven.apache.org/plugins/maven-antrun-plugin/

Maven Exec Plugin
http://mojo.codehaus.org/exec-maven-plugin/usage.html

SuperPOM in SVN
http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.9/maven-project/
src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup
Image Credits

‣ http://flickr.com/photos/chanchan222/2883910690/
‣ http://flickr.com/photos/themarmot/3173506262/
‣ http://commons.wikimedia.org/wiki/File:Napoleon4.jpg

Contenu connexe

Tendances

Apache ant
Apache antApache ant
Apache antkoniik
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkBo-Yi Wu
 
Apache Ant
Apache AntApache Ant
Apache AntAli Bahu
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using PythonAyun Park
 
Repoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationRepoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationBertrand Delacretaz
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet
 
Puppet at Pinterest
Puppet at PinterestPuppet at Pinterest
Puppet at PinterestPuppet
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersChristine Cheung
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugDavid Golden
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 
Introduction to Griffon
Introduction to GriffonIntroduction to Griffon
Introduction to GriffonJames Williams
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternselliando dias
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)Olaf Alders
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterZendCon
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1Vishal Biyani
 

Tendances (20)

Apache Ant
Apache AntApache Ant
Apache Ant
 
Apache ant
Apache antApache ant
Apache ant
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
 
Apache Ant
Apache AntApache Ant
Apache Ant
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
dJango
dJangodJango
dJango
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using Python
 
Repoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationRepoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initialization
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
 
Puppet at Pinterest
Puppet at PinterestPuppet at Pinterest
Puppet at Pinterest
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django Developers
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flask
 
YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with Jitterbug
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Introduction to Griffon
Introduction to GriffonIntroduction to Griffon
Introduction to Griffon
 
Maven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patternsMaven 2.0 - Improve your build patterns
Maven 2.0 - Improve your build patterns
 
The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)The MetaCPAN VM for Dummies Part One (Installation)
The MetaCPAN VM for Dummies Part One (Installation)
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 

En vedette

An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenArnaud Héritier
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for DummiesTomer Gabel
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Tracy Kennedy
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentDan Stine
 
Maven 2 in the real world
Maven 2 in the real worldMaven 2 in the real world
Maven 2 in the real worldCarlo Bonamico
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)jsievers
 
Alpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenArnaud Héritier
 
Captain Agile and the Providers of Value
Captain Agile and the Providers of ValueCaptain Agile and the Providers of Value
Captain Agile and the Providers of ValueSchalk Cronjé
 

En vedette (20)

Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Continuous delivery-with-maven
Continuous delivery-with-mavenContinuous delivery-with-maven
Continuous delivery-with-maven
 
An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
Maven 3 / Tycho
Maven 3 / TychoMaven 3 / Tycho
Maven 3 / Tycho
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)Continuous Delivery with Jenkins and Wildfly (2014)
Continuous Delivery with Jenkins and Wildfly (2014)
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
 
Maven 2 in the real world
Maven 2 in the real worldMaven 2 in the real world
Maven 2 in the real world
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
 
Maven basic concept
Maven basic conceptMaven basic concept
Maven basic concept
 
Maven tutorial for beginners
Maven tutorial for beginnersMaven tutorial for beginners
Maven tutorial for beginners
 
Maven
MavenMaven
Maven
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Alpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache Maven
 
Captain Agile and the Providers of Value
Captain Agile and the Providers of ValueCaptain Agile and the Providers of Value
Captain Agile and the Providers of Value
 
Maven Overview
Maven OverviewMaven Overview
Maven Overview
 

Similaire à Mastering Maven 2.0 In 1 Hour V1.3

Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)SeongJae Park
 
Slides Aquarium Paris 2008
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008julien.ponge
 
Gitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesGitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesJavier Alvarez
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution beginSeongJae Park
 
Composer The Right Way
Composer The Right WayComposer The Right Way
Composer The Right WayRafael Dohms
 
Composer the right way - DPC15
Composer the right way - DPC15Composer the right way - DPC15
Composer the right way - DPC15Rafael Dohms
 
Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Rafael Dohms
 
Thu bernstein key_warp_speed
Thu bernstein key_warp_speedThu bernstein key_warp_speed
Thu bernstein key_warp_speedeswcsummerschool
 
Composer the right way - NomadPHP
Composer the right way - NomadPHPComposer the right way - NomadPHP
Composer the right way - NomadPHPRafael Dohms
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHPRafael Dohms
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manormartinbtt
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Rafael Dohms
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot publicSeongJae Park
 
That's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICThat's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICLa FeWeb
 

Similaire à Mastering Maven 2.0 In 1 Hour V1.3 (20)

Let the contribution begin (EST futures)
Let the contribution begin  (EST futures)Let the contribution begin  (EST futures)
Let the contribution begin (EST futures)
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Slides Aquarium Paris 2008
Slides Aquarium Paris 2008Slides Aquarium Paris 2008
Slides Aquarium Paris 2008
 
Gitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de BranchesGitflow - Una metología para manejo de Branches
Gitflow - Una metología para manejo de Branches
 
Let the contribution begin
Let the contribution beginLet the contribution begin
Let the contribution begin
 
Composer The Right Way
Composer The Right WayComposer The Right Way
Composer The Right Way
 
Composer the right way - DPC15
Composer the right way - DPC15Composer the right way - DPC15
Composer the right way - DPC15
 
Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15Composer The Right Way #PHPjhb15
Composer The Right Way #PHPjhb15
 
Spring ME
Spring MESpring ME
Spring ME
 
Spring ME JavaOne
Spring ME JavaOneSpring ME JavaOne
Spring ME JavaOne
 
Thu bernstein key_warp_speed
Thu bernstein key_warp_speedThu bernstein key_warp_speed
Thu bernstein key_warp_speed
 
Linux
LinuxLinux
Linux
 
cheat-sheets.pdf
cheat-sheets.pdfcheat-sheets.pdf
cheat-sheets.pdf
 
Composer the right way - NomadPHP
Composer the right way - NomadPHPComposer the right way - NomadPHP
Composer the right way - NomadPHP
 
Composer the right way - SunshinePHP
Composer the right way - SunshinePHPComposer the right way - SunshinePHP
Composer the right way - SunshinePHP
 
Monkeybars in the Manor
Monkeybars in the ManorMonkeybars in the Manor
Monkeybars in the Manor
 
Git vs. Mercurial
Git vs. MercurialGit vs. Mercurial
Git vs. Mercurial
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16
 
Git inter-snapshot public
Git  inter-snapshot publicGit  inter-snapshot public
Git inter-snapshot public
 
That's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETICThat's (g)it! par Sébastien Dawans CETIC
That's (g)it! par Sébastien Dawans CETIC
 

Plus de Matthew McCullough

Using Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveUsing Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveMatthew McCullough
 
All About GitHub Pull Requests
All About GitHub Pull RequestsAll About GitHub Pull Requests
All About GitHub Pull RequestsMatthew McCullough
 
Git Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyGit Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyMatthew McCullough
 
Git and GitHub at the San Francisco JUG
 Git and GitHub at the San Francisco JUG Git and GitHub at the San Francisco JUG
Git and GitHub at the San Francisco JUGMatthew McCullough
 
Migrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMigrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMatthew McCullough
 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGMatthew McCullough
 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUGMatthew McCullough
 
Transylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsTransylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsMatthew McCullough
 
Game Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGGame Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGMatthew McCullough
 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGMatthew McCullough
 

Plus de Matthew McCullough (20)

Using Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge InteractiveUsing Git and GitHub Effectively at Emerge Interactive
Using Git and GitHub Effectively at Emerge Interactive
 
All About GitHub Pull Requests
All About GitHub Pull RequestsAll About GitHub Pull Requests
All About GitHub Pull Requests
 
Adam Smith Builds an App
Adam Smith Builds an AppAdam Smith Builds an App
Adam Smith Builds an App
 
Git's Filter Branch Command
Git's Filter Branch CommandGit's Filter Branch Command
Git's Filter Branch Command
 
Git Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh MyGit Graphs, Hashes, and Compression, Oh My
Git Graphs, Hashes, and Compression, Oh My
 
Git and GitHub at the San Francisco JUG
 Git and GitHub at the San Francisco JUG Git and GitHub at the San Francisco JUG
Git and GitHub at the San Francisco JUG
 
Finding Things in Git
Finding Things in GitFinding Things in Git
Finding Things in Git
 
Git and GitHub for RallyOn
Git and GitHub for RallyOnGit and GitHub for RallyOn
Git and GitHub for RallyOn
 
Migrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHubMigrating from Subversion to Git and GitHub
Migrating from Subversion to Git and GitHub
 
Git Notes and GitHub
Git Notes and GitHubGit Notes and GitHub
Git Notes and GitHub
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Build Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUGBuild Lifecycle Craftsmanship for the Transylvania JUG
Build Lifecycle Craftsmanship for the Transylvania JUG
 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUG
 
Transylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting AnnouncementsTransylvania JUG Pre-Meeting Announcements
Transylvania JUG Pre-Meeting Announcements
 
Game Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUGGame Theory for Software Developers at the Boulder JUG
Game Theory for Software Developers at the Boulder JUG
 
Cascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUGCascading Through Hadoop for the Boulder JUG
Cascading Through Hadoop for the Boulder JUG
 
JQuery Mobile
JQuery MobileJQuery Mobile
JQuery Mobile
 
R Data Analysis Software
R Data Analysis SoftwareR Data Analysis Software
R Data Analysis Software
 
Please, Stop Using Git
Please, Stop Using GitPlease, Stop Using Git
Please, Stop Using Git
 
Dr. Strangedev
Dr. StrangedevDr. Strangedev
Dr. Strangedev
 

Dernier

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Dernier (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Mastering Maven 2.0 In 1 Hour V1.3

  • 1. Mastering Maven ncrease your Mo Jo-tivity I by Matthew McCullough of Ambient Ideas, LLC
  • 3.
  • 4.
  • 5.
  • 6.
  • 8. Maven use ing up on the sw
  • 9.
  • 10.
  • 11.
  • 12. Convention v e r o Configuration
  • 13.
  • 14.
  • 15. Default Goal
  • 16. Default Goal ‣ Often not set. ‣ Saves typing. ‣ Communicates author’s intended goal. ‣ Only one goal or phase allowed.
  • 18. <project> <groupId>com.ambientideas</groupId> <artifactId>sample-defaultgoal</artifactId> [...] <build> <defaultGoal>install</defaultGoal> </build> [...] </project>
  • 21. mvn
  • 22. Super Pom
  • 24. Super Pom ‣ Pseudo-invisible. ‣ All projects inherit it.
  • 25. Super Pom ‣ Pseudo-invisible. ‣ All projects inherit it. ‣ Specifies file location defaults.
  • 26. Super Pom ‣ Pseudo-invisible. ‣ All projects inherit it. ‣ Specifies file location defaults. ‣ Locks version of common plugins. ‣ post mvn 2.0.8. ‣ Increases build stability.
  • 27. <!-- START SNIPPET: superpom --> <project> <modelVersion>4.0.0</modelVersion> <name>Maven Default Project</name> <build> <directory>target</directory> <outputDirectory>target/classes</outputDirectory> <finalName>${project.artifactId}-${project.version}</finalName> [...] <pluginManagement> <plugins> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.2</version> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> </plugin> </plugins> </pluginManagement> </build> </project>
  • 28. Super Pom ‣ Familiarize yourself with it. ‣ View it in SVN.
  • 29.
  • 30.
  • 31.
  • 33. Project via Archetype ‣ Project templates on steroids. ‣ Seed unit tests. ‣ Standardize directory structure. ‣ Corporate licenses, OSS licenses. ‣ Bundle corporate READMEs. ‣ Doesn’t mutate like a copy-n-paste template. ‣ Replaceables for classnames, company info.
  • 35. Archetype via Project ‣ Uses existing project as seed. ‣ Turns it into a maven archetype. ‣ Can publish to a repo for others to use.
  • 37.
  • 38. Archetype via Archetype ‣ “Template for templates”
  • 39. Archetype via Archetype ‣ “Template for templates” ‣ Can be selected from the archetype list.
  • 40. Archetype via Archetype ‣ “Template for templates” ‣ Can be selected from the archetype list. mvn archetype:generate
  • 41. $ mvn archetype:generate -DarchetypeGroupId=quot;org.apache.maven.archetypesquot; -DarchetypeArtifactId=maven-archetype-archetype -DarchetypeVersion=1.0 -DgroupId=com.ambientideas -DartifactId=mysamplearchetype
  • 43. Dirty Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.1 B:B:2.0 JU:JU:3.8.2 JU:JU:3.8.2
  • 44. How does Maven resolve versions?
  • 46. Dirty Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.1 B:B:2.0 JU:JU:3.8.2 JU:JU:3.8.2
  • 47. Dirty Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.1 B:B:2.0 JU:JU:3.8.2 JU:JU:3.8.2
  • 50. Then sequential first at same distance
  • 51. Dirty Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.1 B:B:2.0 JU:JU:3.8.2 JU:JU:3.8.2
  • 52. Dirty Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.1 B:B:2.0 JU:JU:3.8.2 JU:JU:3.8.2
  • 53. First sequential at same level ➲ [INFO] [dependency:tree] [INFO] root.project:ear:ear:1.0 [INFO] +- root.project:ejbs:ejb:1.0:compile [INFO] | - junit:junit:jar:4.0:compile [INFO] +- root.project.servlets:servlet:war:1.0:compile [INFO] +- root.project:primary-source:jar:1.0:compile [INFO] - root.project.projects:logging:jar:1.0:compile
  • 54. First sequential at same level ➲ 4.0 is resolved [INFO] [dependency:tree] [INFO] root.project:ear:ear:1.0 [INFO] +- root.project:ejbs:ejb:1.0:compile [INFO] | - junit:junit:jar:4.0:compile [INFO] +- root.project.servlets:servlet:war:1.0:compile [INFO] +- root.project:primary-source:jar:1.0:compile [INFO] - root.project.projects:logging:jar:1.0:compile
  • 55. First sequential at same level ➲ 4.0 is resolved [INFO] [dependency:tree] [INFO] root.project:ear:ear:1.0 [INFO] +- root.project:ejbs:ejb:1.0:compile [INFO] | - junit:junit:jar:4.0:compile [INFO] +- root.project.servlets:servlet:war:1.0:compile [INFO] +- root.project:primary-source:jar:1.0:compile [INFO] - root.project.projects:logging:jar:1.0:compile Even though I have 4.4 declared as a dependency of primary-source
  • 56. Resolving Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2 B:B:2.0 JU:JU:3.8.1 JU:JU:3.8.2
  • 57. Resolving Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2 B:B:2.0 JU:JU:3.8.1
  • 58. Resolving Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2 B:B:2.0
  • 59. Resolved Tree A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2
  • 60. We’ve resolved the version tree.
  • 61. How about the dependency graph?
  • 62. Dirty Graph A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2 B:B:2.0 JU:JU:3.8.1 JU:JU:3.8.2
  • 63. Resolved Graph A:A:1.0 B:B:1.0 C:C:1.0 JU:JU:3.8.2
  • 64. A dice roll for complex graphs?
  • 67. <*Management> ‣ <dependencyManagement> ‣ Inheritance for dependency versions.
  • 68. <*Management> ‣ <dependencyManagement> ‣ Inheritance for dependency versions. ‣ <pluginManagement> ‣ Inheritance for plugin versions and config.
  • 70. Minimizing declarations with <*Management>
  • 71. In the base pom.xml...
  • 72. <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>install</phase> <configuration> <tasks> <echo>Build Dir: ${project.build.directory}</echo> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement>
  • 73. <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>install</phase> <configuration> <tasks> <echo>Build Dir: ${project.build.directory}</echo> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement>
  • 74. <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>install</phase> <configuration> <tasks> <echo>Build Dir: ${project.build.directory}</echo> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement>
  • 75. <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>install</phase> <configuration> <tasks> <echo>Build Dir: ${project.build.directory}</echo> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement>
  • 76. In the child pom.xml...
  • 77. <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> </plugin> </plugins>
  • 78. Dependency Lists ‣ List view ‣ mvn dependency:resolve ‣ Tree view ‣ mvn dependency:tree ‣ Plugin list view ‣ mvn dependency:resolve-plugins
  • 79. $ mvn dependency:tree [INFO] com.ambientideas:sample13-wicket:war:1.0-SNAPSHOT [INFO] +- org.apache.wicket:wicket:jar:1.3.2:compile [INFO] | - org.slf4j:slf4j-api:jar:1.4.2:compile [INFO] +- org.apache.wicket:wicket-extensions:jar:1.3.2:compile [INFO] +- commons-collections:commons-collections:jar:3.1:compile [INFO] +- org.slf4j:slf4j-log4j12:jar:1.4.2:compile [INFO] +- log4j:log4j:jar:1.2.14:compile [INFO] +- junit:junit:jar:3.8.2:test [INFO] +- org.mortbay.jetty:jetty:jar:6.1.4:provided [INFO] | - org.mortbay.jetty:servlet-api-2.5:jar:6.1.4:provided [INFO] +- org.mortbay.jetty:jetty-util:jar:6.1.4:provided [INFO] - org.mortbay.jetty:jetty-management:jar:6.1.4:provided [INFO] +- mx4j:mx4j:jar:3.0.1:provided [INFO] - mx4j:mx4j-tools:jar:3.0.1:provided
  • 80. Dependency Analysis ‣ Analyze to help prune unneeded. ‣ mvn dependency:analyze
  • 81. Dependency Analysis ‣ See if overrides are colliding. ‣ mvn dependency:analyze-dep-mgt
  • 82. $ mvn dependency:analyze [WARNING] Unused declared dependencies found: [WARNING] org.slf4j:slf4j-log4j12:jar:1.4.2:compile [WARNING] log4j:log4j:jar:1.2.14:compile [WARNING] org.mortbay.jetty:jetty-management:jar:6.1.4:provided [WARNING] org.apache.wicket:wicket-extensions:jar:1.3.2:compile [WARNING] commons-collections:commons-collections:jar:3.1:compile
  • 83.
  • 85. Maven Debug Flags ‣ Output full error stacktraces. ‣ mvn <anygoal> -e ‣ Output debug level operational info. ‣ mvn <anygoal> -X ‣ Always use when submitting questions or bug reports.
  • 86. $ mvn <anygoal> -X [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven- dependency-plugin:2.0:analyze' --> [DEBUG] (f) baseDir = /Users/mccm06/Documents/Teach/ Courses/Mastering-Maven-1Hour/examples/maven-training.git/ sample13-wicket-withdependencies [DEBUG] (f) failOnWarning = false [DEBUG] (f) project = MavenProject: com.ambientideas:sample13-wicket-withunneededdependencies: 1.0-SNAPSHOT @ /Users/mccm06/Documents/Teach/Courses/ Mastering-Maven-1Hour/examples/maven-training.git/sample13- wicket-withunneededdependencies/pom.xml [DEBUG] (f) scriptableFlag = $$%%% [DEBUG] (f) scriptableOutput = false [DEBUG] (f) verbose = false
  • 87. Debug Maven ‣ Waits on socket for debugger to connect. ‣ mvnDebug <anygoal> ‣ Useful for debugging plugins. ‣ Can be used for unit test debugging. ‣ mvnDebug test -DforkMode=none
  • 88. Debug Unit Tests ‣ Waits on socket for debugger to connect. mvn test -Dmaven.surefire.debug
  • 90. Groovy Support ‣ Groovy application code compilation. ‣ mvn archetype:generate ...gmaven-archetype-basic ‣ Groovy maven plugin authoring. ‣ mvn archetype:generate ...gmaven-archetype-mojo ‣ Joint compiler in both cases. +
  • 91. Grails Support ‣ Grails now fully supports Maven... ‣ Archetype ‣ Grails goals: create-controller, run-app, etc. mvn org.apache.maven.plugins:maven-archetype-plugin:2.0- alpha-4:generate -DarchetypeGroupId=org.grails -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.0-SNAPSHOT -DarchetypeRepository=http://snapshots.repository.codehaus.org -DgroupId=com.ambientideas -DartifactId=sample-grails +
  • 92. command line Help !
  • 93. Maven Help Plugin mvn help:describe -Dplugin=<anygoal> ‣ Lists and describes plugin goals.
  • 94. Maven Help Plugin mvn help:system ‣ Outputs environment variables and system properties.
  • 95. Maven Help Plugin mvn help:active-profiles ‣ See what profiles are being triggered by environment, files, params.
  • 96. Maven Help Plugin mvn help:effective-pom ‣ Outputs the resultant pom. ‣ Includes inherited sections.
  • 98. m2eclipse Plugin ‣ Advanced Eclipse GUI for Maven ‣ Update site: http://m2eclipse.sonatype.org/update-dev/ ‣ Eclipse 3.2-3.4 compatibility ‣ 3.5 support arrived May 09 ‣ Features include: ‣ Exclusion/Inclusion via clicks ‣ Searching for artifacts ‣ Dependency diagrams ‣ Click-to-run Maven goals +
  • 99. mvn eclipse:eclipse File > Import > Existing ➊ Projects into Workspace Set up Eclipse Classpath Variable M2_REPO
  • 100. mvn eclipse:eclipse File > Import > Existing ➊ Projects into Workspace Set up Eclipse Classpath Variable M2_REPO
  • 101. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO
  • 102. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO mvn eclipse:m2eclipse ➋ File > Import > Existing Projects into Workspace
  • 103. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO mvn eclipse:m2eclipse ➋ File > Import > Existing Projects into Workspace
  • 104. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO sa ry es mvn eclipse:m2eclipse ➋ File > Importc> Existing nn e Workspace U Projects into
  • 105. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO sa ry es mvn eclipse:m2eclipse ➋ File > Importc> Existing nn e Workspace U Projects into ➌ File > Import > Maven Projects
  • 106. mvn eclipse:eclipse te d File > Import > Existing a ➊ tdClasspath Projects into Workspace u O Set up Eclipse Variable M2_REPO sa ry es mvn eclipse:m2eclipse ➋ File > Importc> Existing nn e Workspace U Projects into ➌ File > Import > Maven Projects
  • 107.
  • 108.
  • 111.
  • 112. Eclipse command line Compiler <plugin>      <artifactId>maven‐compiler‐plugin</artifactId>      <configuration>          <compilerId>eclipse</compilerId>          <source>1.5</source>          <target>1.6</target>      </configuration>      <dependencies>         <dependency>            <groupId>org.codehaus.plexus</groupId>            <artifactId>plexus‐compiler‐eclipse</artifactId>            <version>1.5.1</version>         </dependency>      </dependencies> </plugin>
  • 113. Source Code Control Integration
  • 114. Maven SCM Support ‣ Seamlessly integrates Maven processes with your SCM repo. ‣ mvn scm:diff ‣ Creates UNIX diff file ‣ mvn scm:tag ‣ mvn scm:status
  • 115. Maven SCM Support ‣ Dozens of SCM systems supported. ‣ CVS ‣ Subversion ‣ Git
  • 117. Maven SCM Support mvn release:prepare ‣ Increments all pom.xml version tags.
  • 118.
  • 119. Reactor Plugin
  • 120. Reactor Plugin Purposes ‣ Spawns a new nested Maven build. ‣ Restart where a long-running build failed. ‣ Selective build based on dependency. ‣ Selective build based on scm-noticed changes.
  • 121. Reactor Plugin In Use ‣ Resume multi-module build starting with this module. $ mvn reactor:resume -Dfrom=mymodule
  • 122. Reactor Plugin In Use ‣ Build all modules that are dependents of mine. ‣ Essentially, selective children. ‣ I just made a change. ‣ Want to ensure I didn’t break anything below me. $ mvn reactor:make-dependents -Dmake.folders=mid1 or $ mvn reactor:make-dependents -Dmake.projects=com.ambientideas:mid1
  • 123. Reactor Plugin In Use ‣ Build all modules that this module depends on ‣ Essentially, selective parents. ‣ Teammate informed me. ‣ Wants to make sure I test his changes. $ mvn reactor:make -Dmake.folders=mid1 or $ mvn reactor:make -Dmake.projects=com.ambientideas:mid1
  • 124. Reactor Plugin In Use ‣ Build all modules that scm says had changed. ‣ Essentially, build “dirty”. $ mvn reactor:make-scm-changes
  • 125. Running Apps
  • 126. Exec Plugin ‣ Run any Java main class or external tool.
  • 127. Exec Plugin ‣ Run any Java main class or external tool. ‣ Builds classpath from pom dependencies.
  • 128. Exec Plugin ‣ Run any Java main class or external tool. ‣ Builds classpath from pom dependencies. ‣ Primarily for testing.
  • 129. $ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot;
  • 130. $ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot; or
  • 131. $ mvn exec:java -Dexec.mainClass=quot;com.foo.Mainquot; or $ mvn exec:exec -Dexec.executable=quot;winzip.exequot; -Dexec.args=quot;myfile.txtquot;
  • 133. Ant Build Generation Why? ‣ Dead simple. ‣ Great for backport/legacy situations.
  • 134.
  • 136. $ cd mymavenproj $ mvn ant:ant
  • 137. $ cd mymavenproj it! , th at’s $ mvn ant:ant Yes $ ls build.xml maven-build.xml maven-build.properties
  • 138. AntRun Plugin ‣ Run any Ant task. ‣ Leverage legacy in-house plugins. ‣ Great way to copy arbitrary files. ‣ Useful for echoing status or properties.
  • 139. <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>echodir</id> <goals> <goal>run</goal> </goals> <phase>package</phase> <configuration> <tasks> <echo>BuildDir: ${project.build.directory}</echo> <copy todir=quot;${myspecialfolder}quot;> <fileset dir=quot;${myfiles}quot;/> </copy> </tasks> </configuration> </execution> </executions> </plugin> </plugins>
  • 141. Site Generation ‣ Professional project web site
  • 142. Site Generation ‣ Professional project web site ‣ Templatizable
  • 143. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors
  • 144. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors ‣ Licenses
  • 145. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors ‣ Licenses ‣ Hyperlinked source ref
  • 146. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors ‣ Licenses ‣ Hyperlinked source ref ‣ Defect tracking
  • 147. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors ‣ Licenses ‣ Hyperlinked source ref ‣ Defect tracking ‣ Dependencies
  • 148. Site Generation ‣ Professional project web site ‣ Templatizable ‣ Contributors ‣ Licenses ‣ Hyperlinked source ref ‣ Defect tracking ‣ Dependencies ‣ Plugins
  • 150. Report Generation ‣ Unit test reports ‣ Test coverage reports ‣ Checkstyle and PMD ‣ Javadocs ‣ Tag list (TODO)
  • 151. Report
  • 153. Maven 2.0.10 ‣ Stability. ‣ Unit and integration tests. ‣ End of the line for 2.0.X.
  • 154. Maven 2.1 ‣ Parallel downloads (Don Brown) ‣ Encrypted passwords ‣ Drop in replacement
  • 156. Maven 3.0 ‣ Encrypted passwords (from 2.1) ‣ Mercury engine ‣ Parallel downloads (determinate) ‣ New resolver ‣ Tyco OSGi bundle builder
  • 158.
  • 159. Twitter @matthewmccull Matthew Blog http://www.ambientideas.com/blog sidebar has all my social media links Email matthewm@ambientideas.com GitHub http://github.com/matthewmccullough
  • 160. Resources Maven Homepage http://maven.apache.org/ Maven Sonatype eBook http://www.sonatype.com/book/ Matthew’s Maven Bookmarks http://delicious.com/matthew.mccullough/maven GMaven Plugin http://groovy.codehaus.org/GMaven
  • 161. Resources Maven Superpom http://maven.apache.org/pom.html#The_Super_POM Sonatype Central Repo http://repository.sonatype.org/ Java.net Repo http://download.java.net/maven/2/ Archetype Mini-Guide http://maven.apache.org/guides/mini/guide-creating-archetypes.html
  • 162. Resources GMaven Plugin http://groovy.codehaus.org/GMaven Grails Maven Integration http://www.grails.org/Maven+Integration m2eclipse Plugin Homepage http://m2eclipse.codehaus.org/ m2eclipse Eclipse Update Site http://m2eclipse.sonatype.org/update-dev/ m2eclipse Documentation http://docs.codehaus.org/display/MAVENUSER/Dealing+with+Eclipse-based+IDE
  • 163. Resources Archetype Guide http://maven.apache.org/guides/mini/guide-creating-archetypes.html Sonatype eBook Archetype Chapter http://propellors.net/maven/book/archetypes.html http://www.sonatype.com/books/maven-book/reference/archetypes.html Archetype create-from-project Mojo http://maven.apache.org/plugins/maven-archetype-plugin/create-from-project- mojo.html JavaWorld Reporting Article http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven.html
  • 164. Resources Maven Dependency Plugin http://maven.apache.org/plugins/maven-dependency-plugin/ Maven AntRun Plugin http://maven.apache.org/plugins/maven-antrun-plugin/ Maven Exec Plugin http://mojo.codehaus.org/exec-maven-plugin/usage.html SuperPOM in SVN http://svn.apache.org/viewvc/maven/components/tags/maven-2.0.9/maven-project/ src/main/resources/org/apache/maven/project/pom-4.0.0.xml?view=markup
  • 165. Image Credits ‣ http://flickr.com/photos/chanchan222/2883910690/ ‣ http://flickr.com/photos/themarmot/3173506262/ ‣ http://commons.wikimedia.org/wiki/File:Napoleon4.jpg