maven dependency not resolved, not authorized error

2.7k views Asked by At

I am trying to use a maven project in eclipse. This is the first time I am using maven repository. I am using maven 3.2.3 When I do

mvn clean install -U 

it shows these errors

[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

my pom file is

<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>

I want to add treetagger from dkpro to the pom , but it gives an error?

2

There are 2 answers

1
rec On BEST ANSWER

I believe you are trying to use Excitement. They have some documentation to help you get TreeTagger set up: https://github.com/hltfbk/Excitement-Open-Platform/wiki/Step-by-Step,-TreeTagger-Installation

Unfortunately, the TreeTagger license does not permit redistribution of the binaries (or models), that is why you have to package the models and binaries yourself for use with Excitement (or DKPr Core for that matter).

Disclosure: I'm a developer of DKPro Core.

That said, the articles mentioned my MariuszS are also in general great pointers.

2
MariuszS On

Read this articles:

There is problem with accessing file: de.tudarmstadt.ukp.dkpro.core.treetagger-bin-20131118.0.pom

HTTP Status 401 - Download request for 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' is forbidden for user 'anonymous'.

In general you need to add server definition with creditensial to settings.xml.

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

but in your particular case you need to install this jars locally using ant script (link above)

(..) we offer Ant scripts to automatically download the resources and package them as DKPro-compatible JARs. When the license permits, we upload these to our public Maven repository.

You can try building your project in offline mode -O if all artifacts are installed locally.

More: Adding Credentials to Your Maven Settings