Maven jaxb generate plugin to read xsd files from multiple directories

Posted by ziggy on Stack Overflow See other posts from Stack Overflow or by ziggy
Published on 2012-08-05T11:39:39Z Indexed on 2012/11/14 11:01 UTC
Read the original article Hit count: 330

Filed under:
|
|
|

If i have xsd file in the following directories

src/main/resources/xsd
src/main/resources/schema/common
src/main/resources/schema/soap

How can i instruct the maven jaxb plugin to generate jaxb classes using all schema files in the above directory? I can get it to generate the class files if i specify one of the folders but i cant get i dont know how to include all three folders.

Here is how i generate the files for one folder:

<plugin>
            <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <schemaDirectory>src/main/resources/xsd</schemaDirectory>
            </configuration>
        </plugin>

I tried adding multiple entries in the element but it just ignores all of them if i do that.

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about maven