0
Maven home: C:\apache-maven-3.5.3\bin\..
Java version: 10.0.1, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-10.0.1

I created a new project with Intelli J Idea with using maven. As we know /main/java folder is marked by default as default source root by maven. But I cannot see the option to crate module-info. Only if I mark src folder as Sources root then it gives me the module-info option to create it. Once I reimport all maven projects the maven over rides intelli j settings and remove source root mark from src folder. I wonder what should I do? Is it gonna cause any problem in the future. If I mark src folder as source root?

Matahari
  • 109
  • 1
  • 3
  • 12
  • do confirm that your module, as well as project SDK, are configured to JDK9. Your IntelliJ version and maven configuration also do matter. – Naman Jul 14 '18 at 17:36

1 Answers1

0

Make sure you have set language level to 9+ in Maven pom.xml:

<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.7.0</version>
    <configuration>
      <source>10</source>
      <target>10</target>
    </configuration>
  </plugin>
</plugins>
Andrey
  • 15,144
  • 25
  • 91
  • 187
  • [Does that even work with Java 10+](https://stackoverflow.com/questions/49398894/unable-to-compile-simple-java-10-project-with-maven)? – Naman Jul 15 '18 at 09:18