Skip to content

Maven

May 13, 2010
tags:

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:package
mvn target:run //deploys war on tomcat and runs.
————————————————-
-Dmaven.test.skip=true

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.

Advertisements
No comments yet

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: