简体   繁体   English

Eclipse中的icepdf-core maven安装无法正常工作

[英]icepdf-core maven install in Eclipse not working

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. 我需要在Vaadin中使用PDFviewer,它具有IcePdf的依赖...所以我试图安装它,但它给了我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. 我尝试了不同的版本,如4.1.1,4.2.2和其他版本,但没有任何作用...我不太熟悉maven所以不知道如何通过导入添加它,因为它要求我确切知道的工件文件: (。这是我在pom.xml中添加的依赖标记。

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

Any idea ??? 任何想法 ???

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. 这个帖子有点老了但是答案仍然对某人有帮助:为icepdf添加maven依赖的一种方法是添加ice maven2存储库以及项目pom的依赖关系,如下例所示。 Don't bother that the url of the repository says "anonsvn", they've got a maven repository running there. 不要打扰存储库的url说“anonsvn”,他们有一个maven存储库在那里运行。

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

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. 当然,它无法找到它,因为我认为这个工件在Maven Central中不可用于任何最流行的公共Maven存储库。 You have to figure out how can you get it using Maven. 你必须弄清楚如何使用Maven获得它。 From my 1-minute research, it seems it's basically not available for Maven anywhere in public. 从我的1分钟研究来看,它似乎基本上不适用于Maven在公共场合的任何地方。

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. 如果您使用并访问某种自己的Maven存储库(如内部Nexus或其他东西),您可以将下载的jar文件部署到它。 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. 或者,您可以将这些库与代码一起放入SCM,并使用系统范围依赖它们,但这很糟糕。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM