Replacements for deprecated JPMS modules with Java EE APIs

后端 未结 8 1363
滥情空心
滥情空心 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:20

    Just a minor variation (improvement) on the above answers --- exemplified here for JAXB only. One can add the dependencies with the runtime scope and only if this is effectively needed (i.e. when building for running in a JRE with version >= 9 --- here v11 is exemplified):

    
            when-on-jdk-11
            
                11
            
    
            
                
                2.3.1
                2.3.2 
            
    
            
                
                
                    javax.xml.bind
                    jaxb-api
                    ${jaxb-api.version}
                    runtime
                
                
                    org.glassfish.jaxb
                    jaxb-runtime
                    ${jaxb-impl.version}
                    runtime
                
            
        
    

提交回复
热议问题