我检查了一个 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>
PS:
我的 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"
PS:这和我们的maven版本有关系吗?我使用 Maven 3,他使用 Maven 2。这个语义科学服务器来自哪里?
PPS:好的,我终于摆脱了语义科学存储库,方法是从我的 pom.xml 中删除它并删除 ~/.m2/repository 文件夹。现在我得到另一个错误,见下文。
奇怪的是,以下网址可以在浏览器中解析:
但是 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
但这也无济于事。
好的,我不知道为什么,但现在它对我有用。但我想知道为什么...