diff options
author | Thomas <> | 2021-03-26 09:54:41 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-26 09:54:41 +0100 |
commit | 510fca957d9cf00260efe7ed78a663d46c69adb7 (patch) | |
tree | 8129c4ab6ff144e28a02d0a8f443561ce8a5e52e | |
parent | b51e3b877fa7c8b930e63fd8e1317e34d7d4773e (diff) | |
download | pdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.tar.gz pdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.tar.bz2 pdf-as-4-510fca957d9cf00260efe7ed78a663d46c69adb7.zip |
update gradle build-process to wrapper 6.8.3
22 files changed, 219 insertions, 195 deletions
diff --git a/build.gradle b/build.gradle index f57f4555..f0975e01 100644 --- a/build.gradle +++ b/build.gradle @@ -9,16 +9,10 @@ buildscript { } } -/* -task wrapper(type: Wrapper) { - gradleVersion = '5.6.4' -} -*/ - allprojects { apply plugin: "com.github.ben-manes.versions" repositories { mavenCentral() } - version = '4.1.7-RC-0.0.4' + version = '4.1.7-RC-0.0.5' } configurations { @@ -50,9 +44,10 @@ task checkCVE { subprojects { - apply plugin: 'java' + apply plugin: 'java-library' apply plugin: 'eclipse' - apply plugin: 'maven' + apply plugin: 'maven-publish' + //apply plugin: 'maven' group = 'at.gv.egiz.pdfas' configurations { @@ -63,8 +58,8 @@ subprojects { repositories { mavenCentral() } dependencies { - testCompile 'junit:junit:4.8.2' - cveCheck 'org.owasp:dependency-check-ant:1.2.5' + testImplementation 'junit:junit:4.13.2' + cveCheck 'org.owasp:dependency-check-ant:6.1.3' } task sourcesJar(type: Jar, dependsOn: classes) { @@ -124,12 +119,27 @@ subprojects { checkCVELocal.dependsOn copyDepsLocal - uploadArchives { - repositories.mavenDeployer { - repository(url: project.releaseRepoUrl) - snapshotRepository(url: project.snapshotRepoUrl) - } - } + publishing { + publications { + myLibrary(MavenPublication) { + from components.java + } + } + + repositories { + maven { + name = 'egiz_repo' + url = version.endsWith('SNAPSHOT') ? project.snapshotRepoUrl : project.releaseRepoUrl + } + } + } + + //uploadArchives { + // repositories.mavenDeployer { + // repository(url: project.releaseRepoUrl) + // snapshotRepository(url: project.snapshotRepoUrl) + // } + //} task(internalRelease) { doLast { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differindex a1347e58..94336fca 100644 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1d5b29fb..442d9132 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip diff --git a/pdf-as-cli/build.gradle b/pdf-as-cli/build.gradle index 3c80e425..42099a1b 100644 --- a/pdf-as-cli/build.gradle +++ b/pdf-as-cli/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'application' @@ -32,17 +32,17 @@ sourceSets{ } dependencies { - compile project (':pdf-as-lib') - compile project (':signature-standards:sigs-pkcs7detached') - compile project (':signature-standards:sigs-pades') - compile project (':pdf-as-moa') - pdfBox1Compile project (':pdf-as-pdfbox') - pdfBox2Compile project (':pdf-as-pdfbox-2') - compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2' - compile group: 'commons-cli', name: 'commons-cli', version: '1.2' - compile group: 'javax.activation', name: 'activation', version: '1.1.1' - compile 'ch.qos.logback:logback-classic:1.1.2' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation project (':signature-standards:sigs-pkcs7detached') + implementation project (':signature-standards:sigs-pades') + implementation project (':pdf-as-moa') + pdfBox1Implementation project (':pdf-as-pdfbox') + pdfBox2Implementation project (':pdf-as-pdfbox-2') + implementation group: 'commons-collections', name: 'commons-collections', version: '3.2.2' + implementation group: 'commons-cli', name: 'commons-cli', version: '1.2' + implementation group: 'javax.activation', name: 'activation', version: '1.1.1' + implementation 'ch.qos.logback:logback-classic:1.1.2' + testImplementation group: 'junit', name: 'junit', version: '4.+' } @@ -67,31 +67,29 @@ task pdfbox1Startscript(type: CreateStartScripts) { } distZip { - baseName = archivesBaseName duplicatesStrategy = DuplicatesStrategy.EXCLUDE - into("${baseName}-${version}/lib") { + into("${archiveBaseName}-${archiveVersion}/lib") { from startScripts.classpath } - into("${baseName}-${version}/lib") { + into("${archiveBaseName}-${archiveVersion}/lib") { from pdfbox1Startscript.classpath } - into("${baseName}-${version}/bin") { + into("${archiveBaseName}-${archiveVersion}/bin") { from pdfbox1Startscript } } distTar { - baseName = archivesBaseName duplicatesStrategy = DuplicatesStrategy.EXCLUDE - - into("${baseName}-${version}/lib") { + + into("${archiveBaseName}-${archiveVersion}/lib") { from startScripts.classpath } - into("${baseName}-${version}/lib") { + into("${archiveBaseName}-${archiveVersion}/lib") { from pdfbox1Startscript.classpath } - into("${baseName}-${version}/bin") { + into("${archiveBaseName}-${archiveVersion}/bin") { from pdfbox1Startscript } } diff --git a/pdf-as-common/build.gradle b/pdf-as-common/build.gradle index e1a5fdfc..a607fcfe 100644 --- a/pdf-as-common/build.gradle +++ b/pdf-as-common/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' jar { @@ -20,14 +20,15 @@ releases.dependsOn jar releases.dependsOn sourcesJar dependencies { - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2' - compile group: 'commons-io', name: 'commons-io', version: '2.4' - compile group: 'ognl', name: 'ognl', version: '3.0.6' - compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' - compile 'commons-codec:commons-codec:1.10' - compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' - testCompile group: 'junit', name: 'junit', version: '4.+' + api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + api group: 'commons-collections', name: 'commons-collections', version: '3.2.2' + api group: 'commons-io', name: 'commons-io', version: '2.8.0' + api group: 'ognl', name: 'ognl', version: '3.2.19' + api group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + api 'commons-codec:commons-codec:1.10' + api group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' + api group: 'javax.jws', name: 'javax.jws-api', version: '1.1' + testImplementation group: 'junit', name: 'junit', version: '4.+' } test { diff --git a/pdf-as-legacy/build.gradle b/pdf-as-legacy/build.gradle index e82c265f..9b5d685d 100644 --- a/pdf-as-legacy/build.gradle +++ b/pdf-as-legacy/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'java-library-distribution' @@ -15,13 +15,13 @@ repositories { } dependencies { - compile project (':pdf-as-lib') - compile project (':pdf-as-moa') - compile project (':signature-standards:sigs-pkcs7detached') - compile project (':signature-standards:sigs-pades') - compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.1' - compile group: 'commons-codec', name: 'commons-codec', version: '1.8' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation project (':pdf-as-moa') + implementation project (':signature-standards:sigs-pkcs7detached') + implementation project (':signature-standards:sigs-pades') + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation group: 'commons-codec', name: 'commons-codec', version: '1.15' + testImplementation group: 'junit', name: 'junit', version: '4.+' } task releases(type: Copy) { diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle index 1ddc1f9a..c7506a26 100644 --- a/pdf-as-lib/build.gradle +++ b/pdf-as-lib/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'java-library-distribution' @@ -13,7 +13,7 @@ buildscript { mavenLocal() mavenCentral() } - dependencies { classpath("commons-io:commons-io:2.4") } + dependencies { classpath("commons-io:commons-io:2.8.0") } } sourceSets { @@ -41,6 +41,7 @@ project.ext { task createConf(type: Zip, dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME) { from 'src/configuration' + //archiveBaseName 'config' archiveName 'config.zip' destinationDir new File(projectDir, 'src/main/resources/config') } @@ -54,29 +55,29 @@ repositories { } dependencies { - compile project (':pdf-as-common') - compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.12' - compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.12' - compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.65' - compile group: 'javax.activation', name: 'activation', version: '1.1.1' - compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' - compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6' - compile group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.7.0' - compile group: 'commons-io', name: 'commons-io', version: '2.6' - compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' - compile 'org.apache.commons:commons-collections4:4.4' - compile group: 'ognl', name: 'ognl', version: '3.0.8' - compile files('libs/iaik_eccelerate_cms.jar') - compile files('libs/iaik_eccelerate.jar') - compile files('libs/iaik_jce_full.jar') - compile files('libs/iaik_cms.jar') - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion + api project (':pdf-as-common') + api group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + api group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.13' + api group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' + api group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.68' + api group: 'javax.activation', name: 'activation', version: '1.1.1' + api group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + api group: 'com.google.code.gson', name: 'gson', version: '2.8.6' + api group: 'org.bitbucket.b_c', name: 'jose4j', version: '0.7.6' + api group: 'commons-io', name: 'commons-io', version: '2.8' + api group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' + api 'org.apache.commons:commons-collections4:4.4' + api group: 'ognl', name: 'ognl', version: '3.2.19' + api files('libs/iaik_eccelerate_cms.jar') + api files('libs/iaik_eccelerate.jar') + api files('libs/iaik_jce_full.jar') + api files('libs/iaik_cms.jar') + api group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + api group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion - compile group: 'com.google.zxing', name: 'core', version: '3.2.0' - compile group: 'com.google.zxing', name: 'javase', version: '3.2.0' - testCompile group: 'junit', name: 'junit', version: '4.+' + api group: 'com.google.zxing', name: 'core', version: '3.4.1' + api group: 'com.google.zxing', name: 'javase', version: '3.4.1' + testImplementation group: 'junit', name: 'junit', version: '4.+' ws group: 'org.apache.cxf', name: 'cxf-tools', version: cxfVersion ws group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-databinding-jaxb', version: cxfVersion ws group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-frontend-jaxws', version: cxfVersion diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java index edb87eb2..d7d83b34 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/CertificateResolver.java @@ -28,11 +28,17 @@ import at.gv.egiz.pdfas.common.utils.DNUtils; import at.gv.egiz.pdfas.common.utils.OgnlUtils; import at.gv.egiz.pdfas.lib.impl.status.OperationStatus; import iaik.x509.X509Certificate; +import ognl.AbstractMemberAccess; +import ognl.MemberAccess; +import ognl.Ognl; import ognl.OgnlContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.naming.InvalidNameException; + +import java.lang.reflect.Member; +import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; @@ -45,7 +51,16 @@ public class CertificateResolver implements IResolver { public CertificateResolver(X509Certificate certificate, OperationStatus operationStatus) { this.certificate = certificate; - this.ctx = new OgnlContext(); + + MemberAccess memberAccess = new AbstractMemberAccess() { + @Override + public boolean isAccessible(Map context, Object target, Member member, String propertyName) { + int modifiers = member.getModifiers(); + return Modifier.isPublic(modifiers); + } + }; + + this.ctx = new OgnlContext(null, null, memberAccess); this.ctx.put("sn", this.certificate.getSerialNumber().toString()); diff --git a/pdf-as-lib/src/main/resources/config/config.zip b/pdf-as-lib/src/main/resources/config/config.zip Binary files differindex 0c4be90c..38cc4f34 100644 --- a/pdf-as-lib/src/main/resources/config/config.zip +++ b/pdf-as-lib/src/main/resources/config/config.zip diff --git a/pdf-as-moa/build.gradle b/pdf-as-moa/build.gradle index 5e9db4c0..62fa9530 100644 --- a/pdf-as-moa/build.gradle +++ b/pdf-as-moa/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' apply plugin: 'java-library-distribution' @@ -45,15 +45,16 @@ repositories { } dependencies { - compile project (':pdf-as-lib') - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + testImplementation group: 'junit', name: 'junit', version: '4.+' ws group: 'org.apache.cxf', name: 'cxf-tools', version: cxfVersion ws group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-databinding-jaxb', version: cxfVersion ws group: 'org.apache.cxf', name: 'cxf-tools-wsdlto-frontend-jaxws', version: cxfVersion - compile group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1' - compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3'} + api group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1' + api group: 'javax.jws', name: 'javax.jws-api', version: '1.1' + api group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3'} task wsdl2Java() { if (!wsdlDir.listFiles()) { diff --git a/pdf-as-pdfbox-2/build.gradle b/pdf-as-pdfbox-2/build.gradle index 282c7a9e..66c003ec 100644 --- a/pdf-as-pdfbox-2/build.gradle +++ b/pdf-as-pdfbox-2/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' jar { @@ -30,19 +30,20 @@ releases.dependsOn jar releases.dependsOn sourcesJar dependencies { - compile project (':pdf-as-lib') - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile 'org.slf4j:jcl-over-slf4j:1.7.18' - compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.21' - compile group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.21' - compile group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.21' - compile group: 'commons-io', name: 'commons-io', version: '2.4' - compile group: 'ognl', name: 'ognl', version: '3.0.6' - testCompile group: 'junit', name: 'junit', version: '4.+' - compile group: 'com.github.jai-imageio', name: 'jai-imageio-jpeg2000', version: '1.3.0' - compile group: 'com.github.jai-imageio', name: 'jai-imageio-core', version: '1.4.0' - compile group: 'com.levigo.jbig2', name: 'levigo-jbig2-imageio', version: '1.6.5' - compile group: 'javax.activation', name: 'activation', version: '1.1.1' + implementation project (':pdf-as-lib') + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + implementation 'org.slf4j:jcl-over-slf4j:1.7.30' + api group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.23' + api group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.23' + api group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.23' + implementation group: 'commons-io', name: 'commons-io', version: '2.8' + implementation group: 'ognl', name: 'ognl', version: '3.2.19' + testImplementation group: 'junit', name: 'junit', version: '4.+' + + api group: 'com.github.jai-imageio', name: 'jai-imageio-jpeg2000', version: '1.4.0' + api group: 'com.github.jai-imageio', name: 'jai-imageio-core', version: '1.4.0' + api group: 'com.levigo.jbig2', name: 'levigo-jbig2-imageio', version: '2.0' + implementation group: 'javax.activation', name: 'activation', version: '1.1.1' } diff --git a/pdf-as-pdfbox/build.gradle b/pdf-as-pdfbox/build.gradle index 2283057f..aa86d2ab 100644 --- a/pdf-as-pdfbox/build.gradle +++ b/pdf-as-pdfbox/build.gradle @@ -20,15 +20,15 @@ releases.dependsOn jar releases.dependsOn sourcesJar dependencies { - compile project (':pdf-as-lib') - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile 'org.slf4j:jcl-over-slf4j:1.7.18' - compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '1.8.16' - compile group: 'commons-io', name: 'commons-io', version: '2.4' - compile group: 'ognl', name: 'ognl', version: '3.0.6' - compile group: 'javax.activation', name: 'activation', version: '1.1.1' - - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + implementation 'org.slf4j:jcl-over-slf4j:1.7.18' + api group: 'org.apache.pdfbox', name: 'pdfbox', version: '1.8.16' + implementation group: 'commons-io', name: 'commons-io', version: '2.8' + implementation group: 'ognl', name: 'ognl', version: '3.2.19' + implementation group: 'javax.activation', name: 'activation', version: '1.1.1' + + testImplementation group: 'junit', name: 'junit', version: '4.+' } test { 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); diff --git a/pdf-as-web-client/build.gradle b/pdf-as-web-client/build.gradle index 961c4c48..541369f9 100644 --- a/pdf-as-web-client/build.gradle +++ b/pdf-as-web-client/build.gradle @@ -13,9 +13,10 @@ repositories { } dependencies { - compile 'org.apache.commons:commons-collections4:4.4' - compile project (':pdf-as-common') - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation 'org.apache.commons:commons-collections4:4.4' + implementation group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1' + implementation project (':pdf-as-common') + testImplementation group: 'junit', name: 'junit', version: '4.+' } test { diff --git a/pdf-as-web-db/build.gradle b/pdf-as-web-db/build.gradle index 0fc400e5..91a4825d 100644 --- a/pdf-as-web-db/build.gradle +++ b/pdf-as-web-db/build.gradle @@ -14,13 +14,14 @@ repositories { } dependencies { - compile project (':pdf-as-web') - compile project (':pdf-as-web-status') - compile "org.hibernate:hibernate-core:4.3.6.Final" - compile "org.hibernate:hibernate-entitymanager:4.3.6.Final" - compile group: 'log4j', name: 'log4j', version: '1.2.17' - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-web') + implementation project (':pdf-as-web-status') + implementation project (':pdf-as-web-statistic-api') + api "org.hibernate:hibernate-core:4.3.11.Final" + api "org.hibernate:hibernate-entitymanager:4.3.11.Final" + implementation group: 'log4j', name: 'log4j', version: '1.2.17' + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + testImplementation group: 'junit', name: 'junit', version: '4.+' } task releases(type: Copy) { diff --git a/pdf-as-web-statistic-api/build.gradle b/pdf-as-web-statistic-api/build.gradle index 5de4630a..aa9429d7 100644 --- a/pdf-as-web-statistic-api/build.gradle +++ b/pdf-as-web-statistic-api/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'war' apply plugin: 'eclipse' apply plugin: 'java-library-distribution' @@ -21,9 +21,9 @@ sourceSets.test.compileClasspath += configurations.providedCompile sourceSets.test.runtimeClasspath += configurations.providedCompile dependencies { - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile 'org.apache.commons:commons-lang3:3.3.2' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + implementation 'org.apache.commons:commons-lang3:3.3.2' + testImplementation group: 'junit', name: 'junit', version: '4.+' } task releases(type: Copy) { diff --git a/pdf-as-web-status/build.gradle b/pdf-as-web-status/build.gradle index e856ea1f..c9812956 100644 --- a/pdf-as-web-status/build.gradle +++ b/pdf-as-web-status/build.gradle @@ -21,10 +21,10 @@ sourceSets.test.compileClasspath += configurations.providedCompile sourceSets.test.runtimeClasspath += configurations.providedCompile dependencies { - compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion - compile 'org.apache.commons:commons-lang3:3.3.2' - providedCompile 'javax.servlet:javax.servlet-api:3.0.1' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion + implementation 'org.apache.commons:commons-lang3:3.3.2' + compileOnly 'javax.servlet:javax.servlet-api:3.0.1' + testImplementation group: 'junit', name: 'junit', version: '4.+' } task releases(type: Copy) { diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle index d97ad500..28cb4c1d 100644 --- a/pdf-as-web/build.gradle +++ b/pdf-as-web/build.gradle @@ -3,11 +3,16 @@ apply plugin: 'eclipse' apply plugin: 'eclipse-wtp' apply plugin: 'war' +apply plugin: 'org.akhikhl.gretty' + buildscript { repositories { jcenter() // enable this to use snapshot versions of Gretty: // maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' } + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { @@ -15,7 +20,7 @@ buildscript { } } -apply plugin: 'org.akhikhl.gretty' + configurations { providedCompile pdfbox2 @@ -41,32 +46,30 @@ sourceSets.test.runtimeClasspath += configurations.providedCompile dependencies { - compile project (':pdf-as-lib') - compile project (':pdf-as-moa') - compile project (':signature-standards:sigs-pkcs7detached') - compile project (':signature-standards:sigs-pades') + api project (':pdf-as-lib') + api project (':pdf-as-moa') + api project (':signature-standards:sigs-pkcs7detached') + api project (':signature-standards:sigs-pades') pdfbox1 project (':pdf-as-pdfbox') - compile project (':pdf-as-web-status') - compile project (':pdf-as-web-statistic-api') - compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1' - compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.21' - compile group: 'org.apache.pdfbox', name: 'pdfbox-tools', version: '2.0.21' - compile group: 'org.apache.pdfbox', name: 'preflight', version: '2.0.21' - compile group: 'opensymphony', name: 'sitemesh', version: '2.4.2' - compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' - compile group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1' - compile group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' - compile "commons-codec:commons-codec:1.9" - compile 'org.apache.commons:commons-lang3:3.3.2' - compile 'org.apache.cxf:cxf-rt-transports-http:3.0.1' - compile 'org.apache.cxf:cxf-rt-frontend-jaxws:3.0.1' - compile 'com.thetransactioncompany:cors-filter:2.3' - compile 'ch.qos.logback:logback-classic:1.1.3' - compile 'ch.qos.logback:logback-core:1.1.3' - compile 'org.json:json:20160212' + api project (':pdf-as-web-status') + api project (':pdf-as-web-statistic-api') + api group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1' + api group: 'opensymphony', name: 'sitemesh', version: '2.4.2' + api group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + api group: 'javax.xml.ws', name: 'jaxws-api', version: '2.3.1' + api group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '2.3.3' + api "commons-codec:commons-codec:1.15" + api 'org.apache.commons:commons-lang3:3.12.0' + api 'org.apache.cxf:cxf-rt-transports-http:3.4.1' + api 'org.apache.cxf:cxf-rt-frontend-jaxws:3.4.1' + api 'com.thetransactioncompany:cors-filter:2.9.1' + api 'ch.qos.logback:logback-classic:1.2.3' + api 'ch.qos.logback:logback-core:1.2.3' + api 'org.json:json:20210307' + api group: 'javax.jws', name: 'javax.jws-api', version: '1.1' pdfbox2 project (':pdf-as-pdfbox-2') - providedCompile 'javax.servlet:javax.servlet-api:3.0.1' - testCompile group: 'junit', name: 'junit', version: '4.+' + compileOnly 'javax.servlet:javax.servlet-api:3.0.1' + testImplementation group: 'junit', name: 'junit', version: '4.+' } gretty { diff --git a/settings.gradle b/settings.gradle index 211300b8..4e4b5df1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -include "pdf-as-common", "signature-standards:sigs-pkcs7detached", "signature-standards:sigs-pades", "pdf-as-lib", "pdf-as-pdfbox", "pdf-as-pdfbox-2", "pdf-as-moa", "pdf-as-cli", "pdf-as-legacy", "pdf-as-web-status", "pdf-as-web-statistic-api", "pdf-as-web", "pdf-as-web-db", "pdf-as-web-client", "pdf-as-tests"
\ No newline at end of file +include "pdf-as-common", "signature-standards:sigs-pkcs7detached", "signature-standards:sigs-pades", "pdf-as-lib", "pdf-as-pdfbox", "pdf-as-pdfbox-2", "pdf-as-moa", "pdf-as-cli", "pdf-as-legacy", "pdf-as-web-status", "pdf-as-web-statistic-api", "pdf-as-web", "pdf-as-web-db", "pdf-as-web-client"
\ No newline at end of file diff --git a/signature-standards/sigs-pades/build.gradle b/signature-standards/sigs-pades/build.gradle index 62fb154f..d28d5da5 100644 --- a/signature-standards/sigs-pades/build.gradle +++ b/signature-standards/sigs-pades/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' jar { @@ -21,10 +21,10 @@ releases.dependsOn jar releases.dependsOn sourcesJar dependencies { - compile project (':pdf-as-lib') - compile project (':pdf-as-common') - compile 'org.apache.commons:commons-collections4:4.4' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation project (':pdf-as-common') + implementation 'org.apache.commons:commons-collections4:4.4' + testImplementation group: 'junit', name: 'junit', version: '4.+' } test { diff --git a/signature-standards/sigs-pkcs7detached/build.gradle b/signature-standards/sigs-pkcs7detached/build.gradle index 3da05ccc..6b0e2870 100644 --- a/signature-standards/sigs-pkcs7detached/build.gradle +++ b/signature-standards/sigs-pkcs7detached/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'java' +apply plugin: 'java-library' apply plugin: 'eclipse' jar { @@ -21,10 +21,10 @@ releases.dependsOn jar releases.dependsOn sourcesJar dependencies { - compile project (':pdf-as-lib') - compile project (':pdf-as-common') - compile 'org.apache.commons:commons-collections4:4.4' - testCompile group: 'junit', name: 'junit', version: '4.+' + implementation project (':pdf-as-lib') + implementation project (':pdf-as-common') + implementation 'org.apache.commons:commons-collections4:4.4' + testImplementation group: 'junit', name: 'junit', version: '4.+' } test { |