« Return to Thread: How force Maven to compile each project/module even if there are no changes

How force Maven to compile each project/module even if there are no changes

by Nafter :: Rate this Message:

Reply to Author | View in Thread

How can I force Maven to compile each project/module even if there are no changes.

Because Maven automatically calculates the order in which the various projects/modules have to be compiled. This is done by checking the module dependencies.

For instance this is the order:

- project D;
- project A;
- project C;
- project B;

In the above example project D is not dependendent on an other project. But for instance project B is dependent on project D, A and C.

Now let's say we change an interface method within project A. An implementor of this interface is located for instance in project B.

But now we only commit the change of the interface in project A and we forget to commit the change of the implementor in project B.

Now when Maven builds the WAR it says for project B there is nothing to compile -all classes are up to date.
So nothing is done here.

However we do have a compilation error now!!! And Maven did not detect it.
So I would like Maven to always do a complete compile of each project.

Does anyone know how to accomplish this?
Thanks in advance.

 « Return to Thread: How force Maven to compile each project/module even if there are no changes