aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib')
-rw-r--r--pdf-as-lib/build.gradle46
1 files changed, 42 insertions, 4 deletions
diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle
index 114faebc..b98bf0c9 100644
--- a/pdf-as-lib/build.gradle
+++ b/pdf-as-lib/build.gradle
@@ -16,12 +16,29 @@ buildscript {
dependencies { classpath("commons-io:commons-io:2.4") }
}
+sourceSets {
+ main {
+ java {
+ srcDirs = [ 'src/main/java', 'src/generated/java' ]
+ }
+ }
+}
+
configurations {
- generateJavaFromWsdlDeps
+ ws
pdfDoclet { extendsFrom compile }
}
+project.ext {
+ wsdlDir = file("src/main/resources/wsdl")
+ generatedWsdlDir = file("src/generated/java")
+ wsdlsToGenerate = [
+ ['-xjc',
+ "$wsdlDir/MOA-SPSS-2.0.0.wsdl"],
+ ]
+}
+
task createConf(type: Zip, dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME) {
from 'src/configuration'
archiveName 'config.zip'
@@ -44,9 +61,6 @@ dependencies {
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.3.2'
compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile 'org.apache.commons:commons-collections4:4.0'
- compile group: 'org.apache.axis2', name: 'axis2', version: '1.6.2'
- compile group: 'org.apache.axis2', name: 'axis2-jaxws', version: '1.6.2'
- compile group: 'org.apache.axis2', name: 'axis2-transport-local', version: '1.6.2'
compile group: 'ognl', name: 'ognl', version: '3.0.8'
compile files('libs/iaik_eccelerate_cms.jar')
compile files('libs/iaik_eccelerate.jar')
@@ -58,6 +72,30 @@ dependencies {
compile group: 'com.google.zxing', name: 'core', version: '3.1.0'
compile group: 'com.google.zxing', name: 'javase', version: '3.1.0'
testCompile 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
+}
+
+task wsdl2Java() {
+ if (!wsdlDir.listFiles()) {
+ // do nothing
+ } else {
+ inputs.files wsdlDir.listFiles()
+ outputs.files generatedWsdlDir
+ doLast {
+ wsdlsToGenerate.each { argsin ->
+ argsin.add(argsin.size - 1, '-d')
+ argsin.add(argsin.size - 1, generatedWsdlDir)
+ javaexec {
+ classpath configurations.ws
+ main = 'org.apache.cxf.tools.wsdlto.WSDLToJava'
+ args = argsin
+ systemProperties = ['exitOnFinish':'TRUE']
+ }
+ }
+ }
+ }
}
task releaseConfig(type: Copy) {