Wednesday, March 24, 2010

Maven - enterpise proj builder

Apache Maven is a software tool for Java project management and build automation.
Maven dynamically downloads Java libraries and Maven plug-ins from one or more repositories. Maven provides built-in support for retrieving files from the Maven 2 Central Repository and other Maven repositories, and can upload artifacts to specific repositories after a successful build. A local cache of downloaded artifacts acts as the primary means of synchronizing the output of projects on a local system.
Maven is built using a plugin-based architecture that allows it to make use of any application controllable through standard input. Theoretically, this would allow anyone to write plugins to interface with build tools (compilers, unit test tools, etc.) for any other language.


Basic Concepts:
1. POM file
2. Build Lifecycle
3. Phase
4. Plugin
5. Goal
6. Dependencies


7. Repository: Maven, Central (enterprise), Local (~\.m2)
    [Refer: http://maven.apache.org/guides/introduction/introduction-to-repositories.html]


Run thru:
1. mvn in shell/cmd
2. maven plugin for eclipse (/netbeans/other IDEs)


Creating a eclipse proj using Maven:
http://maven.apache.org/guides/mini/guide-ide-eclipse.html 


Deploying 3rd party jar to remote repo:
http://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html 


Refer: 
http://en.wikipedia.org/wiki/Apache_Maven
http://refcardz.dzone.com/assets/download/refcard/5468678372cbc8d6a460160a10e63b5a/rc055-010d-apachemaven-1.pdf


Further reading: 
Plugins: http://maven.apache.org/plugins/index.html
Maven+Eclipse: http://maven.apache.org/guides/mini/guide-ide-eclipse.html
http://en.wikipedia.org/wiki/Apache_Maven#External_links

No comments:

Post a Comment