Thursday, January 6, 2011

Maven OpenEJB Dependency/ Dependecies


org.apache.openejb
openejb-jee
3.1.4



org.apache.openejb
openejb-client
3.1.4

Monday, November 10, 2008

Maven2 Reference

Starting Maven
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

Creating Eclipse Project Structure
mvn eclipse:eclipse

Adding Dependencies

...


junit
junit
3.8.1
test


org.springframework
spring
1.2.6

...