0

我正在尝试在 Eclipse 中使用 Maven 项目。这是我第一次使用 maven 存储库。我正在使用 maven 3.2.3 当我这样做时

mvn clean install -U 

它显示了这些错误

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TreetaggerV2 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://hlt-services4.fbk.eu:8080/artifactory/repo/de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom
Downloading: https://repo.maven.apache.org/maven2/de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.016 s
[INFO] Finished at: 2014-11-11T01:28:05-08:00
[INFO] Final Memory: 12M/333M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project TreetaggerV2: Could not resolve dependencies for project eu.excitementproject:TreetaggerV2:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:jar:20131118.0: Failed to read artifact descriptor for de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:jar:20131118.0: Could not transfer artifact de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.treetagger-bin:pom:20131118.0 from/to FBK (http://hlt-services4.fbk.eu:8080/artifactory/repo): Not authorized , ReasonPhrase:Unauthorized. -> [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

我的 pom 文件是

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>eu.excitementproject</groupId>
  <artifactId>TreetaggerV2</artifactId>
  <version>0.0.1-SNAPSHOT</version>


  <dependencies>
  <dependency>
    <groupId>eu.excitementproject</groupId>
    <artifactId>core</artifactId>
    <version>1.1.4</version>
  </dependency>
    <dependency>
    <groupId>eu.excitementproject</groupId>
    <artifactId>lap</artifactId>
    <version>1.1.4</version>
  </dependency> 


  <dependency>
    <groupId>com.googlecode.json-simple</groupId>
    <artifactId>json-simple</artifactId>
    <version>1.1</version>
  </dependency>

  <!-- TreeTagger related dependencies -->
      <dependency>
              <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
              <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-bin</artifactId>
              <version>20131118.0</version>
      </dependency>
      <dependency>
              <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
              <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-de</artifactId>
              <version>20121207.0</version>
      </dependency>
      <dependency>
              <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
              <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-en</artifactId>
              <version>20111109.0</version>
      </dependency>
      <dependency>
              <groupId>de.tudarmstadt.ukp.dkpro.core</groupId>
              <artifactId>de.tudarmstadt.ukp.dkpro.core.treetagger-model-it</artifactId>
              <version>20101115.0</version>
      </dependency>
<!-- end of TreeTagger related dependencies -->


</dependencies>

<repositories>
  <repository>
    <id>FBK</id>
    <url>http://hlt-services4.fbk.eu:8080/artifactory/repo</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

</project>

我想将 treetagger 从 dkpro 添加到 pom ,但它给出了错误?

4

2 回答 2

3

我相信您正在尝试使用兴奋。他们有一些文档可以帮助您设置 TreeTagger:https ://github.com/hltfbk/Excitement-Open-Platform/wiki/Step-by-Step,-TreeTagger-Installation

不幸的是,TreeTagger 许可证不允许重新分发二进制文件(或模型),这就是为什么您必须自己打包模型和二进制文件以与 Excitement(或 DKPr 核心)一起使用。

披露:我是 DKPro Core 的开发人员。

也就是说,提到我的 MariuszS 的文章通常也是很好的指针。

于 2014-11-11T19:57:17.880 回答
1

阅读这篇文章:

访问文件有问题:de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom

HTTP 状态 401 - 下载请求 repo:path 'tl-repository:de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.treetagger-bin/20131118.0/de.tudarmstadt.ukp.dkpro.core .treetagger-bin-20131118.0.pom'禁止用户 'anonymous' 使用

通常,您需要server使用 creditensial 将定义添加到settings.xml.

<settings>
  <servers>
    <server>
      <id>hlt-services4.fbk.eu</id>
      <username>user</username>
      <password>password</password>
    </server>
  </servers>
</settings>

但在您的特定情况下,您需要使用 ant 脚本在本地安装这个 jars(上面的链接)

(..) 我们提供 Ant 脚本来自动下载资源并将它们打包为与 DKPro 兼容的 JAR。当许可证允许时,我们将这些上传到我们的公共 Maven 存储库。

-O如果所有工件都安装在本地,您可以尝试在离线模式下构建项目。

更多:将凭证添加到您的 Maven 设置

于 2014-11-11T09:56:15.223 回答