如果maven deploy失败,抛出如下信息:
Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
则可能是未配置distributionManagement,配置如下
<distributionManagement> <repository> <id>odianyun-snapshots</id> <name>snapshots</name> <url>http://<NEXUS IP>:8081/content/repositories/snapshots/</url> </repository> </distributionManagement>