> -----Original Message----- > From: Aaron Titus [mailto:[email protected]] > Sent: Thursday, January 15, 2015 9:16 AM > To: [email protected] > Subject: Re: How to build a CXF JAX-RS app with Gradle? > > Yep, I have this working here. I just made a task that calls xjc or > wsdl2java as needed. Here are some examples: > > > > task linkWsdlToJavaClient(type:JavaExec) { > > main = "org.apache.cxf.tools.wsdlto.WSDLToJava" > classpath = sourceSets.main.runtimeClasspath > > args "-d", "src3/main/java" > args "-p", "com.example" > args "-client", "src/samples/example1.wsdl" > } > > > task jaxbLinkRequest() << { > > ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', > classpath: configurations.jaxb.asPath) > > ant.xjc(destdir: 'src4', > package: 'com.example', > extension: 'true') { > > schema(dir: 'src/samples', > includes: 'example1.xsd,example2.wsdl') > > } > > }
I can see how you would add to the xjc classpath to provide extensions, but how would you specify extension command-line arguments? > On Thu, Jan 15, 2015 at 10:04 AM, KARR, DAVID <[email protected]> wrote: > > > I have a CXF JAX-RS app that is being built with Maven. I'm looking at > > converting the build to Gradle. > > > > I noticed the "gradle-jaxb-plugin" on github, which lets me run "xjc". > > However, I need one jaxb extension, and that doesn't provide access to > > extensions yet. > > > > My Maven build currently uses "cxf-xjc-plugin" to run xjc. What does > this > > do that is specific to CXF that "vanilla" xjc wouldn't do? > > > > Overall, I guess examples like this come close to "manually" calling xjc > > in Gradle: > > http://stackoverflow.com/questions/8158453/howto-generate-classes-from- > wsdl-and-xsd-with-gradle-equivalent-to-maven-jaxb2 > > . It doesn't cover adding extensions, which I guess is just adding to > the > > classpath and command-line arguments. > > > > Has anyone gone down this path who can provide examples? > >
