How do I exclude the sources jar in mvn deploy?

后端 未结 7 941
半阙折子戏
半阙折子戏 2021-01-01 17:03

When I run \"mvn deploy:deploy\", maven deploys 4 jar files to my internal remote repository.

They are:

[module-name]-1.jar
[module-name]-1.pom
[modu

7条回答
  •  既然无缘
    2021-01-01 17:26

    Maven mvn deploy:deploy deploys all produced artifacts during maven process (default lifecycle). To not deploy [module-name]-1-sources.jar you should simply(?) not produce one. If you are using maven-source-plugin to attach source files just don't use it anymore.

    If this is not the case you are experiencing please provide more details:

    1. how do you generate [module-name]-1-sources.jar artifact (which plugin generate this artifact?)
    2. why do you need to generate sources but you don't need deploy them to the repository?

提交回复
热议问题