maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Kriegisch" <alexan...@kriegisch.name>
Subject Why is "mvn validate compile" different from "mvn validate; mvn compile"?
Date Thu, 07 Nov 2013 15:46:08 GMT
Hi.

I have used mvn for a while, but am by no means an expert, so if I am asking an obvious question
please pardon me and answer it anyway if you can. Thanks.

I have bound some plugin executions to the validate phase because I need them to happen before
compile. If I execute

    mvn validate
    mvn compile

everything is fine. But if I call

    mvn validate compile

Maven behaves differently. What I do during validate is download external, non-mavenised (as
in unavailable on Central) dependencies and install them locally if they are not registered
in my local repo yet. Those dependencies are used in the compile phase. Now if I seperate
the two calls it works, but if I do it in one mvn call and rely on the order of phases, Maven
breaks my build by checking for remote and local artifact availability *before* actually starting
the validate stuff from my POM. If I run "mvn -X ..." I can clearly see the difference.

Am I doing anything wrong? Can I force Maven to actually do what is described in the documentation,
i.e. perform the whole validate phase with all executions bound to it in my POM *before* doing
anything else related to the compile phase such as trying to download dependencies?

Thank you
-- 
Alexander Kriegisch


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message