Hi,
I have a question about use of external dependencies in my custom plugin. Consider the following task
dependencies {
cxfCodeGenLibs "org.apache.cxf:cxf-tools-wsdlto-core:2.5.+"
}
task("WSDL2JAVA", type: JavaExec) {
main = 'org.apache.cxf.tools.wsdlto.WSDLToJava'
classpath = configurations.cxfCodeGenLibs
//+args and some other stuff
}
I want to write a plugin, that will add such task to my project and will execute code generation inside “@TaskAction” method.
What is the right way of using org.apache.cxf.tools.wsdlto.WSDLToJava in my plugin? For example, i can take cxfCodeGenLibs configuration and load the class by classloader, but it looks very ugly… Another approach is to make libs as compile dependency for my plugin and use simple imports, but how to provide this dependencies at plugin task execution?
Thanks in advance.