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

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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