Replacements for deprecated JPMS modules with Java EE APIs

后端 未结 8 1495
滥情空心
滥情空心 2020-11-22 05:23

Java 9 deprecated six modules that contain Java EE APIs and they are going to be removed soon:

  • java.activation with javax.activation pack
8条回答
  •  爱一瞬间的悲伤
    2020-11-22 06:07

    I found the easiest path to get around the JAXB parts of these issues was to use dependency management in my root pom or in my bom:

        
          
            
              
              
              
              com.sun.xml.bind
              jaxb-ri
              2.4.0-b180830.0438
              import
              pom
            
            
          
        
        
    

    And in the modules that fail compilation on jdk11:

        
        
          
          
             javax.xml.bind
             jaxb-api
          
          
             com.sun.xml.bind
             jaxb-impl
             runtime
          
          
             org.glassfish.jaxb
             jaxb-runtime
             runtime
          
          
          
        
    

    Also, updating the version of org.jvnet.jaxb2.maven2:maven-jaxb2-plugin to 0.14.0 solved all the jaxb generation issues for me.

提交回复
热议问题