I am looking for a way to not have a plugin execute on install. More specifically, my scenario is as follows:
Any and all help would be greatly appreciated!
I only want generation of source code to happen when I explicitly request it.
The best option would be to add the plugin declaration in a profile and to explicitly activate this profile:
<project>
...
<profiles>
<profile>
<id>codegen</id>
...
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/wsdl/myService.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
And run the following when you want the code generation to happen:
mvn clean install -Pcodegen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With