mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
103 stars 76 forks source link

When I use java classes to generate xsd, how do I Customized xsd names in batches? #230

Open SwpuEsine opened 1 year ago

SwpuEsine commented 1 year ago

The current configuration is as follows. The generated XSD file names like schema1.xsd and schema2.xsd etc...

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>xjc</id>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>schemagen</id>
                        <goals>
                            <goal>schemagen</goal>
                        </goals>
                        <phase>generate-resources</phase>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${project.basedir}/src/main/resources/</outputDirectory>
                    <clearOutputDir>true</clearOutputDir>
                    <includes>
                        <include>com/javatechie/spring/soap/api/test/*.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>