我正在尝试部署到我们的内部关系存储库。我已经配置了一个 Maven 项目,我可以在其中执行 amvn install
和mvn clean deploy
. 奇怪的是,当我SNAPSHOT
从版本中删除时,我得到了一个404
.
这是我的 pom.xml 适用于SNAPSHOTS
:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>MavenExample</groupId>
<artifactId>com.mycompany</artifactId>
<version>1.0-SNAPSHOT</version>
<distributionManagement>
<repository>
<id>nexus</id>
<url>http://nexus.mycompany.com:8000/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<url>http://nexus.mycompany.com:8000/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>nexus</serverId>
<nexusUrl>http://nexus.mycompany.com:8000/repository/maven-releases/</nexusUrl>
<!-- update this to the correct id! -->
<stagingProfileId>myid</stagingProfileId>
</configuration>
</plugin>
</plugins>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
当我更改<version>1.0-SNAPSHOT</version>
为<version>1.0</version>
我收到此错误:
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project explicit-staging-example: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy failed: Nexus connection problem to URL [http://nexus.mycompany.com:8000/repository/maven-releases/ ]: 404 - Not Found -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Run Code Online (Sandbox Code Playgroud)
它们都可以在连接中使用:
我尝试过添加不同的插件,但没有成功。我不是 Maven 专家,因此任何帮助将不胜感激!
归档时间: |
|
查看次数: |
2461 次 |
最近记录: |