Include JAXB using Maven

后端 未结 3 586
醉酒成梦
醉酒成梦 2020-12-30 06:08

Working on my 1.6.0_16 JDK, I generated my stub classes from a WSDL using Apache CXF 2.5.2, which uses the most recent jaxb-api 2.2. I know it\'s possible to have it use jax

3条回答
  •  旧时难觅i
    2020-12-30 06:34

    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.

        
            
                central
                https://repo.maven.apache.org/maven2/
            
        
    
        
            
                javax.xml.bind
                jaxb-api
                2.2.9
            
            
                com.sun.xml.bind
                jaxb-impl
                2.2.5-b10
            
        
    

提交回复
热议问题