How do I exclude the sources jar in mvn deploy?

后端 未结 7 956
半阙折子戏
半阙折子戏 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:22

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

    Don't generate sources if you don't want to deploy them. So either remove the following (that you must have in your POM) or put it in a profile that you don't use or exclude during release (I wonder when you use sources in that case):

    
      
        
          org.apache.maven.plugins
          maven-source-plugin
          
            
              
                jar
              
            
          
        
      
    
    

提交回复
热议问题