Run a clean before your compile, thus "mvn clean compile" or "mvn
clean install". This will clean out the target directory of each
project before compiling. The skipped java files is not really a maven
issue, it is the java compiler which detect which files are changed.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Wed, Jul 1, 2009 at 10:41 AM, Nafter<[email protected]> wrote:
>
> 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.
> --
> View this message in context: 
> http://www.nabble.com/How-force-Maven-to-compile-each-project-module-even-if-there-are-no-changes-tp24286239p24286239.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to