【问题标题】:How can a build a jar with the maven assembly plugin that does not package any dependencies?如何使用不打包任何依赖项的 maven 程序集插件构建 jar?
【发布时间】:2012-01-04 16:43:12
【问题描述】:

Maven 程序集插件有一个用于 jar-with-dependencies 但没有 jar-without-dependencies 的预定义描述符。

我知道有一个排除配置,但通配符似乎不适用于排除。或者我没有正确使用它们。

<dependencySets>
    <dependencySet>
        <excludes>
            <exclude>*</exclude>
        </excludes>
    </dependencySet>
</dependencySets>

【问题讨论】:

  • 常规的jar也和artifact-name-jar-with-dependecied.jar一起生成,检查你的目标文件夹。你可以使用它。
  • 我的项目一般是为webserver构建war文件,我需要组装插件打包jar在依赖项目中使用。

标签: maven maven-assembly-plugin


【解决方案1】:

您不需要使用组装插件,您的场景可能会被带有附加类参数和分类器的 maven-war-plugin 覆盖,请参阅现场常见问题解答:http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached

【讨论】:

    猜你喜欢
    • 2016-05-16
    • 2020-05-08
    • 1970-01-01
    • 1970-01-01
    • 2016-02-23
    • 2011-09-06
    • 2012-11-01
    • 1970-01-01
    • 2015-03-29
    相关资源
    最近更新 更多