Maven and JAXB

Add this dependency to your pom.xml:

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.2.5-b10</version>
</dependency>

If you have your jaxb.index file in your src/main/java source tree (probably should be in src/main/resources instead, unless you’d rather see it alongside your source), then you’ll also need a file pattern include in your build section:

<resources>
<!-- include jaxb index files -->
    <resource>
        <directory>src/main/java</directory>
        <includes>
            <include>**/*.index</include>
        </includes>
    </resource>
</resources>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.