SlideShare a Scribd company logo
Maven – The build paraphernalia [email_address]
What’s Inside Why a build tool? Maven Advantages Core Concepts – POM Dependency Management. Report Generation Resources
Why a build tool? Enables repeatable builds. Embeds build knowledge in to the project. Makes it possible for automated builds Continuous Integration Makes it easy for release management ANT ,Make, Shell scripts………(Where is Maven .. ?)
Maven  - “accumulator of knowledge” A new approach to project development. Based on the concept of XML Project Object Model (POM). Configure your build don’t script it. Define what to build not how to. Superior dependency management. Maven is not a build tool, It’s a development tool. Coherent site of project information.
Advantages Standardized project layout and project structure Standardized dependency management. Instant downloads of new plug-in and features as the developer needs them.  Website generation for up-to-date project information.  Integration with source control: CVS and Subversion.
Core Concepts – POM All Information about the project is contained in a single file called pom.xml Pom contains the detailed metadata information about the project. An Average pom.xml contains: Project Management Project Build Project Dependency Project reports <see notes>
Dependency Management Repository [local and remote] Just define the dependency and forget about them – Maven will do the rest.
Report  [Site] Generation Site generation is a key feature of maven. It contains: A reference to build server Javadoc Issue tracking reference Test and quality reports Copy paste dectetor  [CPD] The reports are generated by the plugins that maven provides. Maven uses the “mvn site” goal to create the site. The site is usually a htm document and we can customize it using CSS/XSLT
e.g. Coverage Report
day-to-day maven... mvn clean mvn install mvn test mvn install -Dmaven.test.skip mvn eclipse:eclipse  mvn eclipse:clean mvn eclipse:clean eclipse:eclipse  mvn site mvn install:install-file -DgroupId=com.ireasoning -DartifactId=snmpv3 -Dversion=5.0  -Dfile=D:ubin_projectsarsnmpreasoningsnmp.jar -Dpackaging=jar  -DgeneratePom=true   <dependency> <groupId>com.ireasoning</groupId> <artifactId>snmpv3</artifactId> <version>5.0</version> </dependency>
References Maven getting started guide http://maven.apache.org/guides/getting-started/index.html Building web applications with maven-2 http://today.java.net/pub/a/today/2007/03/01/building-web-applications-with-maven-2.html Frequently Asked Technical Questions http://maven.apache.org/general.html
Thank You

More Related Content

Maven – The build paraphernalia

  • 1. Maven – The build paraphernalia [email_address]
  • 2. What’s Inside Why a build tool? Maven Advantages Core Concepts – POM Dependency Management. Report Generation Resources
  • 3. Why a build tool? Enables repeatable builds. Embeds build knowledge in to the project. Makes it possible for automated builds Continuous Integration Makes it easy for release management ANT ,Make, Shell scripts………(Where is Maven .. ?)
  • 4. Maven - “accumulator of knowledge” A new approach to project development. Based on the concept of XML Project Object Model (POM). Configure your build don’t script it. Define what to build not how to. Superior dependency management. Maven is not a build tool, It’s a development tool. Coherent site of project information.
  • 5. Advantages Standardized project layout and project structure Standardized dependency management. Instant downloads of new plug-in and features as the developer needs them. Website generation for up-to-date project information. Integration with source control: CVS and Subversion.
  • 6. Core Concepts – POM All Information about the project is contained in a single file called pom.xml Pom contains the detailed metadata information about the project. An Average pom.xml contains: Project Management Project Build Project Dependency Project reports <see notes>
  • 7. Dependency Management Repository [local and remote] Just define the dependency and forget about them – Maven will do the rest.
  • 8. Report [Site] Generation Site generation is a key feature of maven. It contains: A reference to build server Javadoc Issue tracking reference Test and quality reports Copy paste dectetor [CPD] The reports are generated by the plugins that maven provides. Maven uses the “mvn site” goal to create the site. The site is usually a htm document and we can customize it using CSS/XSLT
  • 10. day-to-day maven... mvn clean mvn install mvn test mvn install -Dmaven.test.skip mvn eclipse:eclipse mvn eclipse:clean mvn eclipse:clean eclipse:eclipse mvn site mvn install:install-file -DgroupId=com.ireasoning -DartifactId=snmpv3 -Dversion=5.0 -Dfile=D:ubin_projectsarsnmpreasoningsnmp.jar -Dpackaging=jar -DgeneratePom=true <dependency> <groupId>com.ireasoning</groupId> <artifactId>snmpv3</artifactId> <version>5.0</version> </dependency>
  • 11. References Maven getting started guide http://maven.apache.org/guides/getting-started/index.html Building web applications with maven-2 http://today.java.net/pub/a/today/2007/03/01/building-web-applications-with-maven-2.html Frequently Asked Technical Questions http://maven.apache.org/general.html

Editor's Notes

  1. 1)Project Management Detailed Description of project Company Information Developer roles and Information Mailing List, Source control modules configuration. 2)Project Build Source code and test code location Resources location 3)Project Dependency Libraries needed for build and runtime. 4)Project Reports Junit reports Check style reports Javadoc reports etc………
  2. Dependency Scope http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope