packagingExcludes
java.lang.String 2.1-alpha-2
false true The
comma separated list of tokens to exclude from the WAR before
packaging. This option may be used to implement the skinny WAR use
case. Note that you can use the Java Regular Expressions engine to
include and exclude specific pattern using the expression %regex[].
Hint: read the about (?!Pattern).
# 1 楼答案
试试这个罐子:
这就是战争:
不要忘了在要排除的包文件夹的完整路径末尾使用
/**
表示文件夹/**
表示文件。您的jar文件将被放置在目标中,而不带包。这条规则适用于这两种情况如果您想排除多个软件包,那么我的第一个建议是先阅读插件api:
最后你可以看到这个例子: