aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/build.gradle')
-rw-r--r--pdf-as-lib/build.gradle44
1 files changed, 44 insertions, 0 deletions
diff --git a/pdf-as-lib/build.gradle b/pdf-as-lib/build.gradle
index fd7c00fc..a6693841 100644
--- a/pdf-as-lib/build.gradle
+++ b/pdf-as-lib/build.gradle
@@ -7,6 +7,41 @@ jar {
}
}
+buildscript {
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ }
+ dependencies {
+ classpath("commons-io:commons-io:2.4")
+ }
+}
+
+configurations {
+ generateJavaFromWsdlDeps
+}
+
+task generateJavaFromWsdl(type: JavaExec) {
+ classpath configurations.generateJavaFromWsdlDeps
+ //main "org.apache.cxf.tools.wsdlto.WSDLToJava"
+ main "org.apache.axis.wsdl.WSDL2Java"
+ args "-o " + projectDir + "/src/main/java", "-v", "" + projectDir + "/src/main/resources/wsdl/MOA-SPSS-1.3.wsdl"
+
+ compileJava.dependsOn += name
+
+ def branch = new org.apache.commons.io.output.ByteArrayOutputStream()
+ errorOutput = new org.apache.commons.io.output.TeeOutputStream(System.err, branch)
+ doLast {
+ def str = branch.toString()
+ if (str.contains('Usage : wsdl2java') || str.contains('WSDLToJava Error')) {
+ throw new TaskExecutionException(
+ tasks[name],
+ new IOException("WSDLToJava has failed, please see output")
+ )
+ }
+ }
+}
+
repositories {
mavenLocal()
mavenCentral()
@@ -26,6 +61,15 @@ dependencies {
compile group: 'eu.europa.ec.joinup.egovlabs.pdf-as.iaik', name: 'iaik_jce_eval_signed', version: '4.0'
compile group: 'eu.europa.ec.joinup.egovlabs.pdf-as.iaik', name: 'iaik_ecc_eval_signed', version: '2.19'
testCompile group: 'junit', name: 'junit', version: '4.+'
+ generateJavaFromWsdlDeps('org.apache.axis:axis:1.4')
+ generateJavaFromWsdlDeps('org.apache.axis:axis-jaxrpc:1.4')
+ generateJavaFromWsdlDeps('axis:axis-wsdl4j:1.5.1')
+ generateJavaFromWsdlDeps('commons-codec:commons-codec:1.3')
+ generateJavaFromWsdlDeps('commons-logging:commons-logging:1.1.1')
+ generateJavaFromWsdlDeps('commons-discovery:commons-discovery:0.2')
+ /*generateJavaFromWsdlDeps('org.apache.cxf:cxf-tools-wsdlto-core:2.7.0')
+ generateJavaFromWsdlDeps('org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:2.7.0')
+ generateJavaFromWsdlDeps('org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:2.7.0')*/
}
test {