SlideShare a Scribd company logo
1 of 134
Download to read offline
Apache Maven - AlpesJUG - March 29th, 2010



                                         Arnaud Héritier
                                           eXo Platform
                               Software Factory Manager
Arnaud Héritier
●    Software Factory Manager
     eXo platform
     -    In charge of tools and
          methods




                                                      ●    Committer since 2004 and
                                                           member of the Project
                                                           Management Committee
                                                      ●    Coauthor of « Apache
                                                           Maven » published by
                                                           Pearson (in French)
          Licensed under a Creative Commons license
Apache Maven
CHOOSE YOUR MENU



   Licensed under a Creative Commons license
Overview
●    Definition                                       ●    Maven or not Maven, that
●    History                                               is the question !
                                                           -    Maven, the project choice
●    Concepts
                                                           -    Maven, the corporate choice
     -    Conventions
                                                           -    Competitors
     -    POM
     -    Reactor and Modules
     -    Inheritance
     -    Artifact Repository
     -    Dependency
     -    Version
     -    Profiles
          Build Lifecycle And Plugins
          Licensed under a Creative Commons license
Ecosystem
●    Repository Managers                              ●    Continuous Integration
●    Quality Management                               ●    IDE
     -    Tests Automation                                 -    Eclipse
     -    Quality Metrics Reports                          -    Idea IntelliJ
     -    Project Reports                                  -    Netbeans
     -    Sonar




          Licensed under a Creative Commons license
Good & Bad Practices
●    K.I.S.S.
●    Project Organization
●    POM
●    Development




       Licensed under a Creative Commons license
Usecases
●    Secure your credentials
●    Build a part of your project using reactor options
●    Automate your release process
     -    (at least the technical part)




          Licensed under a Creative Commons license
Back to the future
●    Maven 2.x
●    Maven 3.x
●    Community




      Licensed under a Creative Commons license
Apache Maven
OVERVIEW



   Licensed under a Creative Commons license
Definition
●    Apache Maven is a software project management
     and comprehension tool.
●    Based on the concept of a project object model
     (POM)
     -    Maven can manage a project's build, binaries,
          reporting and documentation from a central piece of
          information.




          Licensed under a Creative Commons license
History
●    Initiated in 2001 by Jason Van Zyl in Alexandria, an
     Apache Jakarta project,
●    Moved to Turbine few months after,
●    Became a Top Level Project in 2003.
●    Maven 2.0 released in September 2005
●    Maven 3.0 … coming soon !!!




       Licensed under a Creative Commons license
Apache Maven
CONCEPTS



   Licensed under a Creative Commons license   12
Conventions
●    1 project = 1 artifact (pom, jar, war, ear, …)

●    Standardized
     -    directories layout
            ●    *.java to compile in
                 src/[main|test]/java
            ●    *.xml, *.properties needed
                 in classpath and to bundle
                 in archive in src/[main|test]/java
            ●    …
     -  project descriptor (POM)
     -  build lifecycle

          Licensed under a Creative Commons license     13
POM
●    An XML file (pom.xml)                             <?xml version="1.0" encoding="UTF-8"?>!
                                                       <project>!
                                                        <modelVersion>4.0.0</modelVersion>!

●    Describing                                         <groupId>net.aheritier.samples</groupId>!
                                                        <artifactId>simple-webapp</artifactId>!

     -    Project identification                        <version>1.1-SNAPSHOT</version>!
                                                        <packaging>war</packaging>!
     -    Project version                               <name>Simple webapp</name>!

     -    Project description                           <inceptionYear>2007</inceptionYear>!
                                                        <dependencies>!
     -    Build settings                                 <dependency>!
                                                          <groupId>org.springframework</groupId>!
     -    Dependencies                                    <artifactId>spring-struts</artifactId>!
     -    …                                               <version>2.0.2</version>!
                                                         </dependency>!
                                                         ...!
                                                        </dependencies>!
                                                       </project>!


          Licensed under a Creative Commons license
Reactor
●    Split your project in                            <project>!

     sub-modules                                        ...!
                                                        <modules>!

●    Maven computes the                                   <module>moduleA</module>!

     build order from                                     <module>moduleB</module>!

     dependencies                                         <module>moduleC</module>!
     between sub-                                         <module>moduleD</module>!
     modules.                                             <module>moduleE</module> !

●    Modules have to be                                   <module>moduleF</module>!

     defined in the POM                                 </modules>!
                                                        ...!
     -    No auto-discovery for                       </project>!
          performance reasons



          Licensed under a Creative Commons license
Inheritance
                                            ●     Share settings between
                                                  projects/modules
                                            ●     By default the parent
                                                  project is supposed to be
                                                  in the parent directory (../)



                                            <parent>!
                                                 <groupId>net.aheritier.sample</groupId>!
                                                 <artifactId>my-parent</artifactId>!
                                                 <version>1.0.0-SNAPSHOT<version>!
                                            </parent>!



Licensed under a Creative Commons license
Inheritance
                                            Use a technical inheritance to organize sub-modules

                                                 Use assembly to package batchs


                                                 Insert README in all artifacts




                                                 Use clirr to validate backward compatibility




Licensed under a Creative Commons license
Artifact Repository
●    By default :
     -    A central repository
            ●    http://repo1.maven.org/
                 maven2
            ●    Several dozen of Gb of OSS
                 libraries
     -    A local repository
            ●    ${user.home}/.m2/repository
            ●    All artifacts
                  -    Used by maven and its
                       plugins
                  -    Used by your projects
                       (dependencies)
                  -    Produced by your projects



          Licensed under a Creative Commons license
Artifact Repository
                                            ●    By default Maven
                                                 downloads artifacts
                                                 required by the project or
                                                 itself from central
                                            ●    Downloaded artifacts are
                                                 stored in the local
                                                 repository
                                            ●    Used to store :
                                                 -    Project’s binaries
                                                 -    Project’s dependencies
                                                 -    Maven and plug-ins binaries



Licensed under a Creative Commons license
Dependencies
Without Maven                   With Maven




 Licensed under a Creative Commons license
Dependencies
●    Declaratives
     -  groupId + artifactId + version (+ classifier)
     -  Type (packaging) : jar, war, pom, ear, …

●    Transitives
     -  Lib A needs Lib B
     -  Lib B needs Lib C
     -  Thus Lib A needs Lib C




          Licensed under a Creative Commons license
Dependencies
●    Scope
     -  Compile (by default) : Required to build and run the
        application
     -  Runtime : not required to build the application but
        needed at runtime
            ●    Ex : taglibs
     -    Provided : required to build the application but not
          needed at runtime (provided by the container)
            ●    Ex : Servlet API, Driver SGBD, …
     -    Test : required to build and launch tests but not needed
          by the application itself to build and run
            ●    Ex : Junit, TestNG, DbUnit, …
     -    System : local library with absolute path
            ●    Ex : software products
          Licensed under a Creative Commons license
Dependencies
●    Define all dependencies you are using
     -    and no more !
●    If you have optional dependencies
     -    Perhaps you should have optional modules instead
●    Cleanup your dependencies with
     -    mvn dependency:analyze!
●    Study your dependencies with
     -  mvn dependency:tree!
     -  mvn dependency:list!



          Licensed under a Creative Commons license
Versions
●    Project and dependency versions
●    Two different version variants
          SNAPSHOT version
            ●    The version number ends with –SNAPSHOT
            ●    The project is in development
            ●    Deliveries are changing over the time and are overridden
                 after each build
            ●    Artifacts are deployed with a timestamp on remote
                 repositories
          RELEASE version
            ●    The version number doesn’t end with –SNAPSHOT
            ●    Binaries won’t change
          Licensed under a Creative Commons license
Versions




Licensed under a Creative Commons license
Versions
●    About SNAPSHOT dependencies
     -    Maven allows the configuration of an update policy.
          The update policy defines the recurrence of checks if
          there is a new SNAPSHOT version available on the
          remote repository :
            ●    always
            ●    daily (by default)
            ●    interval:X (a given period in minutes)
            ●    never
     -    Must not be used in a released project
            ●    They can change thus the release also 
            ●    The release plugin will enforce it 

          Licensed under a Creative Commons license
Versions

●    Range
     -  From … to …
     -  Maven automatically searches for the corresponding
        version (using the update policy for released artifacts)
     -  To use with caution
            ●    Risk of non reproducibility of the build
            ●    Risk of side effects on projects depending on yours.




          Licensed under a Creative Commons license
Versions
●    Use the versions plugin to update all versions of your
     project and its modules
mvn versions:set –DnewVersion=A.B.C-SNAPSHOT!




       Licensed under a Creative Commons license
Profiles
●    Allow to modify the default behavior of Maven by
     overriding/adding some settings
●    Use mvn help:active-profiles to debug
●    Explicit activation or deactivation

mvn <phases or goals> !
     -PprofileId1,-profileId2 !
     -P!profileId3!




        Licensed under a Creative Commons license
Profiles
●    activeByDefault = If no other profile is activated
●    Activation through Maven settings
<settings>!
     ...!
     <activeProfiles>!
       <activeProfile>profile-1</activeProfile>!
     </activeProfiles>!
     ...!
</settings>!




        Licensed under a Creative Commons license
Profiles
●    Activation based on environment variables

<profiles>!
                                                    <profiles>!
     <profile>!
                                                      <profile>!
       <activation>!
                                                        <activation>!
         <property>!
                                                          <property>!
              <name>run-its</name>!
                                                               <name>!skip-enforce</name>!
              <value>true</value>!
                                                          </property>!
         </property>!
                                                        </activation>!
       </activation>!
                                                        ...!
       ...!
                                                      </profile>!
     </profile>!
                                                    </profiles>!
