You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christopher Mason <cm...@cmason.com> on 2009/03/23 07:40:21 UTC

(re)moving directories during maven assembly unpacking

Hi.

I have a multimodule project that builds as both a war and an uber jar 
with an embedded jetty server (and some additional startup logic).  I 
want to be able to use the jar to run jetty without unpacking anything 
(kind of like h2's java -jar mode).  I build the jar with the assembly 
plugin, and it unpacks that WAR into the assembly, but all the web 
project's classes end up in WEB-INF, and therefore aren't found.

How can I strip the WEB-INF directory when making the assembly jar?

What I'd really like to do is:

source:
com.example:web:war!WEB-INF/com/example/Foo.class
com.example:web:war!index.jsp

dest:
com.example:uber:jar!com/example/Foo.class
com.example:uber:jar!webapp/index.jsp



It's easy to add directories when unpacking (outputDirectory), but I 
can't see a way to remove a directory.

What's the best way to do this?

Thanks,

-c

PS- There's also the problem that I get copies of shared dependencies 
twice: once unpacked from the jar project and once, still packed as 
jars, from the war project.

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