Hi,
I have a multi-module project, where one of the modules is a WAR, with
several dependencies
packaged in its WEB-INF/lib directory. The top-level project builds an
assembly, which needs
to contain the WAR in an unpacked form.
I used the <unpack>true</unpack> and <unpackOptions> tags to make sure the
WAR is unpacked AND to exclude its "WEB-INF/lib" directory.
The problem is that the excludes in 'unpackOptions' doesn't seem to affect
the assembly; my JARs
are still unpacked from the WAR and stored in my assembly.
POM structure is:
myproject ("pom" packaging, does NOT extend parent)
|
+---parent module ("pom" packaging, others extend this one)
|
+---war module ("war" packaging, extends parent)
|
+---other modules...
The assembly descriptor is as follows (created on the 'package' phase of the
lifecycle):
=====================================
<assembly>
<id>slim-application</id>
<formats>
<format>tar.gz</format>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<moduleSets>
<moduleSet>
<includes>
<include>org.myproject:war:*:*</include>
</includes>
<binaries>
<!-- the directory in the dist to contain the WAR contents
-->
<outputFileNameMapping>application</outputFileNameMapping>
<useStrictFiltering>true</useStrictFiltering>
<!-- filter out our dependencies, they are already in the
WEB-INF/lib -->
<includeDependencies>false</includeDependencies>
<!-- unpack our WAR - this works great -->
<unpack>true</unpack>
<!-- make sure that we don't include the libraries from our
WAR by excluding them -->
<unpackOptions>
<excludes>
<exclude>**/*.jar</exclude>
</excludes>
</unpackOptions>
</binaries>
</moduleSet>
</moduleSets>
<files>
...
...(irrelevant to this mail)
...
</files>
</assembly>
====================================
Note that instead of "**/*.jar" I have also tried "/WEB-INF/lib/*.jar",
"/WEB-INF/lib", and similar combinations, but to no avail.
If anyone has encountered anything like that, or if you spot something I'm
doing wrong here - I'd appreciate your help.
Thanks,
Arik Kfir.