</profiles>!
        Licensed under a Creative Commons license
Profiles
●    OS / Java settings
                                                    <profiles>!
                                                      <profile>!

<profiles>!                                             <activation>!
                                                             <os>!
     <profile>!
                                                             <name>Windows XP</name>!
       <activation>!
                                                             <family>Windows</family>!
         <jdk>[1.3,1.6)</jdk>!
                                                             <arch>x86</arch>!
       </activation>!
                                                             <version>5.1.2600</version>!
       ...!
                                                        </os>!
     </profile>!
                                                      </activation>!
</profiles>!                                          ...!
                                                      </profile>!
                                                    </profiles>!
        Licensed under a Creative Commons license
Profiles
●    Activation on present or missing files
<profiles>!
     <profile>!
       <activation>!
         <file>!
           <missing>${project.build.directory}/generated-sources/
     axistools/wsdl2java/</missing>!
         </file>!
       </activation>!
       ...!
     </profile>!
</profiles>!

        Licensed under a Creative Commons license
Build Lifecycle And Plugins



                                            ●    Plugin based architecture
                                                 for a great extensibility
                                            ●    Standardized lifecycle to
                                                 build all types of
                                                 archetypes




Licensed under a Creative Commons license
Build Lifecycle And Plugins
Default Lifecycle                        Clean Lifecycle   Site Lifecycle
validate                                 pre-clean         pre-site

initialize
                                         clean             site
generate-sources                         post-clean        post-site

process-sources
                                                           site-deploy
generate-resources

process-resources

compile
process-classes

generate-test-sources

process-test-sources

generate-test-resources

process-test-resources

test-compile

process-test-classes

test
prepare-package

package
pre-integration-test

integration-test

post-integration-test

verify

install
deploy Licensed under a Creative Commons license
Build Lifecycle And Plugins
●    Many plugins
     -  Packaging
     -  Reporting
     -  IDE integration
     -  Miscellaneous tools integration
●    Many locations
     -  maven.apache.org
     -  mojo.codehaus.org
     -  code.google.com
     -  …


          Licensed under a Creative Commons license
Apache Maven
MAVEN OR NOT MAVEN,
THAT IS THE QUESTION !


   Licensed under a Creative Commons license
Maven, the project’s choice
●    Application’s architecture
     -  The project has the freedom to divide the application in
        modules
     -  Maven doesn’t limit the evolution of the application
        architecture
●    Dependencies management
     -  Declarative : Maven automatically downloads them and
        builds the classpath
     -  Transitive : We define only what the module needs
        itself


          Licensed under a Creative Commons license
Maven, the project’s choice
●    Centralizes and automates                     -    Builds
     all development facets                        -    Tests
     (build, tests, releases)                      -    Packages
●    One thing it cannot do for                    -    Deploys
     you : to develop                             -    Documents
                                                   -    Checks and reports about
                                                        the quality of developments




       Licensed under a Creative Commons license
Maven, the corporate’s choice
●    Widely adopted and known
     -    Many developers
●    Developments are standardized
●    Decrease of costs
     -  Reuse of knowledge
     -  Reuse of configuration fragments
     -  Reuse of process and code fragments
●    Product quality improvement
     -    Reports and monitoring


          Licensed under a Creative Commons license
Competitors
●    Ant + Ivy, Easy Ant, Gant, Gradle, Buildr…
●    Script oriented
     -    You can do what you want !
●    Reuse many of Maven conventions (directories
     layout, …) and services (repositories) but without
     enforcing them
●    The risk for them : Not being able to evolve due
     to the too high level of customization proposed
     to the user.
     -  We tried on Maven 1 and it died because of that. It was
        impossible to create a set of tests to cover all usages.
     -  It’s like providing a framework without public API 
          Licensed under a Creative Commons license
With scripts oriented builds
You can have                                     But often you have




     Licensed under a Creative Commons license
With Maven
We dream to deliver                              But today we have too often
Maven 3.x ?                                      Maven 2.x




     Licensed under a Creative Commons license
Apache Maven
ECOSYSTEM



   Licensed under a Creative Commons license
Maven’s ecosytem
●    Maven alone is nothing
●    You can integrate it with many tools
     -  A large set of plug-ins is already available
     -  You can define your own plug-ins




          Licensed under a Creative Commons license
Apache Maven
REPOSITORY MANAGERS



   Licensed under a Creative Commons license
Repository Managers
●    Several products                                 ●    Basic services
     -    Sonatype Nexus (replaced                         -    Search artifacts
          Proximity)                                       -    Browse repositories
     -    Jfrog Artifactory                                -    Proxy external repositories
     -    Apache Archiva                                   -    Host internal repositories
                                                           -    Security




          Licensed under a Creative Commons license
Secure your builds
●    Deploy a repository manager to proxy externals
     repositories to :
     -  Avoid external network outages
     -  Avoid external repository unavailabilities
     -  To reduce your company’s external network usage
     -  To increase the speed of artifact downloads
●    Additional services offered by such servers :
     -  Artifacts procurement to filter what is coming from the
        outside
     -  Staging repository to validate your release before
        deploying it

          Licensed under a Creative Commons license
Nexus for productivity




Licensed under a Creative Commons license
Nexus for collaboration
●    Deploy 3rd Party Artifacts
●    Collaborate with Internal
     Repositories
●    Distribute to the community
     with Public Repositories
●    Distribute to customers
     with Private Repositories




       Licensed under a Creative Commons license
Nexus for quality
●    Ease the Burden on Central and others remote
     repositories
●    Gain Predictability and Scalability
●    Control and Audit Dependencies and Releases
●    Stage releases




       Licensed under a Creative Commons license
Apache Maven
QUALITY MANAGEMENT



   Licensed under a Creative Commons license
Tests Automation
●    Use automated tests as often as you can
●    Many tools are available through Maven
     -  JUnit, TestNG – unit tests,
     -  Selenium, Canoo – web GUI test,
     -  Fitnesse, Greenpepper – functional tests,
     -  SoapUI – web services tests
     -  JMeter – performances tests
     -  And many more frameworks are available to reply your
        needs



          Licensed under a Creative Commons license
Quality Metrics
●    Extract quality metrics from your project and
     monitor them :
     -  Code style (CheckStyle)
     -  Bad practices or potential bugs (PMD, FindBugs, Clirr)
     -  Tests coverage (Cobertura, Emma, Clover)
     -  …
●    You can use blocking rules
     -    For example, I break the build if the upward
          compatibility of public APIs is broken
●    You can use reports
     -  Reports are available in a web site generated by
        Maven
     -  Or in a quality dashboard like Sonar
          Licensed under a Creative Commons license
Dependency Report




Licensed under a Creative Commons license
Sonar, a quality dashboard




Licensed under a Creative Commons license
Sonar, analyze your project




Licensed under a Creative Commons license
Sonar, Continuous Improvement ?




 Licensed under a Creative Commons license
Apache Maven
CONTINUOUS INTEGRATION



   Licensed under a Creative Commons license
Continuous Integration
●    Setup a continuous integration server to :
     -  Have a neutral and unmodified environment to run your
        tests
     -  Quickly react when
            ●    The build fails (compilation failure for example)
            ●    A test fails
            ●    A quality metric is bad
     -    Continuously improve the quality of your project and
          your productivity
●    Many products
     -    Hudson, Bamboo, TeamCity, Continuum,
          Cruisecontrol, …
          Licensed under a Creative Commons license
Hudson, how the weather is ?




Licensed under a Creative Commons license
Hudson : build, test, check




Licensed under a Creative Commons license
Apache Maven
IDE



   Licensed under a Creative Commons license
Eclipse




Licensed under a Creative Commons license
Eclipse




Licensed under a Creative Commons license
Eclipse




Licensed under a Creative Commons license
Idea IntelliJ




Licensed under a Creative Commons license
Netbeans




Licensed under a Creative Commons license
Apache Maven
GOOD & BAD PRACTICES



   Licensed under a Creative Commons license
Apache Maven
KISS



   Licensed under a Creative Commons license
K.I.S.S.
●    Keep It Simple, Stupid
●    Start from scratch
     -    Do not copy/paste what you find without understanding
●    Use only what you need
     -    It’s not because maven offers many features that you
          need to use them
            ●    Filtering
            ●    Modules
            ●    Profiles
            ●    …


          Licensed under a Creative Commons license
Apache Maven
PROJECT ORGANIZATION
GOOD & BAD PRACTICES


   Licensed under a Creative Commons license
Project bad practices
●    Ignore Maven conventions
     -  Except if your are migrating from something else and
        the target has to be to follow them.
     -  Except if they are not compatible with your IDE
●    Different versions in sub-modules
     -    In that case they are standalone projects.
●    Too many inheritance levels
     -    It makes the POMs maintenance more complex
                  -    Where should I set this plugin parameter ? In which parent ?




          Licensed under a Creative Commons license
Project bad practices
●    Have too many modules
     -    Is there a good reason ?
            ●    Technical constraint ?
            ●    Team organization ?
     -    It increases the build time
            ●    Many more artifacts to generate
            ●    Dependencies resolution more complex
     -    It involves more complex developments
            ●    More modules to import in your IDE
            ●    More modules to update …



          Licensed under a Creative Commons license
Project good practices


●    Use the default
     inheritance :
     -    The reactor project is also
          the parent of its modules.
     -    Configuration is easier :
             ●    No need to redefine SCM
                  settings, site distribution
                  settings …




          Licensed under a Creative Commons license
Apache Maven
POM GOOD & BAD PRACTICES



   Licensed under a Creative Commons license
POM bad practices


●    Dependencies :
     -    DON’T confuse dependencies and
          dependencyManagement
●    Plugins :
     -  DON’T confuse plugins and pluginManagement
     -  DON’T use AntRun plugin everywhere
     -  DON’T let Maven choose plugins versions for you




          Licensed under a Creative Commons license
POM bad practices
●    Profiles :
     -  DON’T create environment dependant builds
     -  DON’T rely on dependencies coming from profiles
        (there is no transitive activation of profiles)
●    Reporting and quality
     -  DON’T activate on an existing project all reports with
        default configuration
     -  DON’T control formatting rules without giving settings
        for IDEs.
●    DON’T put everything you find in your POM.


          Licensed under a Creative Commons license
POM good practices
●    Set versions of dependencies in project parent’s
     dependencyManagement
●    Set dependencies (groupId, artifactId, scope) in
     each module they are used
●    Use the dependency plugin (from apache) and
     versions plugin (from mojo) to analyze, cleanup
     and update your dependencies.




       Licensed under a Creative Commons license
Apache Maven
DEVELOPMENT
GOOD & BAD PRACTICES


   Licensed under a Creative Commons license
Development bad practices
●    DON’T spend your time in the terminal,
●    DON’T exchange libraries through emails,
●    DON’T always use "-Dmaven.test.skip=true”
●    DON’T manually do releases




       Licensed under a Creative Commons license
Development good practices
●    Keep up-to-date your version of Maven
     -    For example in 2.1 the time of dependencies/modules
          resolution decreased a lot (Initialization of a project of
          150 modules passed from 8 minutes to less than 1)
●    Use the reactor plugin (Maven < 2.1) or native
     reactor command line options (Maven >= 2.1) to
     rebuild only a subpart of your project :
     -  All modules depending on module XXX
     -  All modules used to build XXX
●    Try to not use Maven features not supported by
     your IDE (resources filtering with the plugin
     eclipse:eclipse)
          Licensed under a Creative Commons license
Apache Maven
USECASES



   Licensed under a Creative Commons license
Apache Maven
SECURE YOUR CREDENTIALS



   Licensed under a Creative Commons license
Secure your credentials
●        Generate a private key
-    

         arnaud@leopard:~$ mvn --encrypt-master-password toto

         {dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}




●        We save the private key in ~/.m2/settings-security.xml

<settingssecurity>!
     <master>{dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}</master>!
</settingssecurity>!




            Licensed under a Creative Commons license
Secure your credentials
●    You can move this key to another drive ~/.m2/settings.xml
-    <settingssecurity>

       <relocation>/Volumes/ArnaudUsbKey/secure/settings-security.xml</relocation>

     </settingssecurity>!


●    You create an encrypted version of your server
     password
-    arnaud@mbp-arnaud:~$ mvn --encrypt-password titi
     {SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}!


●    You register it in your settings
-    <settings>

       ...

         <servers>

            ...

              <server>

                 <id>mon.server</id>

                 <username>arnaud</username>

                 <password>{SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}</password>

              </server>

            ...

         </servers>

       ...

     </settings>!

        Licensed under a Creative Commons license
Apache Maven
BUILD A PART OF YOUR PROJECT



   Licensed under a Creative Commons license
Reactor options (Maven > 2.1)
                                        -    arnaud@mbp-arnaud:~$ mvn install

                                             [INFO] ------------------------------------------------

                                             [INFO] Reactor Summary:

                                             [INFO]

                                             [INFO] Project ....................... SUCCESS [2.132s]

                                             [INFO] ModuleA ....................... SUCCESS [5.574s]

                                             [INFO] ModuleB ....................... SUCCESS [0.455s]

                                             [INFO] ModuleC ....................... SUCCESS [0.396s]

                                             [INFO] ModuleD ....................... SUCCESS [0.462s]

                                             [INFO] ModuleE ....................... SUCCESS [0.723s]

                                             [INFO] ModuleF ....................... SUCCESS [0.404s]
                                                                                                   !




                                        ●    Builds everything from A to F


Licensed under a Creative Commons license
Reactor options (Maven > 2.1)
                                        -    arnaud@mbp-arnaud:~$ mvn install –pl
                                             moduleE,moduleB

                                             [INFO] -------------------------------------------

                                             [INFO] Reactor Summary:

                                             [INFO]

                                             [INFO] ModuleB .................. SUCCESS [2.774s]

                                             [INFO] ModuleE .................. SUCCESS [1.008s]





                                        ●    Builds only modules B and E
                                        ●    Following dependencies order
                                        ●    -pl --project-list: Build the
                                             specified reactor projects instead
                                             of all projects

Licensed under a Creative Commons license
Reactor options (Maven > 2.1)
                                        -    arnaud@mbp-arnaud:~$ mvn install –pl moduleD -am

                                             [INFO] ------------------------------------------

                                             [INFO] Reactor Summary:

                                             [INFO]

                                             [INFO] ModuleA ................. SUCCESS [4.075s]

                                             [INFO] ModuleB ................. SUCCESS [0.468s]

                                             [INFO] ModuleC ................. SUCCESS [0.354s]

                                             [INFO] ModuleD ................. SUCCESS [0.384s]





                                        ●    Builds module D (-pl) and all
                                             modules it uses as dependencies
                                        ●    -am --also-make: If a project list
                                             is specified, also make projects
                                             that the list depends on
                                        ●    Usecase : Build all modules
                                             required for a war, ear, …
Licensed under a Creative Commons license
Reactor options (Maven > 2.1)
                                        -    arnaud@mbp-arnaud:~$ mvn install –pl moduleD -amd

                                             [INFO] ------------------------------------------

                                             [INFO] Reactor Summary:

                                             [INFO]

                                             [INFO] ModuleD ................. SUCCESS [4.881s]

                                             [INFO] ModuleE ................. SUCCESS [0.478s]

                                             [INFO] ModuleF ................. SUCCESS [0.427s]





                                        ●    Builds module D (-pl) and all
                                             modules which depend on it
                                        ●    -amd --also-make-dependents: If
                                             a project list is specified, also
                                             make projects that depend on
                                             projects on the list
                                        ●    Usecase : Check that a change in
                                             a module didn’t break others
                                             which are using it
Licensed under a Creative Commons license
Apache Maven
RELEASE YOUR PROJECT



   Licensed under a Creative Commons license
Release of a webapp in 2002
●    Limited usage of eclipse
     -  No WTP (Only some features in WSAD),
     -  No ability to produce WARs




          Licensed under a Creative Commons license
Release of a webapp in 2002
●    Many manual tasks
     -  Modify settings files
     -  Package JARs
     -  Copy libraries (external and internal) in a « lib »
        directory
     -  Package WAR (often with a zip command)
     -  Tag the code (CVS)
     -  Send the package on the integration server using FTP
     -  Deploy the package with AS console




          Licensed under a Creative Commons license
Release of a webapp in 2002
●    One problem : The are                            ●    How long did it take ?
     always problems                                       -    When everything is ok : 15
     -    Error in config files                                 minutes
     -    Missing dependencies                             -    When there’s a problem : ½
     -    Missing file                                          day or more
     -    Last minute fix which created a bug
     -    And many other possibilies ..




          Licensed under a Creative Commons license
Maven Release Plugin
●    Automates the release process from tagging
     sources to binaries delivery
●    Release plugin main goals:
     -  Prepare : To update maven versions and information in
        POMs and tag the code
     -  Perform : To deploy binaries in a maven repository
●    After that you can just automate the deployment on
     the AS using cargo for example.




          Licensed under a Creative Commons license
Maven Release Plugin




Licensed under a Creative Commons license
Configuration and Prerequisites
●    Project version (must be a SNAPSHOT version)
●    Dependencies and plugins versions mustn’t be
     SNAPSHOTs




       Licensed under a Creative Commons license
SCM configuration
●    SCM binaries have to be in the PATH
●    SCM credentials have to already be stored or you have to
     pass them in command line with :
     –Dusername=XXX –Dpassword=XXX
<scm>
 <connection>
  scm:svn:http://svn.exoplatform.org/projects/parent/trunk
 </connection>
 <developerConnection>
  scm:svn:http://svn.exoplatform.org/projects/parent/trunk
 </developerConnection>
 <url>
  http://fisheye.exoplatform.org/browse/projects/parent/trunk
 </url>
</scm>
       Licensed under a Creative Commons license
Distribution Management
<project>
 <distributionManagement>
  <repository>
   <id>repository.exoplatform.org</id>
   <url>${exo.releases.repo.url}</url>
  </repository>
 . . .
 </distributionManagement>
 . . .
 <properties>
  <exo.releases.repo.url>
  http://repository.exoplatform.org/content/repositories/exo-releases
  </exo.releases.repo.url>
  . . .
 </properties>
</project>

     Licensed under a Creative Commons license
Repository credentials
<settings>
 <servers>
  <server>
   <!–- id must be the one used in distributionManagement -->
   <id>repository.exoplatform.org</id>
   <username>aheritier</username>
   <password>{ABCDEFGHIJKLMNOPQRSTUVWYZ}</password>
  </server>
 </servers>
</settings>




     Licensed under a Creative Commons license
Default Release Profile in Super POM
<profile>
 <id>release-profile</id>
 <activation>
  <property>
   <name>performRelease</name>
   <value>true</value>
  </property>
 </activation>
 <build>
  <plugins>
   <!–- Configuration to generate sources and javadoc jars -->
   ...
  </plugins>
 </build>
</profile>

     Licensed under a Creative Commons license
