2

当我尝试在 Jenkins 中构建我的项目时,出现以下错误:

[ERROR] Artifact: org.apache.tomcat:tomcat-api:jar:7.0.19 has no file.
[ERROR] Artifact: org.apache.tomcat:tomcat-servlet-api:jar:7.0.19 has no file.
[ERROR] Artifact: org.codehaus.jackson:jackson-core-asl:jar:1.9.11 has no file.
[ERROR] Artifact: org.codehaus.jackson:jackson-jaxrs:jar:1.9.11 has no file.
[ERROR] Artifact: org.codehaus.jackson:jackson-mapper-asl:jar:1.9.11 has no file.
[ERROR] Artifact: org.codehaus.jackson:jackson-xc:jar:1.9.11 has no file.
[ERROR] Artifact: org.codehaus.jettison:jettison:jar:1.3.3 has no file.
[ERROR] Artifact: org.glassfish.hk2:hk2-api:jar:2.2.0-b10 has no file.
[ERROR] Unable to determine if resource org.apache.tomcat:tomcat-api:jar:7.0.19:provided exists in http://maven.glassfish.org/content/groups/glassfish
[ERROR] Unable to determine if resource org.apache.tomcat:tomcat-servlet-api:jar:7.0.19:provided exists in http://maven.glassfish.org/content/groups/glassfish
[ERROR] Unable to determine if resource org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile exists in http://maven.glassfish.org/content/groups/glassfish
[ERROR] Unable to determine if resource org.codehaus.jackson:jackson-jaxrs:jar:1.9.11:compile exists in http://maven.glassfish.org/content/groups/glassfish
[ERROR] Unable to determine if resource org.codehaus.jackson:jackson-mapper-asl:jar:1.9.11:compile exists in http://maven.glassfish.org/content/groups/glassfish
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project LDAPTool: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

然后我修改了我的 POM 文件以包含<distributionManagement>标签。我将以下块添加到我的 POM 文件中

<distributionManagement>
<downloadUrl>http://repo.release.xxx.corp/main/repo/</downloadUrl>
<repository>
    <id>release-main</id>
    <name>Main Repository</name>
    <url>http://repo.release.xxx.corp/main/repo</url>
</repository>
</distributionManagement>

但我仍然收到以下错误

  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) 
on project LDAPTool: Failed to deploy artifacts: Could not transfer artifact LDAPTool:LDAPTool:war:0.0.1-     20130829.191823-1 from/toxxx-release-main (http://repo.release..corp/main/repo): Failed to transfer file: http://repo.release.xxx.corp/main/repo/LDAPTool/LDAPTool/0.0.1-SNAPSHOT/LDAPTool-0.0.1-20130829.191823-1.war. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

然后我将 settings.xml 文件配置为包含用户名和密码,但仍然出现错误。有人可以指导我解决方案是什么。

4

0 回答 0