【问题标题】:Building Class path using Maven Fails使用 Maven 构建类路径失败
【发布时间】:2019-03-19 19:16:34
【问题描述】:

我正在使用来自 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 构建的类路径为何在此处失败,我将不胜感激。

【问题讨论】:

    标签: java linux maven build classpath


    【解决方案1】:

    我不是您所在领域的专家,但您想要的 mvn 存储库似乎已移动,请查看并希望对您有所帮助:

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

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

    【讨论】:

    • 感谢您的回复。我更改了 pom.xml 文件中的 repo 路径。这会下载依赖项但失败并出现以下错误。 [ERROR] Failed to execute goal on project kgi: Could not resolve dependencies for project edu.umd.cs.psl.kgi:kgi:jar:1.0.-SNAPSHOT: The following artifacts could not be resolved: edu.emory.mathcs:csparsej:jar:1.0, org.ujmp:ujmp-complete:jar:0.2.4, de.mathnbits:mathnbitsSTL:jar:1.0, com.wcohen:secondstring:jar:20120620: Could not find artifact edu.emory.mathcs:csparsej:jar:1.0 in psl-releases (http://maven.linqs.org/maven/repositories/psl-releases/)
    【解决方案2】:

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

    所以只是对任何新用户的附注: 通过将 pom.xml 文件替换为此 CANARY 版本 pom.xml 可用 here,我能够成功构建它。 除此之外,以下 psl 目录

    • psl-cli
    • psl 核心
    • psl-groovy
    • psl 解析器

    来自this repo 需要在您正在进行的实验中提供。

    那么下面将成功构建创建classpath.out文件的类路径

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-09
      • 2014-09-05
      • 2020-06-01
      • 2019-05-03
      • 2016-02-14
      相关资源
      最近更新 更多