Hello,

I am doing incremental Maven builds with Jenkins, where it uses mvn -amd -pl 
... - This works fine, but I noticed that all tests are run regardless of 
whether they are in projects which are really affected by the change or not. 
Example:

I have the following structure in my Git repo:
- project1
- project2
- project3
- releng

releng contains a pom.xml defining project1, project2 and project3 as modules, 
the three projects each have other parents (this is necessary as one of them 
needs the spring-boot-starter-parent, and I cannot set this as the parent of 
the releng because project1 and project2 do not need it).

My Job is set to do "mvn deploy" on releng/pom.xml which builds everything and 
deploys it to a Nexus server in the company.

However, I now want a "true" incremental build, that is, if only project2 
changes, I only want surefire to re-run the tests for project2 and dependent 
projects.

Is it possible to achieve it and how could I define that? I suppose I am 
missing some configuration of the surefire-plugin.

Regards,
Jens

Reply via email to