Upload
subin-sugunan
View
1.945
Download
1
Embed Size (px)
DESCRIPTION
An introduction to maven
Citation preview
Maven – The build [email protected]
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:\subin_projects\jars\snmp\ireasoningsnmp.jar -Dpackaging=jar -DgeneratePom=true
<dependency>
<groupId>com.ireasoning</groupId>
<artifactId>snmpv3</artifactId>
<version>5.0</version>
</dependency>
ReferencesMaven 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