Include JAXB using Maven

可紊 提交于 2019-12-03 02:23:14

I just ran into this issue with jaxb also; goodness do I love Maven (not). Here's how I resolved the problem.

Add the central repo

<repository>
    <id>central</id>
    <url>http://repo.maven.apache.org/maven2/</url>
</repository>

Modify the version of the api and impl

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

Add

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.2.12</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.2.11</version>
</dependency>

and

<repositories>
    <repository>
        <id>central</id>
        <url>http://repo.maven.apache.org/maven2/</url>
    </repository>
</repositories>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!