"The wadl2java tool is documented as providing support for -xjc but the cxf-wadl2java-plugin does not actually seem to support this flag: http://cxf.apache.org/docs/jaxrs-services-description.html
When i attempt to execute the plugin with -xjc arguments I receive the following error: Unexpected option: -xjc-Xvisitor <lamberm_> Usage : wadl2java -wadlns <wadl-namespace> -p <package-name> -sp <[schema-namespace =]package-name>* -resource <resource-name> -b <binding-file-name>* -catalog <catalog-file-name> -d <output-directory> -compile -classdir <compile-classes-directory> -interface -impl -generateEnums -noAddressBinding -supportMultipleXmlReps -h|-?|-help -version|-v -verbose|-V -quiet|-q|-Q <wadl> For reference, here is the pom.xml file we are using. Can you please advise? ---- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>store-rs-artifacts</artifactId> <version>0.0.1-SNAPSHOT</version> <parent> <artifactId>api-maven-base</artifactId> <groupId>com.foo</groupId> <version>0.1.4</version> </parent> <dependencies> <dependency> <groupId>com.foo</groupId> <artifactId>schemas</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> <dependency> <groupId>com.massfords</groupId> <artifactId>jaxb-visitor</artifactId> <version>1.13</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-wadl2java-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> <wadlOptions> <wadlOption> <wadl>classpath:/services/store/store-wadl-v1.xml</wadl> <extraargs> <extraarg>-xjc-Xvisitor</extraarg> <!-- <extraarg>-xjc-Xvisitor-package:com.foo.store.service.rs.version1</extraarg> --> <extraarg>-verbose</extraarg> </extraargs> <packagename>com.foo.store.service.rs.version1</packagename> </wadlOption> </wadlOptions> </configuration> <goals> <goal>wadl2java</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId> org.apache.cxf </groupId> <artifactId> cxf-wadl2java-plugin </artifactId> <versionRange> [2.5.2,) </versionRange> <goals> <goal>wadl2java</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> </project>
