Skip to content


May 13, 2010

modelid, groupid, artifactid,version,. : Maven co-ordinates.
Lifecycle phase command or it’s specific – goal can be used with maven. Goals perform specific functions. Goals are inside a plugin.

mvn [plugin]: [goal]   OR  mvn [lifecyclePhase]

Each phase may incorporate goals of different plugin hits. Phases of maven are: validate,compile, test,package,integration-test,verify,install,deploy – the last phase will execute all the previous in sequence.
Others are clean,site.

package – jar (multiple output implies multiple artificats + packaging)
mvn archetype:generate

mvn jar:jar
mvn install
mvn version:display-dependency-updates
mvn target:run //deploys war on tomcat and runs.

To be precise, it’s the content of the test output directory (target/test-classes) that is on the class path, not src/test/resources. But resources under src/test/resources are copied to the test output directory by the resources:testResources goal (which is bound by default to the process-test-resources phase).

Resources for the test source code should have been copied either by your IDE or by Maven when running tests and should thus be available on the class path

mvn test will always run the
compile and test-compile phases first, as well as all the others defined before it.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: