From 510fca957d9cf00260efe7ed78a663d46c69adb7 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Fri, 26 Mar 2021 09:54:41 +0100 Subject: update gradle build-process to wrapper 6.8.3 --- pdf-as-tests/build.gradle | 43 ++++++++-------------- .../gv/egiz/param_tests/SignaturePositionTest.java | 9 +++-- 2 files changed, 22 insertions(+), 30 deletions(-) (limited to 'pdf-as-tests') diff --git a/pdf-as-tests/build.gradle b/pdf-as-tests/build.gradle index 57dd84ab..d1822d73 100644 --- a/pdf-as-tests/build.gradle +++ b/pdf-as-tests/build.gradle @@ -7,48 +7,42 @@ jar { } } -repositories { +repositories { mavenLocal() mavenCentral() + maven { url "https://repository.jboss.org/maven2/" } maven { url "http://anonsvn.icesoft.org/repo/maven2/releases/" } maven { url "https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/" } + } configurations{ pdfBox2Compile - pdfBox1Compile } sourceSets{ pdfBox2{ compileClasspath = configurations.pdfBox2Compile } - pdfBox1{ - compileClasspath = configurations.pdfBox1Compile - } } dependencies { - compile project (':pdf-as-lib') - testCompile project (':pdf-as-moa') + implementation project (':pdf-as-lib') + testImplementation project (':pdf-as-moa') - compile project (':signature-standards:sigs-pkcs7detached') - compile project (':signature-standards:sigs-pades') + implementation project (':signature-standards:sigs-pkcs7detached') + implementation project (':signature-standards:sigs-pades') - compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7' - compile group: 'javax.activation', name: 'activation', version: '1.1.1' + implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7' + implementation group: 'javax.activation', name: 'activation', version: '1.1.1' - testCompile group: 'junit', name: 'junit', version: '4.+' - testCompile group: 'org.icepdf', name: 'icepdf-core', version: '5.0.7' + testImplementation group: 'junit', name: 'junit', version: '4.12' + testImplementation group: 'org.icepdf.os', name: 'icepdf-core', version: '6.1.1' - pdfBox1Compile project (':pdf-as-pdfbox') - pdfBox1Compile group: 'org.apache.pdfbox', name: 'preflight', version: '1.8.16' - pdfBox1Compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '1.8.16' - - pdfBox2Compile project (':pdf-as-pdfbox-2') - pdfBox2Compile group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.21' - pdfBox2Compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.21' - pdfBox2Compile group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.21' + implementation project (':pdf-as-pdfbox-2') + //compile group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.21' + //compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.21' + //compile group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.21' } @@ -58,7 +52,7 @@ def suiteDir = new File(projectDir, "src/test/test-suites") logger.info("Searching: " + suiteDir.absolutePath) //Eclipse UI shows an error because source set dependencies are not recognized, so we add the dependencies manually -eclipse.classpath.plusConfigurations+=[configurations.pdfBox1Compile] +//eclipse.classpath.plusConfigurations+=[configurations.pdfBox1Compile] suiteDir.eachDir { File subDir -> def dirname = subDir.name @@ -69,11 +63,6 @@ suiteDir.eachDir { File subDir -> description "runs tests from Test Suite: " + dirname systemProperties 'test.dir': subDir.absolutePath - //based on executed testsuit we setup the classpath - if(dirname =="public_pdfbox1"){ - classpath += sourceSets.pdfBox1.compileClasspath - compileTestJava.classpath += sourceSets.pdfBox1.compileClasspath - } if(dirname =="public_pdfbox2"){ classpath += sourceSets.pdfBox2.compileClasspath compileTestJava.classpath += sourceSets.pdfBox2.compileClasspath diff --git a/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignaturePositionTest.java b/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignaturePositionTest.java index baaf646c..cb06b669 100644 --- a/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignaturePositionTest.java +++ b/pdf-as-tests/src/test/java/at/gv/egiz/param_tests/SignaturePositionTest.java @@ -163,9 +163,10 @@ public class SignaturePositionTest extends SignatureTest { * reference image, as well as the location of the reference * image with ignored areas * @throws IOException + * @throws InterruptedException */ private void captureReferenceImage(SignaturePositionTestInfo testInfo) - throws IOException { + throws IOException, InterruptedException { String pdfName = baseTestData.getOutputFile(); String referenceOutputFile = refImageFileName; int pageNumber = sigPageNumber; @@ -193,11 +194,12 @@ public class SignaturePositionTest extends SignatureTest { * @throws IndexOutOfBoundsException * @throws PrinterException * @throws PDFASError + * @throws InterruptedException */ @Test public void signaturePositionTest() throws FileNotFoundException, CertificateException, IOException, PdfAsException, - IndexOutOfBoundsException, PrinterException, PDFASError { + IndexOutOfBoundsException, PrinterException, PDFASError, InterruptedException { SignaturePositionTestInfo testInfo = SerializiationManager .getInstance().createTestInfo(SignaturePositionTestInfo.class, baseTestData); @@ -309,8 +311,9 @@ public class SignaturePositionTest extends SignatureTest { * @param pageNumber * the page number which should be captured * @return the captured image + * @throws InterruptedException */ - private BufferedImage captureImage(String fileName, int pageNumber) { + private BufferedImage captureImage(String fileName, int pageNumber) throws InterruptedException { Document document = new Document(); try { document.setFile(fileName); -- cgit v1.2.3