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)

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

Creating a eclipse proj using Maven: 

Deploying 3rd party jar to remote repo: 


Further reading: 

No comments:

Post a Comment