SlideShare a Scribd company logo
Maven  OpenSource platform Integration
Maven
Agenda Maven Philosophy POM Standard Directory Layout Lifecycle Plugins Dependencies Release Repository Archetype Site
What is Maven? Standardized build infrastructure Build tool Dependency Management tool Quality tool OpenSource Apache project
Maven Philosophy Convention over Configuration Ease the build process Best practises patterns Consistent build
Project Descriptor POM ie Project Object Model ie pom.xml Contains all metadata of a project Name Packaging Type Dependencies Tool links (CI, SCM, Bug Tracker…) License People One POM == One Artifact POM relationships Inheritance Aggregation
Project Descriptor Sample <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0  http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;>  <modelVersion>4.0.0</modelVersion>  <groupId>com.mycompany.app</groupId>  <artifactId>my-app</artifactId>  <packaging>jar</packaging>  <version>1.0-SNAPSHOT</version>  <dependencies>  <dependency>  <groupId>junit</groupId>  <artifactId>junit</artifactId>  <version>4.5</version>  <scope>test</scope>  </dependency>  </dependencies>  </project>
Standard Directory Layout src/main/java src/main/resources src/main/config src/test/java src/test/resources src/site target
Build Lifecycle 3 different lifecycle default clean  site Phases (lifecycle default) validate compile test package integration-test verify install deploy Invoked with ‘mvn’ command line
Plugin Set of goals (Mojos) Plugin Goals can be bound to phases Depending on packaging type a list of goals are assigned to phases
Plugin goal binding <plugin>   <groupId>com.mycompany</groupId>   <artifactId>some-maven-plugin</artifactId>   <executions>   <execution>   <phase>process-test-resources</phase>   <configuration>…</configuration>   <goals>   <goal>someGoal</goal>   </goals>   </execution>   </executions> </plugin>
Plugin goal binding user mvn install generate- sources compile test install deploy package integration- test mojo mojo mojo mojo mojo bindings
Plugin sample Surefire Release Archetype Checkstyle Findbugs Cargo  (Application Server Deployment) Eclipse Groovy Native
Packaging Type Specifies artifact’s type Configure  default  lifecycle Available types jar war rar ear ejb / ejb3 maven-plugin (extends jar to install plugin in maven repository) pom Default packaging is  jar
Dependencies Identified by groupId artifactId version scope Scope affects dependencies transitivity and build classpath Available scope compile provided runtime test
Repository Contains artifacts and plugins (versioned) with associated pom No more lib copies per project Allows reproduceable builds Official remote repositories available; new ones can be added Local repository caches artifacts and allows offline builds
Site Automatic website generation based on project metadata Plugins can be added to generate report (surefire, checkstyle, findbugs…) Documentation can be written in several languages
Profile Allows to adapt build for a particular Environment / User Defined as part of pom.xml or user settings.xml Can be active by default  or activated based on conditions  or enabled on command line
Integration environment OpenSource
Agenda OpenSource  Platform Continuous Integration Source Control Manager Bug/Feature Tracker Maven Repository Maven Facilities
Continuous Integration http://opensource.fastconnect.org/hudson
Source Control Manager http://opensource.fastconnect.org/svn
Bug/Feature Tracker http://opensource.fastconnect.org/redmine
Maven Repository https://opensource.fastconnect.org/archiva
OpenSource Licences GPL or LGPL How to chose: http://fastconnect.org/mediawiki/index.php/OpenSource_License
Maven Facilities Archetype fr.fastconnect.maven:simple-archetype:1.1 fr.fastconnect.maven:openspaces-archetype:1.1 Parent POM fr.fastconnect.maven:parent:1.1 Skin fr.fastconnect.maven:simple-skin:1.0 Common  fr.fastconnect:common:0.6
Documentation http://fastconnect.org/mediawiki/index.php/Environment http://fastconnect.org/mediawiki/index.php/Maven http://fastconnect.org/mediawiki/index.php/Java_Project_Life_cycle http://fastconnect.org/mediawiki/index.php/Category:Maven_Plugin http://fastconnect.org/mediawiki/index.php/Subversion
Sample mvn archetype:generate  -DarchetypeGroupId=fr.fastconnect.maven  -DarchetypeArtifactId=simple-archetype  -DarchetypeVersion=1.0  -DartifactId=test –DgroupId=fr.fastconnect  cd test mvn license:format -Dlicense.type=gpl mvn verify -Dlicense.type=gpl mvn eclipse:eclipse mvn site cd target/site
End

More Related Content

PPT
Maven Introduction
PPTX
Maven ppt
PPTX
Maven tutorial
PPTX
Maven Basics - Explained
PDF
Maven 3 Overview
PDF
Jenkins
PPTX
An Introduction to Maven
PPTX
Jenkins tutorial for beginners
Maven Introduction
Maven ppt
Maven tutorial
Maven Basics - Explained
Maven 3 Overview
Jenkins
An Introduction to Maven
Jenkins tutorial for beginners

What's hot (20)

PPTX
Spring Boot
PPTX
Introduction to Maven
PPTX
Saving Time By Testing With Jest
PPTX
Docker introduction
PPTX
Jenkins CI presentation
ODP
An Introduction to Vuejs
PPTX
Introduction to Spring Boot
PDF
Jenkins tutorial
PPTX
Introduction to Spring Framework
PPT
Jenkins Overview
PPTX
PDF
REST APIs with Spring
PDF
Intro To React Native
PPTX
Jenkins tutorial
PPTX
Introduction to spring boot
PDF
Introduction to jest
PPT
CI and CD with Jenkins
PPTX
Jenkins CI
Spring Boot
Introduction to Maven
Saving Time By Testing With Jest
Docker introduction
Jenkins CI presentation
An Introduction to Vuejs
Introduction to Spring Boot
Jenkins tutorial
Introduction to Spring Framework
Jenkins Overview
REST APIs with Spring
Intro To React Native
Jenkins tutorial
Introduction to spring boot
Introduction to jest
CI and CD with Jenkins
Jenkins CI
Ad

Viewers also liked (20)

PPTX
Maven for Dummies
PPTX
An introduction to Maven
PPT
Demystifying Maven
PPTX
Developing Agile Java Applications using Spring tools
PDF
Análise de qualidade de código com Sonar - Fernando Boaglio
PDF
Continuous inspection with Sonar
PDF
PDF
Apache maven, a software project management tool
PDF
Hands On with Maven
PPTX
Maven
PPTX
Spring boot for buidling microservices
PPTX
Apache ant
PPTX
Maven
PDF
Sonar Metrics
PDF
Mastering Maven 2.0 In 1 Hour V1.3
PDF
Continuous delivery-with-maven
PDF
Jenkins with SonarQube
PDF
Git workflows
PPSX
Java 9 and the impact on Maven Projects (JavaOne 2016)
PPTX
Sonar-Hodson-Maven
Maven for Dummies
An introduction to Maven
Demystifying Maven
Developing Agile Java Applications using Spring tools
Análise de qualidade de código com Sonar - Fernando Boaglio
Continuous inspection with Sonar
Apache maven, a software project management tool
Hands On with Maven
Maven
Spring boot for buidling microservices
Apache ant
Maven
Sonar Metrics
Mastering Maven 2.0 In 1 Hour V1.3
Continuous delivery-with-maven
Jenkins with SonarQube
Git workflows
Java 9 and the impact on Maven Projects (JavaOne 2016)
Sonar-Hodson-Maven
Ad

Similar to Maven Overview (20)

PPT
Maven 2 features
PPTX
Apache Maven basics
PDF
BMO - Intelligent Projects with Maven
PDF
PDF
PDF
Intelligent Projects with Maven - DevFest Istanbul
PPTX
PPTX
Introduction to maven
PPT
Maven 2.0 - Improve your build patterns
PPSX
Maven Presentation - SureFire vs FailSafe
PPTX
Apache Maven - eXo VN office presentation
PPTX
20091112 - Mars Jug - Apache Maven
PDF
Introduction to maven, its configuration, lifecycle and relationship to JS world
PPTX
PDF
Java Builds with Maven and Ant
PPTX
Maven in mulesoft
ODP
Maven in Java EE project
PPTX
Maven
PPT
Maven basic concept
Maven 2 features
Apache Maven basics
BMO - Intelligent Projects with Maven
Intelligent Projects with Maven - DevFest Istanbul
Introduction to maven
Maven 2.0 - Improve your build patterns
Maven Presentation - SureFire vs FailSafe
Apache Maven - eXo VN office presentation
20091112 - Mars Jug - Apache Maven
Introduction to maven, its configuration, lifecycle and relationship to JS world
Java Builds with Maven and Ant
Maven in mulesoft
Maven in Java EE project
Maven
Maven basic concept

More from FastConnect (7)

PPTX
Morning With MongoDB
PDF
MongoDB day Paris 2012
PDF
Presentation mug-data mapper
PDF
Presentation mug-mule studio
PDF
Presentation mug-mule esb
PDF
Presentation mug-introduction
PDF
NoSQL User Group Paris - 21 Juin 2011 - GigaSpaces
Morning With MongoDB
MongoDB day Paris 2012
Presentation mug-data mapper
Presentation mug-mule studio
Presentation mug-mule esb
Presentation mug-introduction
NoSQL User Group Paris - 21 Juin 2011 - GigaSpaces

