Apache Maven
0 view | +0 today
Follow
Your new post is loading...
Your new post is loading...
Scooped by Søren Lund
Scoop.it!

Why Putting Repositories in your POMs is a Bad Idea | Sonatype Blog

Here’s the question:

Should I put the urls to my repositories in my poms or in my settings?

The short answer is: settings.

The long answer is: it depends.

more...
No comment yet.
Scooped by Søren Lund
Scoop.it!

Maven - How to compile tests without running them ? - Stack Overflow

Søren Lund's insight:

If you just want to compile your tests and not run them, then specify the "test-compile" lifecycle phase, like this "mvn test-compile".

 

If you want to run the tests, but don't want to create an artifact (e.g. a jar file), then specify the "test" lifecycle phase, like this "mvn test".


If you want to create an artifact, and compile but not run the tests, then set the skipTests variable to true, like this "mvn -DskipTests=true package".

If you want to skip both compiling and running tests when creating an artifact, then set the maven.test.skip variable to true, like this "mvn -Dmaven.test.skip=true package".

 

more...
No comment yet.
Scooped by Søren Lund
Scoop.it!

java - Maven Modules + Building a Single Specific Module - Stack Overflow

Søren Lund's insight:

If you want to build one or more specific projects, use the following option:

 

-pl (--projects) PROJECT(,PROJECT)*

 

A project can be specified by [groupId]:artifactId or by its relative path. Seperate several projects with commas.

 

If project list is specified, you can also specify one or both of the following two options:

 

-am (--also-make) also build projects required by the list
-amd (--also-make-dependents) also build projects that depend on the list

more...
No comment yet.