SlideShare a Scribd company logo
1 of 18
Download to read offline
Releasing Projects 
        Using Maven


                 Deng Ching
      Senior Software Engineer – G2iX



                     
Maven is a software project 
    management and build comprehension 
      tool. Based on the concept of a 
     project object model (POM), Maven 
       can manage a project's build, 
    reporting and documentation from a 
       central piece of information.



                     
Maven Concepts
       POM – Project Object Model
       Artifact
       Dependency
       Build lifecycle
       Maven plugins
       Multi­module projects
       $USER_HOME/.m2/

                           
How Maven Works...




             
The Maven POM
       Artifact coordinates:
           groupId
           artifactId
           version (SNAPSHOTs vs. releases)
       Modules
       Build management
       Reporting
       Profiles
                              
Releasing Projects Using 
                  Maven
       Release early, release often
       Maven Release plugin




                         
Configuration and Pre­
                requisites
        Project version (must be a SNAPSHOT 
         version)
        Dependency and plugin versions
        SCM configuration
<scm>
  <connection>scm:svn:http://svn.pinoyjug.org/sample/trunk</connection>
  <developerConnection>scm:svn:http://svn.pinoyjug.org/sample/trunk</developerConnection>
  <url>http://svn.pinoyjug.org/sample/trunk</url>
</scm>




                                            
Configuration and Pre­
                requisites

       Distribution Management config
        <distributionManagement>
          <repository>
            <id>releases</id>
            <name>Internal Releases Repository</name>
            <url>http://localhost:8081/archiva/repository/releases</url>
          </repository>
          <snapshotsRepository>
            <id>releases</id>
            <name>Internal Snapshots Repository</name>
            <url>http://localhost:8081/archiva/repository/snapshots</url>
          </snapshotsRepository>
        </distributionManagement>




                                          
Configuration and Pre­
                 requisites
        settings.xml configuration
        <settings>
          <servers>
            <server>
              <id>releases</id>
              <name>Internal Releases Repository</name>
              <username>deng</username>
              <password>pass1<password>
            </server>
            <server>
              <id>snapshots</id>
              <name>Internal Snapshots Repository</name>
              <username>deng</username>
              <password>pass1<password>
            </server>
          </servers>
        </settings>
                                       
Maven Release Plugin
       release goals:
           prepare
           perform
           clean
           rollback
           stage
           branch



                          
Maven Release Profile
       Super POM
        <profile>
          <id>release­profile</id>
          <activation>
            <property>
              <name>performRelease</name>
              <value>true</value>
            </property>
          </activation>
          <build>
            <plugins>
              ...
            </plugins>
          </build>
        </profile>




                                      
Maven Release Profile
       Custom release profile
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven­release­plugin</artifactId>
          <version>2.0­beta­9</version>
          <configuration>
            <useReleaseProfile>false</useReleaseProfile>
            <arguments>­Pcustom­release­profile</arguments>
          </configuration>
        </plugin>




                                      
Maven Release Process
       release:prepare
           check for SNAPSHOTs
           versioning 
           check for build errors
           create tag
       release:perform
           deploy project
           release cleanup

                               
Troubleshooting Releases

       Common errors during release:
           local modifications 
           current version is not a SNAPSHOT
           SNAPSHOT dependencies and plugins
           missing <scm> configuration
           tag already exists




                              
Troubleshooting Releases

       Common errors during release:
           unable to deploy project to the 
            repository
           connection problems




                              
Resources
       http://maven.apache.org
       Apache Maven 2 Effective 
        Implementations book




                         
Questions?




         
Thank You...




          

More Related Content

What's hot

ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEsoftTech
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
 

What's hot (20)

JSF, Facelets, Spring-JSF & Maven
JSF, Facelets, Spring-JSF & MavenJSF, Facelets, Spring-JSF & Maven
JSF, Facelets, Spring-JSF & Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Maven in Mule
Maven in MuleMaven in Mule
Maven in Mule
 
ICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax FrameworkICEfaces EE - Enterprise-ready JSF Ajax Framework
ICEfaces EE - Enterprise-ready JSF Ajax Framework
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!
 
Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010Deep Dive Hands-on in Java EE 6 - Oredev 2010
Deep Dive Hands-on in Java EE 6 - Oredev 2010
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and Flex
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
Algotitmo Moinho
Algotitmo MoinhoAlgotitmo Moinho
Algotitmo Moinho
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Maven
MavenMaven
Maven
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 

Viewers also liked

Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011
Ching Yi Chan
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
Enpel
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
Muhammad Mansoor
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
James Bayer
 

Viewers also liked (19)

Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Java build tool_comparison
Java build tool_comparisonJava build tool_comparison
Java build tool_comparison
 
Building java projects with maven
Building java projects with mavenBuilding java projects with maven
Building java projects with maven
 
Java Build Tool course in 2011
Java Build Tool course in 2011Java Build Tool course in 2011
Java Build Tool course in 2011
 
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
2 TomcatによるWebアプリケーションサーバ構築 第2章 Tomcat概要(3)-フォルダ構造、マネージャツール
 
Manen Ant SVN
Manen Ant SVNManen Ant SVN
Manen Ant SVN
 
Java Builds with Maven and Ant
Java Builds with Maven and AntJava Builds with Maven and Ant
Java Builds with Maven and Ant
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
JEE Programming - 07 EJB Programming
JEE Programming - 07 EJB ProgrammingJEE Programming - 07 EJB Programming
JEE Programming - 07 EJB Programming
 
