I have a trivial Maven project:
src
└── main
└── java
└── module-info.java
pom.xml
pom.xml:
org.
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