You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nick Middleweek <nm...@googlemail.com> on 2012/07/06 19:22:51 UTC

mvn war:exploded or mvn compile war:war and mvn compile war:exploded

Hello,

I'v been reading this:
http://maven.apache.org/plugins/maven-war-plugin/usage.html and have a
little question...


What is the difference between...

mvn war:exploded & mvn compile war:exploded ?

and the difference between...

mvn compile war:exploded & mvn compile war:war ?


Thanks,
Nick


-- 
Sent by Nick Middleweek ( { email: nick@middleweek.co.uk, mobile: +44(0)774
035 5424, blog: http://blog.middleweek.co.uk } );

Re: mvn war:exploded or mvn compile war:war and mvn compile war:exploded

Posted by Wayne Fay <wa...@gmail.com>.
> What is the difference between...
>
> mvn war:exploded & mvn compile war:exploded ?

Note this in the WAR plugin docs:
"Note: When using the war: goals it is assumed that the compile phase
is already done. The WAR Plugin is not responsible for compiling the
java sources or copying the resources."

So "mvn war:exploded" won't run compile before attempting to run
war:exploded. If you compiled recently or if you only changed code
that does not need to be compiled (but merely copied to /target), this
may be what you want. So go run "mvn clean war:exploded" as a test and
see what happens, I doubt you will be happy with the results.

> and the difference between...
>
> mvn compile war:exploded & mvn compile war:war ?

Well, in this case, you are either going to get the result of
war:exploded (the contents of a war file as a directory under target,
not in war format) as output or the result of war:war (a war file) as
output (essentially war:exploded PLUS the war packaging step). Either
way Maven will compile the code in your WAR project prior to running
either of the war plugin goals.

Wayne

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