maven发布jar到远程仓库常见问题汇总

一、报错: org.sonatype.aether.connector.async.ResourceDoesNotExistException : Unable to locate resource http://repo.akka.io/snapshots/com/tuniu/nfbird/spring-factorylist/1.3.0-SNAPSHOT/maven-metadata.xml. Error code 404
解决办法:
将多余的 < repositories > < repository >注释掉。


二、报错:  Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter
解决办法:
      在pom文件中添加:

    <distributionManagement>

<repository>

<id>devid>

<name>Internal Releasesname>

<url>http://10.101.310.62:8080/artifactory/release-localurl>

repository>

<snapshotRepository>

<id>devid>

<name>Internal Snapshotsname>

<url>http://10.101.310.62:8080/artifactory/release-localurl>

snapshotRepository>

distributionManagement>

你可能感兴趣的:(maven)