• Save
Maven Overview
Upcoming SlideShare
Loading in...5
×
 

Maven Overview

on

  • 7,083 views

 

Statistics

Views

Total Views
7,083
Views on SlideShare
6,537
Embed Views
546

Actions

Likes
2
Downloads
0
Comments
0

4 Embeds 546

http://wfm-xwiki.na.nice.com 351
http://blog.fastconnect.fr 193
http://translate.googleusercontent.com 1
http://172.25.111.41 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Maven Overview Maven Overview Presentation Transcript

    • 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