Custom release profile
<project>                                               ...

 ...                                                     <profiles>

 <build>                                                  <profile>

  <pluginManagement>                                          <id>myreleaseprofile</id>

   <plugins>                                                  <build>

       <plugin>                                               <!-– what you want to customize the behavior of
                                                               the build when you do a release -->
        <groupId>org.apache.maven.plugins</groupId>
                                                              </build>
        <artifactId>maven-release-plugin</artifactId>
                                                          </profile>
        <version>2.0-beta-9</version>
                                                         </profiles>
        <configuration>
                                                         ...
         <useReleaseProfile>false</useReleaseProfile>
                                                        </project>
         <arguments>-Pmyreleaseprofile</arguments>

        </configuration>

       </plugin>

   </plugins>

  </pluginManagement>

 </build>

           Licensed under a Creative Commons license
Troubleshooting Releases
●    Common errors during release:
     -  Build with release profile was tested before and fails
     -  Local modifications
     -  Current version is not a SNAPSHOT
     -  SNAPSHOTs in dependencies and/or plugins
     -  Missing some configuration (scm, distribMgt, …)
     -  Tag already exists
     -  Unable to deploy project to the Repository
     -  Connection problems




          Licensed under a Creative Commons license
Apache Maven
BACK TO THE FUTURE



   Licensed under a Creative Commons license
Apache Maven
PRODUCT



   Licensed under a Creative Commons license
Apache Maven 2.0.x
●    bugs fix
●    Last release : 2.0.11
●    No other release of 2.0.x in the future




       Licensed under a Creative Commons license
Apache Maven 2.x
●    Evolutions, new features
●    Several important new features in 2.1 like
     -  Parallel downloads
     -  Encrypted passwords

●    Last release : 2.2.1




          Licensed under a Creative Commons license
Apache Maven 3.x
●    Do not be afraid !!!!!
●    Not final before at least
     one year
●    Full compatibility with
     maven 2.x projects




        Licensed under a Creative Commons license
Apache Maven 3.x
●    What’s new :
     -  How POMs are constructed
     -  How the lifecycle is executed
     -  How the plugin manager executes
     -  How artifacts are resolved
     -  How it can be embedded
     -  How dependency injection is done




          Licensed under a Creative Commons license
Apache Maven 3.x
●    What it will change for maven users ?
     -  Any-source POM
     -  Versionless parent elements
     -  Mixins : a compositional form of Maven POM
        configuration
     -  Better IDE integration
     -  Error & integrity reporting
            ●    Much improved error reporting where we will provide links to
                 each identifiable problem we know of. There are currently 42
                 common things that can go wrong.
            ●    Don't allow builds where versions come from non-project
                 sources like local settings and CLI parameters
            ●    Don't allow builds where versions come from profiles that
                 have to be activated manually

          Licensed under a Creative Commons license
Apache Maven 3.x
●    What it will change for maven developers ?
     -  Lifecycle extension points
     -  Plugin extension points
     -  Incremental build support
     -  Queryable lifecycle
     -  Extensible reporting




          Licensed under a Creative Commons license
Apache Maven 3.x
●    New tools
     -  Tycho : OSGI, Eclipse
     -  Mvnsh




          Licensed under a Creative Commons license
Maven Shell




Licensed under a Creative Commons license
Apache Maven
COMMUNITY



   Licensed under a Creative Commons license
Users community
●    1780 subscribers on users
     mailing list




●    90 days statistics
●    Number of subscribers in blue
●    Number of messages per day in red



       Licensed under a Creative Commons license
The web site




Licensed under a Creative Commons license
Dowloads




●    Per month downloads




       Licensed under a Creative Commons license
The team
●    60 committers,
●    More than 30 active in 2009,
●    Several organizations like Sonatype, deliver
     resources and professional support,
●    A community less isolated : more interactions with
     Eclipse, Jetty,




       Licensed under a Creative Commons license
Commit Statistics




Licensed under a Creative Commons license
Apache Maven
CONCLUSION



   Licensed under a Creative Commons license
Conclusion
●    Today, Maven is widely adopted in corporate
     environments,
●    It provides many services,
●    It has an important and really active community of
     users and developers
●    Many resources to learn to use it and a
     professional support are available
●    A product probably far from being perfect but on
     rails for the future
●    Many things to do
     -    We need you !
          Licensed under a Creative Commons license
Apache Maven
QUESTIONS ?



   Licensed under a Creative Commons license
Licence et copyrights
●    Photos and logos belong to their respective
     authors/owners
●    Content under Creative Commons 3.0
     -    Attribution — You must attribute the work in the manner specified by the
          author or licensor (but not in any way that suggests that they endorse you or
          your use of the work).
     -    Noncommercial — You may not use this work for commercial
          purposes.
     -    Share Alike — If you alter, transform, or build upon this work, you may
          distribute the resulting work only under the same or similar license to this one.
●    http://creativecommons.org/licenses/by-nc-sa/3.0/us/


          Licensed under a Creative Commons license
Apache Maven
TO GO FURTHER …



   Licensed under a Creative Commons license
Apache Maven
DOCUMENTATIONS



   Licensed under a Creative Commons license
Some links
●    The main web site :
     -    http://maven.apache.org
●    Project’s team wiki :
     -    http://docs.codehaus.org/display/MAVEN
●    Project’s users wiki :
     -    http://docs.codehaus.org/display/MAVENUSER




          Licensed under a Creative Commons license
Books
●    Sonatype / O’Reilly :
     -    The Definitive Guide
     -    http://www.sonatype.com/
          books
     -    Free download
     -    Available in several
          languages
            ●    Soon in French




          Licensed under a Creative Commons license
Books
●    Exist Global
     -    Better builds with Maven
     -    http://www.maestrodev.com/
          better-build-maven
     -    Free download




          Licensed under a Creative Commons license
Books
●    Nicolas De loof
     Arnaud Héritier
     -    Published by Pearson
     -    Collection Référence
     -    Based on our own
          experiences with Maven.
          From beginners to experts.
     -    In French only
     -    Available on 20th November




          Licensed under a Creative Commons license
Apache Maven
SUPPORT



   Licensed under a Creative Commons license
Support
●    Mailing lists
     -    http://maven.apache.org/mail-lists.html
●    IRC
     -    irc.codehaus.org - #maven
●    Forums
     -  http://www.developpez.net/ forum maven
     -  In French
●    Dedicated support
     -    Sonatype and some others companies


          Licensed under a Creative Commons license
Apache Maven
ANNEXE



   Licensed under a Creative Commons license
Setup a global mirror
<settings>
 <mirrors>
  <mirror>
   <!--This sends everything else to /public -->
   <id>global-mirror</id>
   <mirrorOf>external:*</mirrorOf>
   <url>http://repository.exoplatform.org/content/groups/all</url>
  </mirror>
 </mirrors>
 <profiles>
  <profile>
   <id>mirror</id>
   <!--Enable snapshots for the built in central repo to direct -->
   <!--all requests to the repository manager via the mirror -->
   <repositories>
    <repository>
     <id>central</id>
     <url>http://central</url>
     <releases><enabled>true</enabled></releases>
     <snapshots><enabled>true</enabled></snapshots>
    </repository>
   </repositories>
   <pluginRepositories>
    <pluginRepository>
     <id>central</id>
     <url>http://central</url>
     <releases><enabled>true</enabled></releases>
     <snapshots><enabled>true</enabled></snapshots>
    </pluginRepository>
   </pluginRepositories>
  </profile>
 </profiles>
 <activeProfiles>
  <!--make the profile active all the time -->
  <activeProfile>mirror</activeProfile>
 </activeProfiles>
</settings>
       Licensed under a Creative Commons license

More Related Content

What's hot

An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to MavenJoao Pereira
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1MD Sayem Ahmed
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on trackArnaud Héritier
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 OverviewMike Ensor
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Introboyw165
 
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
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and AntDavid Noble
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Jdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsJdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsMert Çalışkan
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)François Le Droff
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with MavenSid Anand
 
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...Atlassian
 

What's hot (20)

An introduction to Maven
An introduction to MavenAn introduction to Maven
An introduction to Maven
 
An Introduction to Maven Part 1
An Introduction to Maven Part 1An Introduction to Maven Part 1
An Introduction to Maven Part 1
 
Java is evolving rapidly: Maven helps you staying on track
Java is evolving rapidly:  Maven helps you staying on trackJava is evolving rapidly:  Maven helps you staying on track
Java is evolving rapidly: Maven helps you staying on track
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Liferay maven sdk
Liferay maven sdkLiferay maven sdk
Liferay maven sdk
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Note - Apache Maven Intro
Note - Apache Maven IntroNote - Apache Maven Intro
Note - Apache Maven Intro
 
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
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Jdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsJdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent Projects
 
Maven basics
Maven basicsMaven basics
Maven basics
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)
 
Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
How the Atlassian Plugin SDK Cured Cancer and Reunited Soundgarden - Atlassia...
 

Viewers also liked

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é
 
Building Android apps with Maven
Building Android apps with MavenBuilding Android apps with Maven
Building Android apps with MavenFabrizio Giudici
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache MavenArnaud Héritier
 
Veni, Vide, Built: Android Gradle Plugin
Veni, Vide, Built: Android Gradle PluginVeni, Vide, Built: Android Gradle Plugin
Veni, Vide, Built: Android Gradle PluginLeonardo YongUk Kim
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android projectShaka Huang
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopconsam chiu
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Rajmahendra Hegde
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation ToolIzzet Mustafaiev
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Tomek Kaczanowski
 
Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Matthew McCullough
 
Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsJohn Smith
 
Maven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for AlfrescoMaven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for Alfrescoguest67a9ba
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersKostas Saidis
 
How to improve gradle build speed
How to improve gradle build speedHow to improve gradle build speed
How to improve gradle build speedFate Chang
 

Viewers also liked (20)

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
 
