dependencies org.apache.pdfbox.pdmodel

(Axel Pfennig) #1


I tested my java code with
import org.apache.pdfbox.pdmodel.PDDocument
and it worked very well.

Then I used:
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.PDPageContentStream;
import org.apache.pdfbox.pdmodel.font.PDType1Font;

public class GradleTutorial {

gradle clean works. But gradle build produces a lot of errors.
It seems to build a fat-jar. Is there another method to accomplish it?

my build.gradle

repositories {

apply plugin: “java”

dependencies {

compile 'org.apache.pdfbox:pdfbox:1.8.14'


sourceSets { “src/main/java/”

jar {
from configurations.compile.collect { zipTree it}
manifest.attributes “Main-Class”: “GradleTutorial”