Trying to compile a Maven project using JDK 9.0.1 I\'m facing this stacktrace without much of an explanation:
Exception in thread \"main\" java.lang.Assertio
The part of the stack trace
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:821)
relates to the line of code
throw new CompletionFailure(c, diags.fragment("cant.resolve.modules"));
This would possibly happen when you're trying to build a maven module which is not based on Java9 and/or does not have(correct) module declaration module-info.java
with a release version specified as 9 where it won't be able to resolve modules with/without the declaration.