Building Android apps with Maven
Building Android apps with MavenBuilding Android apps with Maven
Building Android apps with Maven
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven
 
Maven 3.0 at Øredev
Maven 3.0 at ØredevMaven 3.0 at Øredev
Maven 3.0 at Øredev
 
Veni, Vide, Built: Android Gradle Plugin
Veni, Vide, Built: Android Gradle PluginVeni, Vide, Built: Android Gradle Plugin
Veni, Vide, Built: Android Gradle Plugin
 
Gradle enabled android project
Gradle enabled android projectGradle enabled android project
Gradle enabled android project
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon
 
Gradle in 45min
Gradle in 45minGradle in 45min
Gradle in 45min
 
Gradle
GradleGradle
Gradle
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012Gradle build tool that rocks with DSL JavaOne India 4th May 2012
Gradle build tool that rocks with DSL JavaOne India 4th May 2012
 
Gradle - the Enterprise Automation Tool
Gradle  - the Enterprise Automation ToolGradle  - the Enterprise Automation Tool
Gradle - the Enterprise Automation Tool
 
Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010Gradle talk, Javarsovia 2010
Gradle talk, Javarsovia 2010
 
Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3Mastering Maven 2.0 In 1 Hour V1.3
Mastering Maven 2.0 In 1 Hour V1.3
 
Drupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The BasicsDrupal Continuous Integration with Jenkins - The Basics
Drupal Continuous Integration with Jenkins - The Basics
 
Gradle by Example
Gradle by ExampleGradle by Example
Gradle by Example
 
Maven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for AlfrescoMaven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for Alfresco
 
Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
An Introduction to Gradle for Java Developers
An Introduction to Gradle for Java DevelopersAn Introduction to Gradle for Java Developers
An Introduction to Gradle for Java Developers
 
How to improve gradle build speed
How to improve gradle build speedHow to improve gradle build speed
How to improve gradle build speed
 

Similar to Alpes Jug (29th March, 2010) - Apache Maven

Apache Maven at GenevaJUG by Arnaud Héritier
Apache Maven at GenevaJUG by Arnaud HéritierApache Maven at GenevaJUG by Arnaud Héritier
Apache Maven at GenevaJUG by Arnaud HéritierGenevaJUG
 
Introduction in Apache Maven2
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2Heiko Scherrer
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools­Avishek A
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using MavenScheidt & Bachmann
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topicGourav Varma
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenMert Çalışkan
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Martin Bergljung
 
How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.Fazreil Amreen Abdul Jalil
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in MuleShahid Shaik
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldDmitry Bakaleinik
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
 

Similar to Alpes Jug (29th March, 2010) - Apache Maven (20)

Apache Maven at GenevaJUG by Arnaud Héritier
Apache Maven at GenevaJUG by Arnaud HéritierApache Maven at GenevaJUG by Arnaud Héritier
Apache Maven at GenevaJUG by Arnaud Héritier
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Introduction in Apache Maven2
Introduction in Apache Maven2Introduction in Apache Maven2
Introduction in Apache Maven2
 
Java Build Tools
Java Build ToolsJava Build Tools
Java Build Tools
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Apache Maven 2 Part 2
Apache Maven 2 Part 2Apache Maven 2 Part 2
Apache Maven 2 Part 2
 
Jenkins advance topic
Jenkins advance topicJenkins advance topic
Jenkins advance topic
 
4 maven junit
4 maven junit4 maven junit
4 maven junit
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
Alfresco DevCon 2018: SDK 3 Multi Module project using Nexus 3 for releases a...
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.How maven makes your development group look like a bunch of professionals.
How maven makes your development group look like a bunch of professionals.
 
Maven overview
Maven overviewMaven overview
Maven overview
 
Maven
MavenMaven
Maven
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
Maven
MavenMaven
Maven
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
 
P&MSP2012 - Maven
P&MSP2012 - MavenP&MSP2012 - Maven
P&MSP2012 - Maven
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 

More from Arnaud Héritier

Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMAArnaud Héritier
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsArnaud Héritier
 
Sonar In Action 20110302-vn
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vnArnaud Héritier
 
2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory OverviewArnaud Héritier
 
CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieArnaud Héritier
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkinsArnaud Héritier
 
eXo Software Factory Overview
eXo Software Factory OvervieweXo Software Factory Overview
eXo Software Factory OverviewArnaud Héritier
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXoArnaud Héritier
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsArnaud Héritier
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?Arnaud Héritier
 
20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation MavenArnaud Héritier
 
20081008 - Tours Jug - Apache Maven
20081008  - Tours Jug - Apache Maven20081008  - Tours Jug - Apache Maven
20081008 - Tours Jug - Apache MavenArnaud Héritier
 
20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation MavenArnaud Héritier
 
20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La DemandeArnaud Héritier
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache MavenArnaud Héritier
 

More from Arnaud Héritier (20)

Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMA
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les rails
 
Sonar In Action 20110302-vn
Sonar In Action 20110302-vnSonar In Action 20110302-vn
Sonar In Action 20110302-vn
 
2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview2014 August - eXo Software Factory Overview
2014 August - eXo Software Factory Overview
 
CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - Quickie
 
LavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promisesLavaJUG-Maven 3.x, will it lives up to its promises
LavaJUG-Maven 3.x, will it lives up to its promises
 
Hands on iOS developments with jenkins
Hands on iOS developments with jenkinsHands on iOS developments with jenkins
Hands on iOS developments with jenkins
 
eXo Software Factory Overview
eXo Software Factory OvervieweXo Software Factory Overview
eXo Software Factory Overview
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXo
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of Jenkins
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promises
 
YaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promisesYaJUG-Maven 3.x, will it lives up to its promises
YaJUG-Maven 3.x, will it lives up to its promises
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promises
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promises
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?
 
20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven
 
20081008 - Tours Jug - Apache Maven
20081008  - Tours Jug - Apache Maven20081008  - Tours Jug - Apache Maven
20081008 - Tours Jug - Apache Maven
 
20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven
 
20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven
 

