maven依赖未解决,未授权错误

时间:2014-11-11 09:47:29

标签: eclipse maven dkpro-core

我正在尝试在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>

我想将dkpro中的treetagger添加到pom中,但它会出错?

2 个答案:

答案 0 :(得分:2)

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

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

披露:我是DKPro Core的开发者。

那就是说,提到我的MariuszS的文章也是一般的指针。

答案 1 :(得分:1)

阅读这篇文章:

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

  

HTTP状态401 - 下载repo:path&#39; tl-repository的请求:de / tudarmstadt / ukp / dkpro / core / de.tudarmstadt.ukp.dkpro.core.treetagger-箱/ 20131118.0 / de.tudarmstadt.ukp.dkpro.core.treetagger彬20131118.0.pom&#39;是禁止用户匿名&#39;

通常,您需要将server定义与creditensial一起添加到settings.xml

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

但在您的特定情况下,您需要使用ant脚本(上面的链接)

在本地安装此jar
  

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

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

更多:Adding Credentials to Your Maven Settings