[英]mvn package org.apache.pdfbox not found
I have these imports (among others): 我有这些进口(以及其他):
import org.apache.pdfbox.*;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
I have this dependency in my pom.xml: 我的pom.xml中有此依赖项:
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.4</version>
</dependency>
I see this line in my eclipse maven dependencies: 我在Eclipse Maven依赖项中看到以下行:
pdfbox-2.0.4.jar - C:\Users\Paul\.m2\repository\org\apache\pdfbox\pdfbox\2.0.4\pdfbox-2.0.4.jar
I check the build path in eclipse, and see pdfbox-2.0.4.jar in the Maven Dependencies part. 我在eclipse中检查了构建路径,并在Maven Dependencies部分中看到了pdfbox-2.0.4.jar。
I run mvn clean compile in a command prompt (Windows). 我在命令提示符下(Windows)运行mvn clean compile。
I get the error "package org.apache.pdfbox does not exist" 我收到错误消息“包org.apache.pdfbox不存在”
I run mvn dependency:build-classpath -Dmdep.outputFile=cp.txt 我运行MVN依赖项:build-classpath -Dmdep.outputFile = cp.txt
The following lines are listed in the class path (at the front of the class path): 在类路径中(在类路径的最前面)列出了以下几行:
C:\Users\Paul\.m2\repository\org\apache\pdfbox\pdfbox\2.0.4\pdfbox-2.0.4.jar;
C:\Users\Paul\.m2\repository\org\apache\pdfbox\fontbox\2.0.4\fontbox-2.0.4.jar;
I look in C:\\Users\\Paul.m2\\repository\\org\\apache\\pdfbox\\pdfbox\\2.0.4\\ and I see pdfbox-2.0.4.jar 我看着C:\\ Users \\ Paul.m2 \\ repository \\ org \\ apache \\ pdfbox \\ pdfbox \\ 2.0.4 \\,然后看到pdfbox-2.0.4.jar
So what am I missing? 那我想念什么呢? Why is the pdfbox jar not being found?
为什么找不到pdfbox jar?
remove this line: 删除此行:
import org.apache.pdfbox.*;
because that package does indeed not exist. 因为该软件包确实不存在。 The other ones (with deeper levels) are OK.
其他(更深层次)也可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.