Reputation: 5
I tried below build in pom.xml file.
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.1.6</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/resources/wsdl/abc.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
I am using eclipse. Tried right clicking the project->run as->maven generate sources but it is not generating client classes for me. Infact it is not even creating generated/cxf folder.
Upvotes: 0
Views: 2197
Reputation: 8793
You have your plugins in a misplaced section within the pom: If you want them be applied to the containing project, they should be within project > build > plugins.
Upvotes: 1
Reputation: 175
The best practice is to use command line to run maven plug-ins. Run a terminal and just build your project with
mvn clean install
it should generate your clients classes.
Upvotes: 2