Details
Description
Lately I've had some problems with the fact that the "run-war" and "run-exploded" goals of Jetty's Maven plugin always execute the "package" phase of the lifecycle before launching Jetty. I think the solution to this problem is to change these goals so that they just lunch Jetty without running the "package" phase. The modified goals could either replace the current versions or they could live alongside the existing goals, much like the goals in Maven's "assembly" plugin.
The reason I think this a problem is that for projects with a lot of dependencies, building the project's war file is by far the most time-consuming part of building the project, and there are cases where building the war file has absolutely no benefit. The most obvious case where the war file is unnecessary is the "run-exploded" goal--I realize that building the war file is the only reliable way to cause the exploded webapp directory to be built, but the problem remains. The other case I've encountered is when the user runs a webapp other than the project's primary artifact by using a -DwebApp=... argument on the command line.
I'd have hoped that maven would be smart enough not to rebuild the war file if nothing has changed, and one already exists in the build output directory. Perhaps something to bring up with the maven guys?
I wasn't aware of the -DwebApp argument. Can you tell me in what circumstances you would use it?
cheers
Jan