Author: wsmoak
Date: Thu Mar  8 20:18:18 2007
New Revision: 516290

URL: http://svn.apache.org/viewvc?view=rev&rev=516290
Log:
Add an example of using a property to avoid hard-coding a filesystem path.
Link to 'customizing a manifest' in the jar plugin docs.

Modified:
    
maven/plugins/trunk/maven-compiler-plugin/src/site/apt/examples/compile-using-different-jdk.apt

Modified: 
maven/plugins/trunk/maven-compiler-plugin/src/site/apt/examples/compile-using-different-jdk.apt
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/site/apt/examples/compile-using-different-jdk.apt?view=diff&rev=516290&r1=516289&r2=516290
==============================================================================
--- 
maven/plugins/trunk/maven-compiler-plugin/src/site/apt/examples/compile-using-different-jdk.apt
 (original)
+++ 
maven/plugins/trunk/maven-compiler-plugin/src/site/apt/examples/compile-using-different-jdk.apt
 Thu Mar  8 20:18:18 2007
@@ -51,4 +51,38 @@
   </build>
   [...]
 </project>
-+-------
\ No newline at end of file
++-------
+
+  To avoid hard-coding a filesystem path for the executable, you can use a
+  property.  For example:
+
++-------
+          <executable>${jdk14.executable}</executable>
++-------
+
+  Each developer then defines this property in
+  
{{{http://maven.apache.org/ref/current/maven-settings/settings.html}settings.xml}},
+  so that the build remains portable.
+
++-------
+<settings>
+  [...]
+  <profiles>
+    [...]
+    <profile>
+      <id>compiler</id>
+        <properties>
+          <jdk14.executable>C:\Program 
Files\Java\j2sdk1.4.2_09\bin\javac.exe</jdk14.executable>
+        </properties>
+    </profile>
+  </profiles>
+  [...]
+  <activeProfiles>
+    <activeProfile>compiler</activeProfile>
+  </activeProfiles>
+</settings>
++-------
+
+  If you build with a different JDK, you may want to 
+  
{{{http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html}
+  customize}} the jar file manifest.


Reply via email to