I have the following syntax problem.
I have a jar file that is created from other unpacked jar files. I am trying to exclude some package from being in the the new jar file.
Here is my assembly descriptor
<assembly>
<id>gs-jar</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<scope>runtime</scope>
<includes>
<include>com.delver:shci-commons</include>
<include>com.delver:shci-model</include>
<include>com.delver:gigaspaces-persistence</include>
<include>com.delver:gigaspaces-mirror</include>
<include>com.delver:recommendation</include>
</includes>
<unpackOptions>
<excludes>
<exclude>
Ohio.Model*
</exclude>
<exclude>log4j.properties</exclude>
<exclude>gslicense.xml</exclude>
</excludes>
</unpackOptions>
</dependencySet>
</dependencySets>
</assembly>
As you see I am trying to excluded the package that starts with Ohio.Model , but somehow it get s included anyway.
Is there something wrong with the syntax ?
Exclude a dependency You can use a diagram to exclude a dependency from the project's POM. Select a dependency in the diagram window. From the context menu, choose Exclude. From the list, select the module (if any) where the exclusion definition will be added.
So in order for you to customize the way the Assembly Plugin creates your assemblies, you need to know how to use the Assembly Descriptor. This descriptor specifies the type of assembly archive to create, the contents of the assembly, and the ways in which dependencies or its modules are bundled with an assembly.
Exclusions are set on a specific dependency in your POM, and are targeted at a specific groupId and artifactId. When you build your project, that artifact will not be added to your project's classpath by way of the dependency in which the exclusion was declared.
This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.
Found it
<exclude>
**/Ohio/**
</exclude>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With