使用Maven构建类路径失败

时间:2018-10-15 11:09:51

标签: java linux maven build classpath

我正在使用git中的Knowledge Graph Identification repository。根据README.md文件,我能够使用batsh fetchDataset.sh下载数据集。然后,我尝试使用Maven使用以下内容构建类路径命令。

~/KnowledgeGraphIdentification/nell_lazy$ mvn dependency:build-classpath -Dmdep.outputFile=classpath.out

但是构建失败并显示以下消息。

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building kgi 1.0.-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for edu.umd.cs:psl-groovy:jar:1.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.306 s
[INFO] Finished at: 2018-10-15T16:28:45+05:30
[INFO] Final Memory: 9M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project kgi: Could not resolve dependencies for project edu.umd.cs.psl.kgi:kgi:jar:1.0.-SNAPSHOT: Failure to find edu.umd.cs:psl-groovy:jar:1.1 in https://scm.umiacs.umd.edu/maven/lccd/content/repositories/psl-releases/ was cached in the local repository, resolution will not be reattempted until the update interval of psl-releases has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

因此,我检查了Maven和Java的安装。

Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-34-generic", arch: "amd64", family: "unix"

因此,对于我为什么使用maven构建类路径失败的原因,我深表感谢。

2 个答案:

答案 0 :(得分:0)

我不是您所在域的专家,但是您想要的mvn回购似乎已经转移,请检查并希望对您有所帮助:

https://github.com/linqs/psl/wiki/Migrating-to-PSL-2#maven-repository-move

https://github.com/linqs/psl/issues/33

答案 1 :(得分:0)

我刚开始运行,并考虑过发布解决方案。 由于我正在运行psl的早期版本,因此无法构建类路径,因为在最新版本中不提供KGI工件。

因此,对于任何新用户,请注意: 通过使用可用的here的CANARY版本pom.xml替换pom.xml文件,我能够成功构建它。 随之而来的是以下psl目录

  • psl-cli
  • psl-core
  • psl-groovy
  • psl-parser
this repo

必须在您正在进行的实验下可用。

然后,以下代码将成功创建创建classpath.out文件的类路径

mvn dependency:build-classpath -Dmdep.outputFile=classpath.out