简体   繁体   中英

Maven android release:perform problem with distributionManagement

I am using the maven android-release archetype

After the release:prepare successed, I ran a release:perform and get the following error :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project xxx: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter

But in my pom.xml I have the following :

<distributionManagement>

<repository>
  <id>nexus-releases</id>
  <name>RepositoryProxyRel</name>
  <url>http://server:8081/nexus/content/repositories/releases/</url>
</repository>

<snapshotRepository>
  <id>nexus-snapshots</id>
  <name>RepositoryProxySnap</name>
  <url>http://server:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>

Could anybody explain what is wrong with my configuration and why I get this error ? Thanks a lot in advance.

Ok, I set the distributionManagement tag after the mvn release:prepare, so the modification was not taken into account. I performed a release:rollback, commited the modification of my pom with the distributionManagement, performed again a release:prepare, and now the release:perform works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM