How do I exclude the sources jar in mvn deploy?

Posted by Richard on Stack Overflow See other posts from Stack Overflow or by Richard
Published on 2010-04-05T20:26:31Z Indexed on 2010/04/05 20:33 UTC
Read the original article Hit count: 416

Filed under:
|

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
[module-name]-1-sources.jar
[module-name]-1-tests.jar

There are actually more files, such as md5 and sha1 files, being deployed. But for simplicity, I just skip these files here.

Is there any way to exclude [module-name]-1-sources.jar from the deployment process?

One way I can think of is to use "mvn deploy:deploy-file", which allows me to pinpoint which jar to deploy. But since I have a few dozen modules to deploy, it'll be nice if I can configure the deployment file exclusion in pom.xml. Otherwise, I'll have to write a script to deploy.

Thanks,
Richard

© Stack Overflow or respective owner

Related posts about maven

Related posts about deploy