icepdf-core maven install in Eclipse not working

3.5k views Asked by At

I need to use PDFviewer in Vaadin which has a dependency of IcePdf... so I was trying to install it but it gives me DependencyResolutionException. I tried different versions like 4.1.1, 4.2.2 and others as well but nothing works... Iam not very familiar with maven so dont exactly know how to add it through import as it asked for artifact file which I dnt exactly know :(. here is the dependency tag that I've added in pom.xml.

<dependency>
    <groupId>org.icepdf</groupId>
    <artifactId>icepdf-core</artifactId>
    <version>4.1.4</version>
</dependency>

Any idea ???

2

There are 2 answers

1
Michał Kalinowski On

Of course it can't find it because this artifact isn't available at Maven Central neither in any of the most popular public Maven repositories, as I see. You have to figure out how can you get it using Maven. From my 1-minute research, it seems it's basically not available for Maven anywhere in public.

So what can you do. If you use and have access to some kind of own Maven repository (like internal Nexus or something) you can deploy downloaded jars to it. That's the preffered way and it doesn't suck. Alternatively you can install it to the local repo, but every developer will need to do so when starting with the project. Alternatively you can put these libs into SCM along with the code and depend on them using system scope, but that sucks most.

1
rexford On

This thread is a bit old but maybe the answer is still of help to somebody: one way to add a maven dependency for icepdf is to add the ice maven2 repository as well as the dependency to your project's pom, like in the example below. Don't bother that the url of the repository says "anonsvn", they've got a maven repository running there.

<project xmlns="http://maven.apache.org/POM/4.0.0" ... >
  ...
  <repositories>
    <repository>
      <id>ice-maven-release</id>
      <name>Ice Maven Release Repository</name>
      <url>http://anonsvn.icesoft.org/repo/maven2/releases</url>
    </repository>
    ...
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.icepdf</groupId>
      <artifactId>icepdf-core</artifactId>
      <version>4.4.0</version>
    </dependency>
    ...
  </dependencies>
</project>