0

When I import a project I still have to configure a JDK in order to compile but what I would rather do is have this information already present in the imported project itself -- is this possible? Perhaps via Maven?

Jeff
  • 1,513
  • 4
  • 18
  • 34

1 Answers1

1

Yes you would configure the maven-compiler-plugin for this. See https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html:

<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.5</version>
    <configuration>
      <verbose>true</verbose>
      <fork>true</fork>
      <executable><!-- path-to-javac --></executable>
      <compilerVersion>1.6</compilerVersion>
    </configuration>
  </plugin>
</plugins>
M A
  • 71,713
  • 13
  • 134
  • 174