www1350 / javaweb

http://www1350.github.io/
31 stars 5 forks source link

一个Maven工程中,不同的模块需要不同的JDK进行编译的解决方案 #94

Open www1350 opened 7 years ago

www1350 commented 7 years ago
<build>
    [...]
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <verbose>true</verbose>
          <fork>true</fork>
          <executable>${JDK1.7JAVAC}</executable>
          <compilerVersion>1.7</compilerVersion>
        </configuration>
      </plugin>
    </plugins>
    [...]
  </build>

mvn clean install -Dmaven.test.skip=true -Dmaven.compiler.execu table=/opt/souche/java/bin/javac -Dmaven.compiler.fork=true