ddd
ddd

Reputation: 5029

can't add maven dependency - apache poi

I created this maven project in Eclipse on my mac. The following two artifacts are in my pom. No problem on MAC.

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.14</version>
</dependency>
<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.14</version>
</dependency>

However when I recently moved the code to Eclipse on my PC I got this weird error "Missing artifact org.apache.poi:poi:jar:3.14". And it points to both the dependency block and the first line of pom (see screenshot) enter image description here. Updated project many times and it did not help.

I have set up two repositories, one public and one institutional.

  <repositories>
    <repository>
        <id>JBoss repository</id>
        <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    </repository>
    <repository>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>central</id>
        <name>repo</name>
        <url>http://risdevtool01p.mdanderson.edu:8081/artifactory/repo</url>
    </repository>
  </repositories>

When I do "mvn clean install -U", it looks like it is trying to download poi and poi-ooxml from two different repositories.

Downloading:http://repository.jboss.org/nexus/content/groups/public/org/apache/poi/poi-ooxml-schemas/3.14/poi-ooxml-schemas-3.14.jar
Downloading: http://repository.jboss.org/nexus/content/groups/public/org/apache/poi/poi/3.14/poi-3.14.jar
Downloading: http://risdevtool01p.mdanderson.edu:8081/artifactory/repo/org/apache/poi/poi/3.14/poi-3.14.jar
Downloading: http://risdevtool01p.mdanderson.edu:8081/artifactory/repo/org/apache/poi/poi-ooxml-schemas/3.14/poi-ooxml-schemas-3.14.jar

Upvotes: 3

Views: 13221

Answers (1)

Nicolas Filotto
Nicolas Filotto

Reputation: 45005

The problem is in the nexus of JBoss, the artifact is not properly deleted indeed we had the version in the list of available versions but the version is not available at the expected location which is http://repository.jboss.org/nexus/content/groups/public/org/apache/poi/poi/3.14/

404 - Path /org/apache/poi/poi/3.14/ not found in group repository "Public Repository Group" [id=public].

Path /org/apache/poi/poi/3.14/ not found in group repository "Public Repository Group" [id=public].

But, obviously they've just removed this version properly indeed now this version is no more part of the available versions as you can see here http://repository.jboss.org/nexus/content/groups/public/org/apache/poi/poi/ such that if you remove it from your local repository and try again with a command of type mvn clean install, it will work

Upvotes: 4

Related Questions