【问题标题】:maven create jar with dependencies (Eclipse plugin)maven 创建带有依赖项的 jar(Eclipse 插件)
【发布时间】:2013-07-19 20:11:54
【问题描述】:

我想用 Maven 插件从 Eclipse 导出一个项目

clean package

该项目有几个依赖项,一个来自我的工作区,还有几个来自例如阿帕奇。导出发生,.jar 文件已创建。我手动将主文件条目添加到 manifest.mf。 当我尝试运行 jar 时,我收到一条错误消息:

no calssDeffoundError: com.apache.org.common.ApplicationCOntxt. ...   
Could not find main class hu.bz.test.Main.

如何使用 Maven 导出包含依赖项的 jar 文件?

【问题讨论】:

    标签: jar maven-2 dependencies export


    【解决方案1】:

    使用 maven 程序集插件及其 jar-with-dependencies 配置创建 jar -> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies

    【讨论】:

      猜你喜欢
      • 2018-01-20
      • 1970-01-01
      • 1970-01-01
      • 2012-04-22
      • 1970-01-01
      • 2020-05-08
      • 2020-05-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多