我正在尝试使用 PDFCrowd 将 html 文件转换为 PDF。它在 Eclipse 中的普通 Web 项目中工作正常,但在 Maven 项目中运行相同的代码时遇到问题。 pom.xml
给出“缺少 Artifact ”消息。
这是我的 pom.xml
的依赖项:
<dependency>
<groupId>com.pdfcrowd</groupId>
<artifactId>pdfcrowd</artifactId>
<version>2.6</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
最佳答案
我认为网络存储库没有 pdfcrowd。因此,您必须将 jar 安装到本地 m2 文件夹中。
就像下面这样:
block 引用>mvn install:install-file -Dfile=pdfcrowd.jar -DgroupId=com.pdfcrowd -DartifactId=pdfcrowd -Dversion=2.6 -Dpackaging=jar
<dependency> <groupId>com.pdfcrowd</groupId> <artifactId>pdfcrowd</artifactId> <version>2.6</version> </dependency>
关于java - PDF人群 'Missing artifact',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30865191/