Deploying an artifact, its sources and javadoc using maven's deploy:deploy-file plugin

后端 未结 2 1659
情书的邮戳
情书的邮戳 2021-02-20 18:42

I\'m stumped trying to deploy an artifact, its sources and its javadoc to our maven repository (Nexus). The sources and javadoc parameters seems to be ignored, and only the main

相关标签:
2条回答
  • 2021-02-20 19:06

    you need to additionally specify the -DrepositoryId

    0 讨论(0)
  • 2021-02-20 19:13

    First check if you are using plugin version 2.7. According documentation the option sources and javadoc are available from this version on.

    If you using the correct version and it still doesn't work you can deploy the artifacts using old way - in multiple command.

    To deploy source jar use:

    mvn deploy:deploy-file -Dfile=whack-1.0.0-sources.jar \
                           -Dclassifier=sources
                           -DgroupId=org.igniterealtime \                     
                           -DartifactId=whack \
                           -Dversion=1.0.0 \
                           -Dpackaging=jar \
                           -Durl=https://myhost.com/nexus/content/repositories/thirdparty/
    

    and javadoc jar:

    mvn deploy:deploy-file -Dfile=whack-1.0.0-javadoc.jar \
                           -Dclassifier=javadoc
                           -DgroupId=org.igniterealtime \                     
                           -DartifactId=whack \
                           -Dversion=1.0.0 \
                           -Dpackaging=jar \
                           -Durl=https://myhost.com/nexus/content/repositories/thirdparty/
    
    0 讨论(0)
提交回复
热议问题