Maven can't compile class which depends on rt.jar

前端 未结 2 1850
眼角桃花
眼角桃花 2021-02-19 02:32

CI-server (Hudson), for which I am responsible, builds Maven project. After the last commit, the build failed:

[INFO] -------------------------------------------         


        
2条回答
  •  别跟我提以往
    2021-02-19 02:54

    Need to specify -XDignore.symbol.file and add rt.jar dependency and true as the compiler plugin will otherwise silently drop any -XD flags: e.g.

        ...
        
            groupid
            artifiactId
            1.0
            system
            ${java.home}/lib/rt.jar
        
    
    
    
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.3
                
                    1.7
                    1.7
                    
                        -XDignore.symbol.file
                    
                    true
                
                ...
    

提交回复
热议问题