Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
import org.apache.pdfbox.*;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
I have this dependency in my 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:
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.
I run mvn clean compile in a command prompt (Windows).
I get the error "package org.apache.pdfbox does not exist"
I run mvn dependency: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
So what am I missing? Why is the pdfbox jar not being found?
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.