JBoss Application Server 7
JBoss Application Server 7JBoss Application Server 7
JBoss Application Server 7
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
 
Weblogic configuration & administration
Weblogic   configuration & administrationWeblogic   configuration & administration
Weblogic configuration & administration
 
Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
 
Where and when to use the Oracle Service Bus (OSB)
Where and when to use the Oracle Service Bus (OSB)Where and when to use the Oracle Service Bus (OSB)
Where and when to use the Oracle Service Bus (OSB)
 
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
Oracle SOA Suite 11g Mediator vs. Oracle Service Bus (OSB)
 
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
WebSphere App Server vs JBoss vs WebLogic vs Tomcat (InterConnect 2016)
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
Oracle OSB Tutorial 1
Oracle OSB Tutorial 1Oracle OSB Tutorial 1
Oracle OSB Tutorial 1
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 

Similar to Releasing Projects Using Maven

Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
Alan Parkinson
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
Renato Primavera
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
elliando dias
 

Similar to Releasing Projects Using Maven (20)

Maven advanced
Maven advancedMaven advanced
Maven advanced
 
Maven
MavenMaven
Maven
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
Continuous Deployment Pipeline with maven
Continuous Deployment Pipeline with mavenContinuous Deployment Pipeline with maven
Continuous Deployment Pipeline with maven
 
Hands On with Maven
Hands On with MavenHands On with Maven
Hands On with Maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Liferay maven sdk
Liferay maven sdkLiferay maven sdk
Liferay maven sdk
 
Apache maven, a software project management tool
Apache maven, a software project management toolApache maven, a software project management tool
Apache maven, a software project management tool
 
maven
mavenmaven
maven
 
Maven
MavenMaven
Maven
 
Maven
MavenMaven
Maven
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Using Maven2
Using Maven2Using Maven2
Using Maven2
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Using Maven 2
Using Maven 2Using Maven 2
Using Maven 2
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
Ant, Maven and Jenkins
Ant, Maven and JenkinsAnt, Maven and Jenkins
Ant, Maven and Jenkins
 
Introduction to Maven
Introduction to MavenIntroduction to Maven
Introduction to Maven
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 

Releasing Projects Using Maven

  • 1. Releasing Projects  Using Maven Deng Ching Senior Software Engineer – G2iX    
  • 2. Maven is a software project  management and build comprehension  tool. Based on the concept of a  project object model (POM), Maven  can manage a project's build,  reporting and documentation from a  central piece of information.    
  • 3. Maven Concepts  POM – Project Object Model  Artifact  Dependency  Build lifecycle  Maven plugins  Multi­module projects  $USER_HOME/.m2/    
  • 5. The Maven POM  Artifact coordinates:  groupId  artifactId  version (SNAPSHOTs vs. releases)  Modules  Build management  Reporting  Profiles    
  • 6. Releasing Projects Using  Maven  Release early, release often  Maven Release plugin    
  • 7. Configuration and Pre­ requisites  Project version (must be a SNAPSHOT  version)  Dependency and plugin versions  SCM configuration <scm>   <connection>scm:svn:http://svn.pinoyjug.org/sample/trunk</connection>   <developerConnection>scm:svn:http://svn.pinoyjug.org/sample/trunk</developerConnection>   <url>http://svn.pinoyjug.org/sample/trunk</url> </scm>    
  • 8. Configuration and Pre­ requisites  Distribution Management config <distributionManagement>   <repository>     <id>releases</id>     <name>Internal Releases Repository</name>     <url>http://localhost:8081/archiva/repository/releases</url>   </repository>   <snapshotsRepository>     <id>releases</id>     <name>Internal Snapshots Repository</name>     <url>http://localhost:8081/archiva/repository/snapshots</url>   </snapshotsRepository> </distributionManagement>    
  • 9. Configuration and Pre­ requisites  settings.xml configuration <settings>   <servers>     <server>       <id>releases</id>       <name>Internal Releases Repository</name>       <username>deng</username>       <password>pass1<password>     </server>     <server>       <id>snapshots</id>       <name>Internal Snapshots Repository</name>       <username>deng</username>       <password>pass1<password>     </server>   </servers> </settings>    
  • 10. Maven Release Plugin  release goals:  prepare  perform  clean  rollback  stage  branch    
  • 11. Maven Release Profile  Super POM <profile>   <id>release­profile</id>   <activation>     <property>       <name>performRelease</name>       <value>true</value>     </property>   </activation>   <build>     <plugins>       ...     </plugins>   </build> </profile>    
  • 12. Maven Release Profile  Custom release profile <plugin>   <groupId>org.apache.maven.plugins</groupId>   <artifactId>maven­release­plugin</artifactId>   <version>2.0­beta­9</version>   <configuration>     <useReleaseProfile>false</useReleaseProfile>     <arguments>­Pcustom­release­profile</arguments>   </configuration> </plugin>    
  • 13. Maven Release Process  release:prepare  check for SNAPSHOTs  versioning   check for build errors  create tag  release:perform  deploy project  release cleanup    
  • 14. Troubleshooting Releases  Common errors during release:  local modifications   current version is not a SNAPSHOT  SNAPSHOT dependencies and plugins  missing <scm> configuration  tag already exists    
  • 15. Troubleshooting Releases  Common errors during release:  unable to deploy project to the  repository  connection problems    
  • 16. Resources  http://maven.apache.org  Apache Maven 2 Effective  Implementations book