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