Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude a source from those under source root?

In my project's pom.xml I have section responsible for generating sources:

        <plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>2.3.0</version>
            <executions>
                             ...
                <execution>
                    <id>generate-sources-myownp</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${basedir}/target/generated-sources/cxf</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>${basedir}/src/main/wsdl/MyOwnProj.wsdl</wsdl>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
                 ...

It works well, except for one "sourceRoot" which happens to be duplicate as it is included in two difference packages.

Is there a way to specify an explicit "exclude" for that source package in pom.xml?

like image 649
Withheld Avatar asked Dec 06 '25 06:12

Withheld


1 Answers

Based on the documentation usually you don't need to specify the sourceRoot. Excerpt from the docs:

By default, the codegen plugin follows the Maven convention of "target/generated-sources/cxf" for the output folder for the generated classes. You can override this value using as shown below, but note this is usually not necessary

Maybe i misunderstand you problem.

like image 114
khmarbaise Avatar answered Dec 07 '25 20:12

khmarbaise



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!