0

I generate code and implementation from several wsdl-files. Is there a way to add extraargs -impl when using wildcard as below?

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>${cxf.version}</version>
            <executions>
                <execution>
                    <id>cxf-codegen</id>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${basedir}/src/main/generated-sources/</sourceRoot>
                        <wsdlRoot>${basedir}/src/main/resources/wsdl</wsdlRoot>
                        <includes>
                            <include>**/*.wsdl</include>
                        </includes>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

I have gotten it to work like this but I don't want to repeat the wsdlOption-part.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>${cxf.version}</version>
            <executions>
                <execution>
                    <id>cxf-codegen</id>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${basedir}/src/main/generated-sources/</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>${basedir}/src/main/resources/wsdl/first/first.wsdl</wsdl>
                                <extraargs>
                                    <extraarg>-impl</extraarg>
                                </extraargs>
                            </wsdlOption>
                            <wsdlOption>
                                <wsdl>${basedir}/src/main/resources/wsdl/second/second.wsdl</wsdl>
                                <extraargs>
                                    <extraarg>-impl</extraarg>
                                </extraargs>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
user1766169
  • 1,932
  • 3
  • 22
  • 44

0 Answers0