You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Qing Lan <la...@live.com> on 2018/07/12 06:40:36 UTC

sources.jar for multi-module project in Maven

Hi all,

I am currently trying to create a fat sources.jar for my maven project, the structure looks like below:

parent

  *   init
  *   core
  *   examples
  *   assembly

I am able to create a fat jar of all modules in assembly stage using maven-assembly-plugin. However, I am not able to do the same thing with source code in assembly stage.
I tried to use maven-source-plugin however it could only create sources.jar in each of the module. In assembly there is no code there so it didn’t create anything for the sources.jar.

Can anybody help with this issue?

Thanks,
Qing

Some ways I found in Google but not help:
https://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-source-inclusion-simple.html
https://stackoverflow.com/questions/16571889/maven-distribute-source-code-with-with-jar-with-dependencies