Maven项目 - 服务器错误500对我来说,但对其他人工作正常

时间:2012-04-12 14:10:04

标签: maven

我已经检查了一个maven项目,当我尝试编译它时,它给了我一个“Return code is: 500, ReasonPhrase:Internal Server Error.”。奇怪的是,对于同事而言,完全相同的工作没有问题。我能在这做什么?

我的Maven输出

autosparql-lite$ mvn clean compile
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building AutoSPARQL Lite 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Downloaded: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom (5 KB at 9.4 KB/sec)
Downloading: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar
Downloaded: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar (23 KB at 57.3 KB/sec)
Downloading: http://s1.semanticscience.org:8080/nexus/content/groups/public/com/extjs/gxt/2.2.5/gxt-2.2.5.pom
Downloading: http://s1.semanticscience.org:8080/nexus/content/groups/public/uk/ac/shef/wit/simmetrics/1.6.2/simmetrics-1.6.2.pom
Downloading: http://s1.semanticscience.org:8080/nexus/content/groups/public/woodstox/wstx-api/3.2.0/wstx-api-3.2.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.091s
[INFO] Finished at: Thu Apr 12 15:45:28 CEST 2012
[INFO] Final Memory: 14M/209M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project autosparql-lite: 
Could not resolve dependencies for project org.dllearner:autosparql-lite:war:1.0-SNAPSHOT: 
Failed to collect dependencies for [com.google.gwt:gwt-servlet:jar:2.3.0 (compile), com.google.gwt:gwt-user:jar:2.3.0 (provided), net.sf.ehcache:ehcache:pom:2.5.0 (compile), junit:junit:jar:4.8.1 (test), com.extjs:gxt:jar:2.2.5 (compile), org.dllearner:components-ext:jar:1.0-SNAPSHOT (compile), commons-configuration:commons-configuration:jar:1.6 (compile)]: 
Failed to read artifact descriptor for com.extjs:gxt:jar:2.2.5: 
Could not transfer artifact com.extjs:gxt:pom:2.2.5 from/to semanticscience.org (http://s1.semanticscience.org:8080/nexus/content/groups/public/): 
Failed to transfer file: http://s1.semanticscience.org:8080/nexus/content/groups/public/com/extjs/gxt/2.2.5    /gxt-2.2.5.pom. Return code is: 500, ReasonPhrase:Internal Server Error. -> [Help 1]

我的settings.xml

<settings>
   <mirrors>
    <mirror>
      <id>UK</id>
      <name>UK Central</name>
      <url>http://uk.maven.org/maven2</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>

P.S:

我的Maven版

Apache Maven 3.0.4 (rNON-CANONICAL_2012-01-24_13-02_root; 2012-01-24 14:02:02+0100)
Maven home: /opt/maven
Java version: 1.7.0_03-icedtea, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.0.26-1-lts", arch: "amd64", family: "unix"

他的Maven版本

Apache Maven 2.2.1 (rdebian-4)
Java version: 1.7.0
Java home: /usr/lib/jvm/jdk1.7.0/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux" version: "2.6.38-13-generic" arch: "amd64" Family: "unix"

P.S。:它可以与我们的maven版本有关吗?我使用Maven 3并使用Maven 2.这个语义科学服务器来自哪里?

P.P.S。:好的,我终于从我的pom.xml中删除它并删除了〜/ .m2 / repository文件夹,从而摆脱了semanticscience存储库。现在我收到另一个错误,见下文。

奇怪的是,以下网址可以在浏览器中解析:

但ping不起作用:

$ ping http://repo.aduna-software.org
ping: unknown host http://repo.aduna-software.org
$ ping http://repo.aduna-software.org/maven2/releases
ping: unknown host http://repo.aduna-software.org/maven2/releases

但这不是ping的错:

$ ping www.google.de
PING www-cctld.l.google.com (173.194.69.94) 56(84) bytes of data.
64 bytes from bk-in-f94.1e100.net (173.194.69.94): icmp_req=1 ttl=48 time=13.3 ms
[...]

这是错误:

Failed to read artifact descriptor for org.openrdf.sesame:sesame-sail-memory:jar:2.4.0: Could not transfer artifact org.openrdf.sesame:sesame-sail-memory:pom:2.4.0 from/to aduna-software-release-repo (http://repo.aduna-software.org/maven2/releases): repo.aduna-software.org: Der Name oder der Dienst ist nicht bekannt: Unknown host repo.aduna-software.org: Der Name oder der Dienst ist nicht bekannt

我尝试了http://wiki.tuxtorials.de/wiki/Ping:_unknown_host告诉我的事情并做了

echo "echo \"hosts:      files dns\" > /etc/nsswitch.conf" | sudo sh

但这也无济于事。

好的,我不知道为什么,但现在它对我有用。但我想知道为什么......

3 个答案:

答案 0 :(得分:1)

您必须已在某处配置了Maven代理,名称为http://s1.semanticscience.org:8080/nexus/

可能在您的一个settings.xml文件中,位于$HOME/.m2$MAVEN_HOME/conf/

答案 1 :(得分:1)

当Maven试图从那里检索gxt-2.2.5时,似乎Nexus服务器回复了错误500。我会再试一次,如果它仍然无效,请检查浏览器中的URL,并与Nexus安装的管理员联系。

答案 2 :(得分:1)

您正尝试从http://s1.semanticscience.org:8080/nexus/content/groups/public/com/下载com.extjs:gxt:pom:2.2.5,但该Nexus回购无法提供..

我怀疑你的同事必须从另一个存储库中检索该工件,但你不是。查看他可能已经配置的任何其他存储库,或者你要离开的存储库。