Include JAXB using Maven

FYI: Both Paul and Do Nhu Vy's answers are correct, but if you encountered error message like below, please change repository to HTTPS:

[ERROR] Failed to execute goal on project hibernate: Could not resolve dependencies for project edu.baylor.cs.se:hibernate:jar:1.0-SNAPSHOT: Failed to collect dependencies at javax.xml.bind:jaxb-api:jar:2.2.7: Failed to read artifact descriptor for javax
.xml.bind:jaxb-api:jar:2.2.7: Could not transfer artifact javax.xml.bind:jaxb-api:pom:2.2.7 from/to central (http://repo.maven.apache.org/maven2/): Transfer failed for http://repo.maven.apache.org/maven2/javax/xml/bind/jaxb-api/2.2.7/jaxb-api-2.2.7.pom 5
01 HTTPS Required -> [Help 1]

Add those in pom.xml file.

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

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

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>