Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Jenkins,Maven,Nexus-在需要身份验证的地方将第三方JAR部署到Nexus_Java_Git_Maven_Jenkins_Nexus - Fatal编程技术网

Java Jenkins,Maven,Nexus-在需要身份验证的地方将第三方JAR部署到Nexus

Java Jenkins,Maven,Nexus-在需要身份验证的地方将第三方JAR部署到Nexus,java,git,maven,jenkins,nexus,Java,Git,Maven,Jenkins,Nexus,我正在尝试设置Jenkins CI服务器,以便在构建完成后自动部署到Nexus服务器。我的问题是,由于Nexus存储库受密码保护,而且JAR文件来自第三方(pom.xml文件的存储库设置不正确)。我当前使用的命令如下所示: mvn deploy:deploy-file -Dpackaging=jar -DrepositoryId=nexus -Durl=http://nexus.<redacted>.com/content/repositories/releases -DpomFil

我正在尝试设置Jenkins CI服务器,以便在构建完成后自动部署到Nexus服务器。我的问题是,由于Nexus存储库受密码保护,而且JAR文件来自第三方(pom.xml文件的存储库设置不正确)。我当前使用的命令如下所示:

mvn deploy:deploy-file -Dpackaging=jar -DrepositoryId=nexus -Durl=http://nexus.<redacted>.com/content/repositories/releases -DpomFile=Spigot/Spigot-Server/pom.xml -Dfile=Spigot/Spigot-Server/target/spigot-1.9-R0.1-SNAPSHOT.jar
mvn部署:部署文件-dpackage=jar-DrepositoryId=nexus-Durl=http://nexus..com/content/repositories/releases -DpomFile=Spigot/Spigot-Server/pom.xml-Dfile=Spigot/Spigot-Server/target/Spigot-1.9-R0.1-SNAPSHOT.jar
我也不太确定这是否是一个问题,但由于最近的法律问题,spiget(Minecraft服务器)要求它通过“BuildTools”应用程序运行,该应用程序“补丁”生成的JAR文件,因此我不能直接从git存储库克隆

在这一点上我有点困惑,所以我很感激你能给我的任何帮助。谢谢大家!

编辑:我忘记包含我得到的错误:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Failed to transfer file: http://nexus.<redacted>.com/content/repositories/releases/org/spigotmc/spigot/1.9-R0.1-SNAPSHOT/spigot-1.9-R0.1-20160312.214547-1.jar. Return code is: 400
[信息]------------------------------------------------------------------------
[错误]生成错误
[信息]------------------------------------------------------------------------
[信息]部署项目时出错:无法传输文件:http://nexus..com/content/repositories/releases/org/spigotmc/spigot/1.9-R0.1-SNAPSHOT/spigot-1.9-R0.1-20160312.214547-1.jar. 返回代码是:400

结果表明,由于我是发布到发布存储库而不是快照存储库,Nexus拒绝了构建:

Storing of item releases:/org/spigotmc/spigot/1.9-R0.1-SNAPSHOT/spigot-1.9-R0.1-20160312.214547-1.jar is forbidden by Maven Repository policy. Because releases is a RELEASE repository
我只是将命令更改为:

mvn deploy:deploy-file -Dpackaging=jar -DrepositoryId=nexus -Durl=http://nexus.<redacted>.com/content/repositories/snapshots -DpomFile=Spigot/Spigot-Server/pom.xml -Dfile=Spigot/Spigot-Server/target/spigot-1.9-R0.1-SNAPSHOT.jar
mvn部署:部署文件-dpackage=jar-DrepositoryId=nexus-Durl=http://nexus..com/content/repositories/snapshots -DpomFile=Spigot/Spigot-Server/pom.xml-Dfile=Spigot/Spigot-Server/target/Spigot-1.9-R0.1-SNAPSHOT.jar

它似乎正在工作。

结果表明,由于我是发布到发布存储库而不是快照存储库,Nexus拒绝了构建:

Storing of item releases:/org/spigotmc/spigot/1.9-R0.1-SNAPSHOT/spigot-1.9-R0.1-20160312.214547-1.jar is forbidden by Maven Repository policy. Because releases is a RELEASE repository
我只是将命令更改为:

mvn deploy:deploy-file -Dpackaging=jar -DrepositoryId=nexus -Durl=http://nexus.<redacted>.com/content/repositories/snapshots -DpomFile=Spigot/Spigot-Server/pom.xml -Dfile=Spigot/Spigot-Server/target/spigot-1.9-R0.1-SNAPSHOT.jar
mvn部署:部署文件-dpackage=jar-DrepositoryId=nexus-Durl=http://nexus..com/content/repositories/snapshots -DpomFile=Spigot/Spigot-Server/pom.xml-Dfile=Spigot/Spigot-Server/target/Spigot-1.9-R0.1-SNAPSHOT.jar

而且它似乎正在工作。

为了完整性,大多数时候,当我在与发布插件抗争时,这也是此处所述的原因之一,您也应该接受您的答案!为了完整性,大多数时候,当我与发布插件斗争时,这也是这里所述的原因之一,你也应该接受你的答案!