Recently uploaded (20)

PPTX
Big Data Technologies - Introduction.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Machine learning based COVID-19 study performance prediction
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
Big Data Technologies - Introduction.pptx
Modernizing your data center with Dell and AMD
Machine learning based COVID-19 study performance prediction
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The AUB Centre for AI in Media Proposal.docx
Encapsulation_ Review paper, used for researhc scholars
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”

Maven Overview

  • 1. Maven OpenSource platform Integration
  • 3. Agenda Maven Philosophy POM Standard Directory Layout Lifecycle Plugins Dependencies Release Repository Archetype Site
  • 4. What is Maven? Standardized build infrastructure Build tool Dependency Management tool Quality tool OpenSource Apache project
  • 5. Maven Philosophy Convention over Configuration Ease the build process Best practises patterns Consistent build
  • 6. Project Descriptor POM ie Project Object Model ie pom.xml Contains all metadata of a project Name Packaging Type Dependencies Tool links (CI, SCM, Bug Tracker…) License People One POM == One Artifact POM relationships Inheritance Aggregation
  • 7. Project Descriptor Sample <project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.5</version> <scope>test</scope> </dependency> </dependencies> </project>
  • 8. Standard Directory Layout src/main/java src/main/resources src/main/config src/test/java src/test/resources src/site target
  • 9. Build Lifecycle 3 different lifecycle default clean site Phases (lifecycle default) validate compile test package integration-test verify install deploy Invoked with ‘mvn’ command line
  • 10. Plugin Set of goals (Mojos) Plugin Goals can be bound to phases Depending on packaging type a list of goals are assigned to phases
  • 11. Plugin goal binding <plugin> <groupId>com.mycompany</groupId> <artifactId>some-maven-plugin</artifactId> <executions> <execution> <phase>process-test-resources</phase> <configuration>…</configuration> <goals> <goal>someGoal</goal> </goals> </execution> </executions> </plugin>
  • 12. Plugin goal binding user mvn install generate- sources compile test install deploy package integration- test mojo mojo mojo mojo mojo bindings
  • 13. Plugin sample Surefire Release Archetype Checkstyle Findbugs Cargo (Application Server Deployment) Eclipse Groovy Native
  • 14. Packaging Type Specifies artifact’s type Configure default lifecycle Available types jar war rar ear ejb / ejb3 maven-plugin (extends jar to install plugin in maven repository) pom Default packaging is jar
  • 15. Dependencies Identified by groupId artifactId version scope Scope affects dependencies transitivity and build classpath Available scope compile provided runtime test
  • 16. Repository Contains artifacts and plugins (versioned) with associated pom No more lib copies per project Allows reproduceable builds Official remote repositories available; new ones can be added Local repository caches artifacts and allows offline builds
  • 17. Site Automatic website generation based on project metadata Plugins can be added to generate report (surefire, checkstyle, findbugs…) Documentation can be written in several languages
  • 18. Profile Allows to adapt build for a particular Environment / User Defined as part of pom.xml or user settings.xml Can be active by default or activated based on conditions or enabled on command line
  • 20. Agenda OpenSource Platform Continuous Integration Source Control Manager Bug/Feature Tracker Maven Repository Maven Facilities
  • 22. Source Control Manager http://opensource.fastconnect.org/svn
  • 25. OpenSource Licences GPL or LGPL How to chose: http://fastconnect.org/mediawiki/index.php/OpenSource_License
  • 26. Maven Facilities Archetype fr.fastconnect.maven:simple-archetype:1.1 fr.fastconnect.maven:openspaces-archetype:1.1 Parent POM fr.fastconnect.maven:parent:1.1 Skin fr.fastconnect.maven:simple-skin:1.0 Common fr.fastconnect:common:0.6
  • 27. Documentation http://fastconnect.org/mediawiki/index.php/Environment http://fastconnect.org/mediawiki/index.php/Maven http://fastconnect.org/mediawiki/index.php/Java_Project_Life_cycle http://fastconnect.org/mediawiki/index.php/Category:Maven_Plugin http://fastconnect.org/mediawiki/index.php/Subversion
  • 28. Sample mvn archetype:generate -DarchetypeGroupId=fr.fastconnect.maven -DarchetypeArtifactId=simple-archetype -DarchetypeVersion=1.0 -DartifactId=test –DgroupId=fr.fastconnect cd test mvn license:format -Dlicense.type=gpl mvn verify -Dlicense.type=gpl mvn eclipse:eclipse mvn site cd target/site
  • 29. End