Recently uploaded

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Alpes Jug (29th March, 2010) - Apache Maven

  • 1. Apache Maven - AlpesJUG - March 29th, 2010 Arnaud Héritier eXo Platform Software Factory Manager
  • 2. Arnaud Héritier ●  Software Factory Manager eXo platform -  In charge of tools and methods ●  Committer since 2004 and member of the Project Management Committee ●  Coauthor of « Apache Maven » published by Pearson (in French) Licensed under a Creative Commons license
  • 3. Apache Maven CHOOSE YOUR MENU Licensed under a Creative Commons license
  • 4. Overview ●  Definition ●  Maven or not Maven, that ●  History is the question ! -  Maven, the project choice ●  Concepts -  Maven, the corporate choice -  Conventions -  Competitors -  POM -  Reactor and Modules -  Inheritance -  Artifact Repository -  Dependency -  Version -  Profiles   Build Lifecycle And Plugins Licensed under a Creative Commons license
  • 5. Ecosystem ●  Repository Managers ●  Continuous Integration ●  Quality Management ●  IDE -  Tests Automation -  Eclipse -  Quality Metrics Reports -  Idea IntelliJ -  Project Reports -  Netbeans -  Sonar Licensed under a Creative Commons license
  • 6. Good & Bad Practices ●  K.I.S.S. ●  Project Organization ●  POM ●  Development Licensed under a Creative Commons license
  • 7. Usecases ●  Secure your credentials ●  Build a part of your project using reactor options ●  Automate your release process -  (at least the technical part) Licensed under a Creative Commons license
  • 8. Back to the future ●  Maven 2.x ●  Maven 3.x ●  Community Licensed under a Creative Commons license
  • 9. Apache Maven OVERVIEW Licensed under a Creative Commons license
  • 10. Definition ●  Apache Maven is a software project management and comprehension tool. ●  Based on the concept of a project object model (POM) -  Maven can manage a project's build, binaries, reporting and documentation from a central piece of information. Licensed under a Creative Commons license
  • 11. History ●  Initiated in 2001 by Jason Van Zyl in Alexandria, an Apache Jakarta project, ●  Moved to Turbine few months after, ●  Became a Top Level Project in 2003. ●  Maven 2.0 released in September 2005 ●  Maven 3.0 … coming soon !!! Licensed under a Creative Commons license
  • 12. Apache Maven CONCEPTS Licensed under a Creative Commons license 12
  • 13. Conventions ●  1 project = 1 artifact (pom, jar, war, ear, …) ●  Standardized -  directories layout ●  *.java to compile in src/[main|test]/java ●  *.xml, *.properties needed in classpath and to bundle in archive in src/[main|test]/java ●  … -  project descriptor (POM) -  build lifecycle Licensed under a Creative Commons license 13
  • 14. POM ●  An XML file (pom.xml) <?xml version="1.0" encoding="UTF-8"?>! <project>! <modelVersion>4.0.0</modelVersion>! ●  Describing <groupId>net.aheritier.samples</groupId>! <artifactId>simple-webapp</artifactId>! -  Project identification <version>1.1-SNAPSHOT</version>! <packaging>war</packaging>! -  Project version <name>Simple webapp</name>! -  Project description <inceptionYear>2007</inceptionYear>! <dependencies>! -  Build settings <dependency>! <groupId>org.springframework</groupId>! -  Dependencies <artifactId>spring-struts</artifactId>! -  … <version>2.0.2</version>! </dependency>! ...! </dependencies>! </project>! Licensed under a Creative Commons license
  • 15. Reactor ●  Split your project in <project>! sub-modules ...! <modules>! ●  Maven computes the <module>moduleA</module>! build order from <module>moduleB</module>! dependencies <module>moduleC</module>! between sub- <module>moduleD</module>! modules. <module>moduleE</module> ! ●  Modules have to be <module>moduleF</module>! defined in the POM </modules>! ...! -  No auto-discovery for </project>! performance reasons Licensed under a Creative Commons license
  • 16. Inheritance ●  Share settings between projects/modules ●  By default the parent project is supposed to be in the parent directory (../) <parent>! <groupId>net.aheritier.sample</groupId>! <artifactId>my-parent</artifactId>! <version>1.0.0-SNAPSHOT<version>! </parent>! Licensed under a Creative Commons license
  • 17. Inheritance Use a technical inheritance to organize sub-modules Use assembly to package batchs Insert README in all artifacts Use clirr to validate backward compatibility Licensed under a Creative Commons license
  • 18. Artifact Repository ●  By default : -  A central repository ●  http://repo1.maven.org/ maven2 ●  Several dozen of Gb of OSS libraries -  A local repository ●  ${user.home}/.m2/repository ●  All artifacts -  Used by maven and its plugins -  Used by your projects (dependencies) -  Produced by your projects Licensed under a Creative Commons license
  • 19. Artifact Repository ●  By default Maven downloads artifacts required by the project or itself from central ●  Downloaded artifacts are stored in the local repository ●  Used to store : -  Project’s binaries -  Project’s dependencies -  Maven and plug-ins binaries Licensed under a Creative Commons license
  • 20. Dependencies Without Maven With Maven Licensed under a Creative Commons license
  • 21. Dependencies ●  Declaratives -  groupId + artifactId + version (+ classifier) -  Type (packaging) : jar, war, pom, ear, … ●  Transitives -  Lib A needs Lib B -  Lib B needs Lib C -  Thus Lib A needs Lib C Licensed under a Creative Commons license
  • 22. Dependencies ●  Scope -  Compile (by default) : Required to build and run the application -  Runtime : not required to build the application but needed at runtime ●  Ex : taglibs -  Provided : required to build the application but not needed at runtime (provided by the container) ●  Ex : Servlet API, Driver SGBD, … -  Test : required to build and launch tests but not needed by the application itself to build and run ●  Ex : Junit, TestNG, DbUnit, … -  System : local library with absolute path ●  Ex : software products Licensed under a Creative Commons license
  • 23. Dependencies ●  Define all dependencies you are using -  and no more ! ●  If you have optional dependencies -  Perhaps you should have optional modules instead ●  Cleanup your dependencies with -  mvn dependency:analyze! ●  Study your dependencies with -  mvn dependency:tree! -  mvn dependency:list! Licensed under a Creative Commons license
  • 24. Versions ●  Project and dependency versions ●  Two different version variants   SNAPSHOT version ●  The version number ends with –SNAPSHOT ●  The project is in development ●  Deliveries are changing over the time and are overridden after each build ●  Artifacts are deployed with a timestamp on remote repositories   RELEASE version ●  The version number doesn’t end with –SNAPSHOT ●  Binaries won’t change Licensed under a Creative Commons license
  • 25. Versions Licensed under a Creative Commons license
  • 26. Versions ●  About SNAPSHOT dependencies -  Maven allows the configuration of an update policy. The update policy defines the recurrence of checks if there is a new SNAPSHOT version available on the remote repository : ●  always ●  daily (by default) ●  interval:X (a given period in minutes) ●  never -  Must not be used in a released project ●  They can change thus the release also  ●  The release plugin will enforce it  Licensed under a Creative Commons license
  • 27. Versions ●  Range -  From … to … -  Maven automatically searches for the corresponding version (using the update policy for released artifacts) -  To use with caution ●  Risk of non reproducibility of the build ●  Risk of side effects on projects depending on yours. Licensed under a Creative Commons license
  • 28. Versions ●  Use the versions plugin to update all versions of your project and its modules mvn versions:set –DnewVersion=A.B.C-SNAPSHOT! Licensed under a Creative Commons license
  • 29. Profiles ●  Allow to modify the default behavior of Maven by overriding/adding some settings ●  Use mvn help:active-profiles to debug ●  Explicit activation or deactivation mvn <phases or goals> ! -PprofileId1,-profileId2 ! -P!profileId3! Licensed under a Creative Commons license
  • 30. Profiles ●  activeByDefault = If no other profile is activated ●  Activation through Maven settings <settings>! ...! <activeProfiles>! <activeProfile>profile-1</activeProfile>! </activeProfiles>! ...! </settings>! Licensed under a Creative Commons license
  • 31. Profiles ●  Activation based on environment variables <profiles>! <profiles>! <profile>! <profile>! <activation>! <activation>! <property>! <property>! <name>run-its</name>! <name>!skip-enforce</name>! <value>true</value>! </property>! </property>! </activation>! </activation>! ...! ...! </profile>! </profile>! </profiles>! </profiles>! Licensed under a Creative Commons license
  • 32. Profiles ●  OS / Java settings <profiles>! <profile>! <profiles>! <activation>! <os>! <profile>! <name>Windows XP</name>! <activation>! <family>Windows</family>! <jdk>[1.3,1.6)</jdk>! <arch>x86</arch>! </activation>! <version>5.1.2600</version>! ...! </os>! </profile>! </activation>! </profiles>! ...! </profile>! </profiles>! Licensed under a Creative Commons license
  • 33. Profiles ●  Activation on present or missing files <profiles>! <profile>! <activation>! <file>! <missing>${project.build.directory}/generated-sources/ axistools/wsdl2java/</missing>! </file>! </activation>! ...! </profile>! </profiles>! Licensed under a Creative Commons license
  • 34. Build Lifecycle And Plugins ●  Plugin based architecture for a great extensibility ●  Standardized lifecycle to build all types of archetypes Licensed under a Creative Commons license
  • 35. Build Lifecycle And Plugins Default Lifecycle Clean Lifecycle Site Lifecycle validate pre-clean pre-site initialize clean site generate-sources post-clean post-site process-sources site-deploy generate-resources process-resources compile process-classes generate-test-sources process-test-sources generate-test-resources process-test-resources test-compile process-test-classes test prepare-package package pre-integration-test integration-test post-integration-test verify install deploy Licensed under a Creative Commons license
  • 36. Build Lifecycle And Plugins ●  Many plugins -  Packaging -  Reporting -  IDE integration -  Miscellaneous tools integration ●  Many locations -  maven.apache.org -  mojo.codehaus.org -  code.google.com -  … Licensed under a Creative Commons license
  • 37. Apache Maven MAVEN OR NOT MAVEN, THAT IS THE QUESTION ! Licensed under a Creative Commons license
  • 38. Maven, the project’s choice ●  Application’s architecture -  The project has the freedom to divide the application in modules -  Maven doesn’t limit the evolution of the application architecture ●  Dependencies management -  Declarative : Maven automatically downloads them and builds the classpath -  Transitive : We define only what the module needs itself Licensed under a Creative Commons license
  • 39. Maven, the project’s choice ●  Centralizes and automates -  Builds all development facets -  Tests (build, tests, releases) -  Packages ●  One thing it cannot do for -  Deploys you : to develop  -  Documents -  Checks and reports about the quality of developments Licensed under a Creative Commons license
  • 40. Maven, the corporate’s choice ●  Widely adopted and known -  Many developers ●  Developments are standardized ●  Decrease of costs -  Reuse of knowledge -  Reuse of configuration fragments -  Reuse of process and code fragments ●  Product quality improvement -  Reports and monitoring Licensed under a Creative Commons license
  • 41. Competitors ●  Ant + Ivy, Easy Ant, Gant, Gradle, Buildr… ●  Script oriented -  You can do what you want ! ●  Reuse many of Maven conventions (directories layout, …) and services (repositories) but without enforcing them ●  The risk for them : Not being able to evolve due to the too high level of customization proposed to the user. -  We tried on Maven 1 and it died because of that. It was impossible to create a set of tests to cover all usages. -  It’s like providing a framework without public API  Licensed under a Creative Commons license
  • 42. With scripts oriented builds You can have But often you have Licensed under a Creative Commons license
  • 43. With Maven We dream to deliver But today we have too often Maven 3.x ? Maven 2.x Licensed under a Creative Commons license
  • 44. Apache Maven ECOSYSTEM Licensed under a Creative Commons license
  • 45. Maven’s ecosytem ●  Maven alone is nothing ●  You can integrate it with many tools -  A large set of plug-ins is already available -  You can define your own plug-ins Licensed under a Creative Commons license
  • 46. Apache Maven REPOSITORY MANAGERS Licensed under a Creative Commons license
  • 47. Repository Managers ●  Several products ●  Basic services -  Sonatype Nexus (replaced -  Search artifacts Proximity) -  Browse repositories -  Jfrog Artifactory -  Proxy external repositories -  Apache Archiva -  Host internal repositories -  Security Licensed under a Creative Commons license
  • 48. Secure your builds ●  Deploy a repository manager to proxy externals repositories to : -  Avoid external network outages -  Avoid external repository unavailabilities -  To reduce your company’s external network usage -  To increase the speed of artifact downloads ●  Additional services offered by such servers : -  Artifacts procurement to filter what is coming from the outside -  Staging repository to validate your release before deploying it Licensed under a Creative Commons license
  • 49. Nexus for productivity Licensed under a Creative Commons license
  • 50. Nexus for collaboration ●  Deploy 3rd Party Artifacts ●  Collaborate with Internal Repositories ●  Distribute to the community with Public Repositories ●  Distribute to customers with Private Repositories Licensed under a Creative Commons license
  • 51. Nexus for quality ●  Ease the Burden on Central and others remote repositories ●  Gain Predictability and Scalability ●  Control and Audit Dependencies and Releases ●  Stage releases Licensed under a Creative Commons license
  • 52. Apache Maven QUALITY MANAGEMENT Licensed under a Creative Commons license
  • 53. Tests Automation ●  Use automated tests as often as you can ●  Many tools are available through Maven -  JUnit, TestNG – unit tests, -  Selenium, Canoo – web GUI test, -  Fitnesse, Greenpepper – functional tests, -  SoapUI – web services tests -  JMeter – performances tests -  And many more frameworks are available to reply your needs Licensed under a Creative Commons license
  • 54. Quality Metrics ●  Extract quality metrics from your project and monitor them : -  Code style (CheckStyle) -  Bad practices or potential bugs (PMD, FindBugs, Clirr) -  Tests coverage (Cobertura, Emma, Clover) -  … ●  You can use blocking rules -  For example, I break the build if the upward compatibility of public APIs is broken ●  You can use reports -  Reports are available in a web site generated by Maven -  Or in a quality dashboard like Sonar Licensed under a Creative Commons license
  • 55. Dependency Report Licensed under a Creative Commons license
  • 56. Sonar, a quality dashboard Licensed under a Creative Commons license
  • 57. Sonar, analyze your project Licensed under a Creative Commons license
  • 58. Sonar, Continuous Improvement ? Licensed under a Creative Commons license
  • 59. Apache Maven CONTINUOUS INTEGRATION Licensed under a Creative Commons license
  • 60. Continuous Integration ●  Setup a continuous integration server to : -  Have a neutral and unmodified environment to run your tests -  Quickly react when ●  The build fails (compilation failure for example) ●  A test fails ●  A quality metric is bad -  Continuously improve the quality of your project and your productivity ●  Many products -  Hudson, Bamboo, TeamCity, Continuum, Cruisecontrol, … Licensed under a Creative Commons license
  • 61. Hudson, how the weather is ? Licensed under a Creative Commons license
  • 62. Hudson : build, test, check Licensed under a Creative Commons license
  • 63. Apache Maven IDE Licensed under a Creative Commons license
  • 64. Eclipse Licensed under a Creative Commons license
  • 65. Eclipse Licensed under a Creative Commons license
  • 66. Eclipse Licensed under a Creative Commons license
  • 67. Idea IntelliJ Licensed under a Creative Commons license
  • 68. Netbeans Licensed under a Creative Commons license
  • 69. Apache Maven GOOD & BAD PRACTICES Licensed under a Creative Commons license
  • 70. Apache Maven KISS Licensed under a Creative Commons license
  • 71. K.I.S.S. ●  Keep It Simple, Stupid ●  Start from scratch -  Do not copy/paste what you find without understanding ●  Use only what you need -  It’s not because maven offers many features that you need to use them ●  Filtering ●  Modules ●  Profiles ●  … Licensed under a Creative Commons license
  • 72. Apache Maven PROJECT ORGANIZATION GOOD & BAD PRACTICES Licensed under a Creative Commons license
  • 73. Project bad practices ●  Ignore Maven conventions -  Except if your are migrating from something else and the target has to be to follow them. -  Except if they are not compatible with your IDE ●  Different versions in sub-modules -  In that case they are standalone projects. ●  Too many inheritance levels -  It makes the POMs maintenance more complex -  Where should I set this plugin parameter ? In which parent ? Licensed under a Creative Commons license
  • 74. Project bad practices ●  Have too many modules -  Is there a good reason ? ●  Technical constraint ? ●  Team organization ? -  It increases the build time ●  Many more artifacts to generate ●  Dependencies resolution more complex -  It involves more complex developments ●  More modules to import in your IDE ●  More modules to update … Licensed under a Creative Commons license
  • 75. Project good practices ●  Use the default inheritance : -  The reactor project is also the parent of its modules. -  Configuration is easier : ●  No need to redefine SCM settings, site distribution settings … Licensed under a Creative Commons license
  • 76. Apache Maven POM GOOD & BAD PRACTICES Licensed under a Creative Commons license
  • 77. POM bad practices ●  Dependencies : -  DON’T confuse dependencies and dependencyManagement ●  Plugins : -  DON’T confuse plugins and pluginManagement -  DON’T use AntRun plugin everywhere -  DON’T let Maven choose plugins versions for you Licensed under a Creative Commons license
  • 78. POM bad practices ●  Profiles : -  DON’T create environment dependant builds -  DON’T rely on dependencies coming from profiles (there is no transitive activation of profiles) ●  Reporting and quality -  DON’T activate on an existing project all reports with default configuration -  DON’T control formatting rules without giving settings for IDEs. ●  DON’T put everything you find in your POM. Licensed under a Creative Commons license
  • 79. POM good practices ●  Set versions of dependencies in project parent’s dependencyManagement ●  Set dependencies (groupId, artifactId, scope) in each module they are used ●  Use the dependency plugin (from apache) and versions plugin (from mojo) to analyze, cleanup and update your dependencies. Licensed under a Creative Commons license
  • 80. Apache Maven DEVELOPMENT GOOD & BAD PRACTICES Licensed under a Creative Commons license
  • 81. Development bad practices ●  DON’T spend your time in the terminal, ●  DON’T exchange libraries through emails, ●  DON’T always use "-Dmaven.test.skip=true” ●  DON’T manually do releases Licensed under a Creative Commons license
  • 82. Development good practices ●  Keep up-to-date your version of Maven -  For example in 2.1 the time of dependencies/modules resolution decreased a lot (Initialization of a project of 150 modules passed from 8 minutes to less than 1) ●  Use the reactor plugin (Maven < 2.1) or native reactor command line options (Maven >= 2.1) to rebuild only a subpart of your project : -  All modules depending on module XXX -  All modules used to build XXX ●  Try to not use Maven features not supported by your IDE (resources filtering with the plugin eclipse:eclipse) Licensed under a Creative Commons license
  • 83. Apache Maven USECASES Licensed under a Creative Commons license
  • 84. Apache Maven SECURE YOUR CREDENTIALS Licensed under a Creative Commons license
  • 85. Secure your credentials ●  Generate a private key -  
 arnaud@leopard:~$ mvn --encrypt-master-password toto
 {dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}
 ●  We save the private key in ~/.m2/settings-security.xml <settingssecurity>! <master>{dZPuZ74YTJ0HnWHGm4zgfDlruYQNda1xib9vAVf2vvY=}</master>! </settingssecurity>! Licensed under a Creative Commons license
  • 86. Secure your credentials ●  You can move this key to another drive ~/.m2/settings.xml -  <settingssecurity>
 <relocation>/Volumes/ArnaudUsbKey/secure/settings-security.xml</relocation>
 </settingssecurity>! ●  You create an encrypted version of your server password -  arnaud@mbp-arnaud:~$ mvn --encrypt-password titi {SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}! ●  You register it in your settings -  <settings>
 ...
 <servers>
 ...
 <server>
 <id>mon.server</id>
 <username>arnaud</username>
 <password>{SbC9Fl2jA4oHZtz5Fcefp2q1tMXEtBkz9QiKljPiHss=}</password>
 </server>
 ...
 </servers>
 ...
 </settings>! Licensed under a Creative Commons license
  • 87. Apache Maven BUILD A PART OF YOUR PROJECT Licensed under a Creative Commons license
  • 88. Reactor options (Maven > 2.1) -  arnaud@mbp-arnaud:~$ mvn install
 [INFO] ------------------------------------------------
 [INFO] Reactor Summary:
 [INFO]
 [INFO] Project ....................... SUCCESS [2.132s]
 [INFO] ModuleA ....................... SUCCESS [5.574s]
 [INFO] ModuleB ....................... SUCCESS [0.455s]
 [INFO] ModuleC ....................... SUCCESS [0.396s]
 [INFO] ModuleD ....................... SUCCESS [0.462s]
 [INFO] ModuleE ....................... SUCCESS [0.723s]
 [INFO] ModuleF ....................... SUCCESS [0.404s] ! ●  Builds everything from A to F Licensed under a Creative Commons license
  • 89. Reactor options (Maven > 2.1) -  arnaud@mbp-arnaud:~$ mvn install –pl moduleE,moduleB
 [INFO] -------------------------------------------
 [INFO] Reactor Summary:
 [INFO]
 [INFO] ModuleB .................. SUCCESS [2.774s]
 [INFO] ModuleE .................. SUCCESS [1.008s]
 ●  Builds only modules B and E ●  Following dependencies order ●  -pl --project-list: Build the specified reactor projects instead of all projects Licensed under a Creative Commons license
  • 90. Reactor options (Maven > 2.1) -  arnaud@mbp-arnaud:~$ mvn install –pl moduleD -am
 [INFO] ------------------------------------------
 [INFO] Reactor Summary:
 [INFO]
 [INFO] ModuleA ................. SUCCESS [4.075s]
 [INFO] ModuleB ................. SUCCESS [0.468s]
 [INFO] ModuleC ................. SUCCESS [0.354s]
 [INFO] ModuleD ................. SUCCESS [0.384s]
 ●  Builds module D (-pl) and all modules it uses as dependencies ●  -am --also-make: If a project list is specified, also make projects that the list depends on ●  Usecase : Build all modules required for a war, ear, … Licensed under a Creative Commons license
  • 91. Reactor options (Maven > 2.1) -  arnaud@mbp-arnaud:~$ mvn install –pl moduleD -amd
 [INFO] ------------------------------------------
 [INFO] Reactor Summary:
 [INFO]
 [INFO] ModuleD ................. SUCCESS [4.881s]
 [INFO] ModuleE ................. SUCCESS [0.478s]
 [INFO] ModuleF ................. SUCCESS [0.427s]
 ●  Builds module D (-pl) and all modules which depend on it ●  -amd --also-make-dependents: If a project list is specified, also make projects that depend on projects on the list ●  Usecase : Check that a change in a module didn’t break others which are using it Licensed under a Creative Commons license
  • 92. Apache Maven RELEASE YOUR PROJECT Licensed under a Creative Commons license
  • 93. Release of a webapp in 2002 ●  Limited usage of eclipse -  No WTP (Only some features in WSAD), -  No ability to produce WARs Licensed under a Creative Commons license
  • 94. Release of a webapp in 2002 ●  Many manual tasks -  Modify settings files -  Package JARs -  Copy libraries (external and internal) in a « lib » directory -  Package WAR (often with a zip command) -  Tag the code (CVS) -  Send the package on the integration server using FTP -  Deploy the package with AS console Licensed under a Creative Commons license
  • 95. Release of a webapp in 2002 ●  One problem : The are ●  How long did it take ? always problems -  When everything is ok : 15 -  Error in config files minutes -  Missing dependencies -  When there’s a problem : ½ -  Missing file day or more -  Last minute fix which created a bug -  And many other possibilies .. Licensed under a Creative Commons license
  • 96. Maven Release Plugin ●  Automates the release process from tagging sources to binaries delivery ●  Release plugin main goals: -  Prepare : To update maven versions and information in POMs and tag the code -  Perform : To deploy binaries in a maven repository ●  After that you can just automate the deployment on the AS using cargo for example. Licensed under a Creative Commons license
  • 97. Maven Release Plugin Licensed under a Creative Commons license
  • 98. Configuration and Prerequisites ●  Project version (must be a SNAPSHOT version) ●  Dependencies and plugins versions mustn’t be SNAPSHOTs Licensed under a Creative Commons license
  • 99. SCM configuration ●  SCM binaries have to be in the PATH ●  SCM credentials have to already be stored or you have to pass them in command line with : –Dusername=XXX –Dpassword=XXX <scm> <connection> scm:svn:http://svn.exoplatform.org/projects/parent/trunk </connection> <developerConnection> scm:svn:http://svn.exoplatform.org/projects/parent/trunk </developerConnection> <url> http://fisheye.exoplatform.org/browse/projects/parent/trunk </url> </scm> Licensed under a Creative Commons license
  • 100. Distribution Management <project> <distributionManagement> <repository> <id>repository.exoplatform.org</id> <url>${exo.releases.repo.url}</url> </repository> . . . </distributionManagement> . . . <properties> <exo.releases.repo.url> http://repository.exoplatform.org/content/repositories/exo-releases </exo.releases.repo.url> . . . </properties> </project> Licensed under a Creative Commons license
  • 101. Repository credentials <settings> <servers> <server> <!–- id must be the one used in distributionManagement --> <id>repository.exoplatform.org</id> <username>aheritier</username> <password>{ABCDEFGHIJKLMNOPQRSTUVWYZ}</password> </server> </servers> </settings> Licensed under a Creative Commons license
  • 102. Default Release Profile in Super POM <profile> <id>release-profile</id> <activation> <property> <name>performRelease</name> <value>true</value> </property> </activation> <build> <plugins> <!–- Configuration to generate sources and javadoc jars --> ... </plugins> </build> </profile> Licensed under a Creative Commons license
  • 103. Custom release profile <project> ... ... <profiles> <build> <profile> <pluginManagement> <id>myreleaseprofile</id> <plugins> <build> <plugin> <!-– what you want to customize the behavior of the build when you do a release --> <groupId>org.apache.maven.plugins</groupId> </build> <artifactId>maven-release-plugin</artifactId> </profile> <version>2.0-beta-9</version> </profiles> <configuration> ... <useReleaseProfile>false</useReleaseProfile> </project> <arguments>-Pmyreleaseprofile</arguments> </configuration> </plugin> </plugins> </pluginManagement> </build> Licensed under a Creative Commons license
  • 104. Troubleshooting Releases ●  Common errors during release: -  Build with release profile was tested before and fails -  Local modifications -  Current version is not a SNAPSHOT -  SNAPSHOTs in dependencies and/or plugins -  Missing some configuration (scm, distribMgt, …) -  Tag already exists -  Unable to deploy project to the Repository -  Connection problems Licensed under a Creative Commons license
  • 105. Apache Maven BACK TO THE FUTURE Licensed under a Creative Commons license
  • 106. Apache Maven PRODUCT Licensed under a Creative Commons license
  • 107. Apache Maven 2.0.x ●  bugs fix ●  Last release : 2.0.11 ●  No other release of 2.0.x in the future Licensed under a Creative Commons license
  • 108. Apache Maven 2.x ●  Evolutions, new features ●  Several important new features in 2.1 like -  Parallel downloads -  Encrypted passwords ●  Last release : 2.2.1 Licensed under a Creative Commons license
  • 109. Apache Maven 3.x ●  Do not be afraid !!!!! ●  Not final before at least one year ●  Full compatibility with maven 2.x projects Licensed under a Creative Commons license
  • 110. Apache Maven 3.x ●  What’s new : -  How POMs are constructed -  How the lifecycle is executed -  How the plugin manager executes -  How artifacts are resolved -  How it can be embedded -  How dependency injection is done Licensed under a Creative Commons license
  • 111. Apache Maven 3.x ●  What it will change for maven users ? -  Any-source POM -  Versionless parent elements -  Mixins : a compositional form of Maven POM configuration -  Better IDE integration -  Error & integrity reporting ●  Much improved error reporting where we will provide links to each identifiable problem we know of. There are currently 42 common things that can go wrong. ●  Don't allow builds where versions come from non-project sources like local settings and CLI parameters ●  Don't allow builds where versions come from profiles that have to be activated manually Licensed under a Creative Commons license
  • 112. Apache Maven 3.x ●  What it will change for maven developers ? -  Lifecycle extension points -  Plugin extension points -  Incremental build support -  Queryable lifecycle -  Extensible reporting Licensed under a Creative Commons license
  • 113. Apache Maven 3.x ●  New tools -  Tycho : OSGI, Eclipse -  Mvnsh Licensed under a Creative Commons license
  • 114. Maven Shell Licensed under a Creative Commons license
  • 115. Apache Maven COMMUNITY Licensed under a Creative Commons license
  • 116. Users community ●  1780 subscribers on users mailing list ●  90 days statistics ●  Number of subscribers in blue ●  Number of messages per day in red Licensed under a Creative Commons license
  • 117. The web site Licensed under a Creative Commons license
  • 118. Dowloads ●  Per month downloads Licensed under a Creative Commons license
  • 119. The team ●  60 committers, ●  More than 30 active in 2009, ●  Several organizations like Sonatype, deliver resources and professional support, ●  A community less isolated : more interactions with Eclipse, Jetty, Licensed under a Creative Commons license
  • 120. Commit Statistics Licensed under a Creative Commons license
  • 121. Apache Maven CONCLUSION Licensed under a Creative Commons license
  • 122. Conclusion ●  Today, Maven is widely adopted in corporate environments, ●  It provides many services, ●  It has an important and really active community of users and developers ●  Many resources to learn to use it and a professional support are available ●  A product probably far from being perfect but on rails for the future ●  Many things to do -  We need you ! Licensed under a Creative Commons license
  • 123. Apache Maven QUESTIONS ? Licensed under a Creative Commons license
  • 124. Licence et copyrights ●  Photos and logos belong to their respective authors/owners ●  Content under Creative Commons 3.0 -  Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). -  Noncommercial — You may not use this work for commercial purposes. -  Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. ●  http://creativecommons.org/licenses/by-nc-sa/3.0/us/ Licensed under a Creative Commons license
  • 125. Apache Maven TO GO FURTHER … Licensed under a Creative Commons license
  • 126. Apache Maven DOCUMENTATIONS Licensed under a Creative Commons license
  • 127. Some links ●  The main web site : -  http://maven.apache.org ●  Project’s team wiki : -  http://docs.codehaus.org/display/MAVEN ●  Project’s users wiki : -  http://docs.codehaus.org/display/MAVENUSER Licensed under a Creative Commons license
  • 128. Books ●  Sonatype / O’Reilly : -  The Definitive Guide -  http://www.sonatype.com/ books -  Free download -  Available in several languages ●  Soon in French Licensed under a Creative Commons license
  • 129. Books ●  Exist Global -  Better builds with Maven -  http://www.maestrodev.com/ better-build-maven -  Free download Licensed under a Creative Commons license
  • 130. Books ●  Nicolas De loof Arnaud Héritier -  Published by Pearson -  Collection Référence -  Based on our own experiences with Maven. From beginners to experts. -  In French only -  Available on 20th November Licensed under a Creative Commons license
  • 131. Apache Maven SUPPORT Licensed under a Creative Commons license
  • 132. Support ●  Mailing lists -  http://maven.apache.org/mail-lists.html ●  IRC -  irc.codehaus.org - #maven ●  Forums -  http://www.developpez.net/ forum maven -  In French ●  Dedicated support -  Sonatype and some others companies Licensed under a Creative Commons license
  • 133. Apache Maven ANNEXE Licensed under a Creative Commons license
  • 134. Setup a global mirror <settings> <mirrors> <mirror> <!--This sends everything else to /public --> <id>global-mirror</id> <mirrorOf>external:*</mirrorOf> <url>http://repository.exoplatform.org/content/groups/all</url> </mirror> </mirrors> <profiles> <profile> <id>mirror</id> <!--Enable snapshots for the built in central repo to direct --> <!--all requests to the repository manager via the mirror --> <repositories> <repository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!--make the profile active all the time --> <activeProfile>mirror</activeProfile> </activeProfiles> </settings> Licensed under a Creative Commons license