ไม่พบอาร์ติแฟกต์เมื่อปรับใช้อาร์ติแฟกต์กับ Nexus

Aug 17 2020

ฉันกำลังปรับใช้อาร์ติแฟกต์กับที่เก็บสแน็ปช็อต Nexus ที่อนุญาตให้ปรับใช้ใหม่โดยใช้คำสั่ง maven:

mvn deploy:deploy-file -Durl=https://t-nexus.perque.com/service/repository/t-PASTIS -DrepositoryId=t-nexus.perque-snapshots -DgroupId=com.perque -DartifactId=pastis -Dversion=0.0.1-SNAPSHOT -Dpackaging=war  -Dfile=pastis.war -DgeneratePom=true -e -X

แต่ฉันมีข้อผิดพลาดนี้:

       at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not find artifact com.perque:pastis:war:0.0.1-20200817.082538-1 in t-nexus.perque-snapshots (https://t-nexus.perque.com/service/repo/t-PASTIS)

ใช้ปุ่มอัปโหลดของหน้า repo Nexus ทุกอย่างเป็นไปด้วยดี

คำตอบ

1 RahulSawant Aug 19 2020 at 19:03

หวังว่าชื่อโฮสต์และเส้นทางของคุณจะถูกต้อง ถ้าเป็นเช่นนั้นลองสิ่งต่างๆด้านล่าง -

คุณควรลองเพิ่มด้านล่างหากอยู่หลังพร็อกซีใน settings.xml (~ / .m2 / ไดเร็กทอรี)

<proxies>
  <proxy>
    ...
    <nonProxyHosts>yourserver</nonProxyHosts>
  </proxy>
</proxies>

เพิ่มรายละเอียดเซิร์ฟเวอร์ดังด้านล่าง

<server> <id>xx</id><username>serverUser</username><password>password</password> </server>

นอกจากนี้ฉันมีข้อผิดพลาดที่คล้ายกันสำหรับ jar ของบุคคลที่สาม .. ฉันได้ตั้งค่าการกำหนดค่าเป็นรีลีสแทนสแนปชอตสำหรับ repo ของบุคคลที่สาม ดังนั้นลองทำเช่นกัน