Maven – The build paraphernalia

2,243 views

Published on

An introduction to maven

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,243
On SlideShare
0
From Embeds
0
Number of Embeds
82
Actions
Shares
0
Downloads
23
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • 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………
  • Dependency Scope http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
  • Maven – The build paraphernalia

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

    ×