Thursday, January 6, 2011
Maven OpenEJB Dependency/ Dependecies
Monday, November 10, 2008
Maven2 Reference
mvn plugin:target [-Doption1 -Doption2 . . . ]
mvn help
mvn -X ...
Prints debugging output, very useful to diagnose
Creating a new Project (jar)
mvn archetype:create -DgroupId=Artifact Group -DartifactId=Artifact ID
Example:
mvn archetype:create -DgroupId=de.focusdv.bcs -DartifactId=new-app
This will creates a new Project Directory new-app with package structure de.focusdv.bcs.
The Name of the packaged jar will be new-app-version.jar
Creating a new Project (war)
mvn archetype:create -DgroupId=
Artifact Group -DartifactId=Artifact ID -DarchetypeArtifactId=maven-archetype-webapp
Example:
mvn archetype:create -DgroupId=de.focusdv.bcs -DartifactId=new-webapp -DarchetypeArtifactId=maven-archetype-webapp
Creates a new Directory new-webapp with package structurede.focusdv.bcs.
Name of the packaged war will be new-app-version.war
Compiling
mvn compile
Running Unit Tests
mvn test
This command will compiles and runs unit tests
Packaging (jar, war)
mvn package
This will compiles, runs unit tests and packages the artifact
Installing Artifact in Local Repository
mvn install
compiles, runs unit tests, packages and installs the artifact in
the local repository. (User Home Directory/.m2/repository/)
Installing 3rd Party jar
mvn install:install-file -Dfile=foo.jar \
-DgroupId=org.foosoft -DartifactId=foo \
-Dversion=1.2.3 -Dpackaging=jar
Cleaning Up
mvn clean
mvn eclipse:eclipse
Adding Dependencies
...
...