You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2006/03/27 14:03:47 UTC

svn commit: r389114 - /maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt

Author: carlos
Date: Mon Mar 27 04:03:44 2006
New Revision: 389114

URL: http://svn.apache.org/viewcvs?rev=389114&view=rev
Log:
Added "Compiling in JDKs other than the used to run Maven" section to the docs

Modified:
    maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt

Modified: maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt?rev=389114&r1=389113&r2=389114&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt (original)
+++ maven/plugins/trunk/maven-compiler-plugin/src/site/apt/howto.apt Mon Mar 27 04:03:44 2006
@@ -36,3 +36,34 @@
 </project>
 -------------------
 
+Compiling in JDKs other than the used to run Maven
+
+  You can use any JDK to compile, not only the one used to run Maven.
+
+  Note that this is different than just building with source and target options,
+  this option actaully uses a different JDK, while with sources and target you just
+  set the compatability version of the compiled classes.
+
+-------------------
+<project>
+  ...
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <fork>true</fork>
+          <compilerVersion>1.3</compilerVersion>
+          <executable>C:/Program Files/Java/jdk1.3.1_18/bin/javac</executable>
+          <!--
+          A portable way using environment variables
+          <executable>${JAVA_1_3_HOME}/bin/javac</executable>
+          -->
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  ...
+</project>
+-------------------