Maven deploy:deploy using -DaltDeploymentRepository

后端 未结 2 1477
夕颜
夕颜 2021-01-01 09:22

I have maven projects and I want to deploy my artifacts on internal nexus repository which is configured to have my snapshots and releases

相关标签:
2条回答
  • 2021-01-01 09:51

    "layout" is a legacy switch provided for backwards compatibility with Maven 1, and at this point an anachronism. If you are using Maven 2 or Maven 3 (as I believe at least 99.99% of the world must be at this point) it is indeed "default", as described elsewhere here. By stating that the answer is unequivocally "default", the question of the utility of the switch is obviated; if it is always "default", which does it still exist?

    If you are actually using Maven 1 still, it should be "legacy", but I hope no one is. All this is describe in the Maven specifications:

    layout Either default for the Maven2 layout or legacy for the Maven1 layout. Maven3 also uses the default layout.

    https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html

    0 讨论(0)
  • 2021-01-01 09:56

    altDeploymentRepository String - Specifies an alternative repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ). Format: id::layout::url

    — (source)

    So, in you case: releaseRepository::default::http://your.repo.url (see here for layout).

    0 讨论(0)
提交回复
热议问题