从Maven程序集描述符中的jar中排除软件包 [英] Excluding packages from jars in maven assembly descriptor

查看:90
本文介绍了从Maven程序集描述符中的jar中排除软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下语法问题.

我有一个从其他未打包的jar文件创建的jar文件. 我正在尝试从新的jar文件中排除某些软件包.

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.

这是我的程序集描述符

<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>

如您所见,我正在尝试排除以Ohio.Model开头的软件包,但无论如何还是包含了它.

As you see I am trying to excluded the package that starts with Ohio.Model , but somehow it get s included anyway.

语法是否有问题?

推荐答案

找到了

            <exclude>
               **/Ohio/**
            </exclude>

这篇关于从Maven程序集描述符中的jar中排除软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