i have written a custom maven plugin which extends the axis2 wsdl2java plugin with the concept of creating custom lifecycle where the wsdl2java plugin is executed before goal of my custom plugin is executed.
The code for invoking the custom lifecycle is as follows.
lifecycle.xml
<lifecycles>
<lifecycle>
<id>custom-lifecycle</id>
<phases>
<phase>
<id>invoke</id>
<executions>
<execution>
<goals>
<goal>
org.apache.axis2:axis2-wsdl2code-maven-plugin:wsdl2code
</goal>
</goals>
<configuration>
<packageName>com.foo.myservice</packageName>
<wsdlFile>src/main/wsdl/myservice.wsdl</wsdlFile>
</configuration>
</execution>
</executions>
</phase>
</phases>
</lifecycle>
</lifecycles>
My Mojo is
/**
*
* @goal process
* @execute lifecycle="custom-lifecycle" phase="invoke"
*/
public class SampleMojo extends AbstractMojo
{
public void execute()
throws MojoExecutionException
{
//Code
}
}
Problem:I want to pass the parameters of wsdl2java plugin (i.e,packagename,wsdlFile) from my custom plugin.
Is it possible to send the parameters from my Mojo to custom lifecycle? If so how to do it?
Thanks in Advance
Aadhya