Created
November 21, 2012 20:39
-
-
Save stackmagic/4127509 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task generateJavaFromWsdl(type: JavaExec) { | |
| classpath configurations.generateJavaFromWsdlDeps | |
| main "org.apache.cxf.tools.wsdlto.WSDLToJava" | |
| args "your", "args", "here" | |
| 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") | |
| ) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment