Creating an archive of all jars and source jars for a multi-module project

Deadly 提交于 2019-12-04 06:04:50

I think you're on the right lines, the moduleSets options of the assembly plugin handles what you're after.

If you're looking for some useful documentation, the Module Selection section of the Maven book covers it quite thoroughly, including how to configure includes and excludes, handle binaries and sources, and exclude external dependencies.

uzseb

I had this problem, for me, the solution was NOT put / at the beginning of your <fileset><directory>

If you do that will work on Windows, not on Unix/Linux!

<fileSet>
  <directory>src/main/</directory>
  <outputDirectory></outputDirectory>
  <includes>
    <include>VERSION</include>
  </includes>
</fileSet>

works whereas

<fileSet>
  <directory>/src/main/</directory>
  <outputDirectory></outputDirectory>
  <includes>
    <include>VERSION</include>
  </includes>
</fileSet>

causes

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (execution-pluggin-assembly) on project test3: Failed to create assembly: Error creating assembly archive assembly: You must set at least one file. -> [Help 1]

Have a look at the How to use assembly:assembly using predefined descriptor ids. I think the bin and src pre-defined descriptor files are what you need.

Sounds like you need a build-server of some kind. I was at JavaZone 2009 this week and looked at Hudson CI http://hudson-ci.org/

The server will create the artifacts you or other teams can use/download.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!