I'm not using excludes in unpackOptions myself, but make sure:
1. This functionality is available in a public release, and not just a snapshot
2. You've specified the a release version that has this functionality
in your pom <plugin> declaration

Many times I've seen people add a pom snippet from the mailing list,
Jira, or even the plugin documentation without realizing that it won't
necessarily work since that functionality is not yet available in a
released plugin version. Check the @since tag in the plugin docs.

Wayne

On 10/24/07, Arik Kfir <[EMAIL PROTECTED]> wrote:
> 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.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to