Unable to compile simple Java 10 / Java 11 project with Maven

前端 未结 7 943
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 14:31

I have a trivial Maven project:

src
└── main
    └── java
        └── module-info.java
pom.xml

pom.xml:

org.         


        
7条回答
  •  鱼传尺愫
    2020-11-22 14:54

    UPDATE

    The answer is now obsolete. See this answer.


    maven-compiler-plugin depends on the old version of ASM which does not support Java 10 (and Java 11) yet. However, it is possible to explicitly specify the right version of ASM:

    
        org.apache.maven.plugins
        maven-compiler-plugin
        3.7.0
        
            10
        
        
            
                org.ow2.asm
                asm
                6.2 
            
        
    
    

    You can find the latest at https://search.maven.org/search?q=g:org.ow2.asm%20AND%20a:asm&core=gav

提交回复
热议问题