aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-web/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-web/build.gradle')
-rw-r--r--pdf-as-web/build.gradle135
1 files changed, 31 insertions, 104 deletions
diff --git a/pdf-as-web/build.gradle b/pdf-as-web/build.gradle
index d97ad500..f6479d55 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()
+ gradlePluginPortal()
// 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,11 +20,10 @@ buildscript {
}
}
-apply plugin: 'org.akhikhl.gretty'
+
configurations { providedCompile
- pdfbox2
- pdfbox1
+ pdfbox2
}
jar {
@@ -41,32 +45,29 @@ 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')
- 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-lib')
+ api project (':pdf-as-moa')
+ api project (':signature-standards:sigs-pkcs7detached')
+ api project (':signature-standards:sigs-pades')
+ 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 {
@@ -123,7 +124,7 @@ task extractTomcat(dependsOn: downloadTomcat, type: Copy) {
into outputDir
}
-def deployVersions=['','-pdfbox1']
+def deployVersions=['']
task copyTomcat(dependsOn: extractTomcat) {
doLast {
@@ -213,32 +214,6 @@ task injectPdfAsWebApp(dependsOn: putWebConfigIntoTomcat, type: Copy) {
}
injectPdfAsWebApp.dependsOn war
-task createPdfbox1War(type:War){
- //destinationDir = file("$buildDir/libs/pdfbox2")
- appendix = "pdfbox1"
- doFirst{
- sourceSets.main.compileClasspath -= configurations.pdfbox2
- sourceSets.test.compileClasspath -= configurations.pdfbox2
- sourceSets.main.compileClasspath += configurations.pdfbox1
- sourceSets.test.compileClasspath += configurations.pdfbox1
- classpath+=sourceSets.main.compileClasspath
- }
-}
-
-
-
-task injectPdfAsWebAppPdfbox1(dependsOn: putWebConfigIntoTomcat, type: Copy) {
- //war.execute();
-
- String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##"+deployVersions[1]+"/apache-tomcat-##VERSION##/webapps/";
- targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
-
- from createPdfbox1War.outputs
- into targetDir
- rename '.*.war', 'pdf-as-web.war'
-}
-injectPdfAsWebAppPdfbox1.dependsOn createPdfbox1War
-
task buildTomcat(dependsOn: injectPdfAsWebApp, type: Zip) {
String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##/apache-tomcat-##VERSION##";
targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
@@ -251,18 +226,6 @@ task buildTomcat(dependsOn: injectPdfAsWebApp, type: Zip) {
archiveName archive
destinationDir project.buildDir
}
-task buildTomcatPdfbox1(dependsOn: injectPdfAsWebAppPdfbox1, type: Zip) {
- String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##"+deployVersions[1]+"/apache-tomcat-##VERSION##";
- targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
-
- String archive = "apache-tomcat-##VERSION##"+deployVersions[1]+"-pdf-as-web-##PVERSION##.zip";
- archive = archive.replaceAll("##VERSION##", project.tomcatVersion);
- archive = archive.replaceAll("##PVERSION##", project.version);
-
- from targetDir
- archiveName archive
- destinationDir project.buildDir
-}
task buildTomcatTar(dependsOn: injectPdfAsWebApp, type: Tar) {
@@ -278,20 +241,6 @@ task buildTomcatTar(dependsOn: injectPdfAsWebApp, type: Tar) {
destinationDir project.buildDir
}
-task buildTomcatTarPdfbox1(dependsOn: injectPdfAsWebAppPdfbox1, type: Tar) {
-
- String targetDir = project.buildDir.toString() + "/tomcat-##VERSION##"+deployVersions[1]+"/apache-tomcat-##VERSION##";
- targetDir = targetDir.replaceAll("##VERSION##", project.tomcatVersion);
-
- String archive = "apache-tomcat-##VERSION##"+deployVersions[1]+"-pdf-as-web-##PVERSION##.tar";
- archive = archive.replaceAll("##VERSION##", project.tomcatVersion);
- archive = archive.replaceAll("##PVERSION##", project.version);
-
- from targetDir
- archiveName archive
- destinationDir project.buildDir
-}
-
task releaseConfig(type: Copy) {
@@ -305,8 +254,6 @@ war{
doFirst{
sourceSets.main.compileClasspath += configurations.pdfbox2
sourceSets.test.compileClasspath += configurations.pdfbox2
- sourceSets.main.compileClasspath -= configurations.pdfbox1
- sourceSets.test.compileClasspath -= configurations.pdfbox1
classpath+=sourceSets.main.compileClasspath
}
}
@@ -330,20 +277,6 @@ task releases(dependsOn: buildTomcat, type: Copy) {
}
-task releaseCopyPdfbox1(type: Copy){
- String archive = project.buildDir.toString() + "/apache-tomcat-##VERSION##"+deployVersions[1]+"-pdf-as-web-##PVERSION##.zip";
- archive = archive.replaceAll("##VERSION##", project.tomcatVersion);
- archive = archive.replaceAll("##PVERSION##", project.version);
-
- String tararchive = project.buildDir.toString() + "/apache-tomcat-##VERSION##"+deployVersions[1]+"-pdf-as-web-##PVERSION##.tar";
- tararchive = tararchive.replaceAll("##VERSION##", project.tomcatVersion);
- tararchive = tararchive.replaceAll("##PVERSION##", project.version);
-
- from archive
- from tararchive
- from createPdfbox1War
- into rootDir.toString() + "/releases/" + version + "/pdfbox1"
-}
releases.dependsOn jar
@@ -351,10 +284,4 @@ releases.dependsOn sourcesJar
releases.dependsOn war
releases.dependsOn releaseConfig
releases.dependsOn buildTomcatTar
-releases.dependsOn createPdfbox1War
-releases.dependsOn releaseCopyPdfbox1
-releases.dependsOn buildTomcatPdfbox1
-releases.dependsOn buildTomcatTarPdfbox1
-
-war.dependsOn createPdfbox1War