You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by bu...@apache.org on 2014/10/30 09:45:31 UTC

svn commit: r927380 - in /websites/staging/maven/trunk/content: ./ guides/mini/guide-using-toolchains.html maven-site-1.0-site.jar

Author: buildbot
Date: Thu Oct 30 08:45:31 2014
New Revision: 927380

Log:
Staging update by buildbot for maven

Modified:
    websites/staging/maven/trunk/content/   (props changed)
    websites/staging/maven/trunk/content/guides/mini/guide-using-toolchains.html
    websites/staging/maven/trunk/content/maven-site-1.0-site.jar

Propchange: websites/staging/maven/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Oct 30 08:45:31 2014
@@ -1 +1 @@
-1635385
+1635432

Modified: websites/staging/maven/trunk/content/guides/mini/guide-using-toolchains.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-using-toolchains.html (original)
+++ websites/staging/maven/trunk/content/guides/mini/guide-using-toolchains.html Thu Oct 30 08:45:31 2014
@@ -255,9 +255,13 @@
 <li><tt>exec-maven-plugin</tt> (Codehaus MOJO), starting with 1.1.1.</li></ol></div>
 <div class="section">
 <h3><a name="Using_Toolchains_in_Your_Project"></a>Using Toolchains in Your Project</h3>
-<p>There are two essential components that you need to configure in order to use toolchains. These are the <tt><a class="externalLink" href="http://maven.apache.org/plugins/maven-toolchains-plugin/">maven-toolchains-plugin</a></tt> and the <tt>toolchains.xml</tt> file.</p>
-<p>The <tt>maven-toolchains-plugin</tt> is the one that sets the toolchain to be used by the toolchain-aware plugins in your project. For example, you want to use a different JDK version to build your project. You can configure the version you want to use via this plugin as shown in the <tt>pom.xml</tt> below.</p>
-<div>
+<p>There are two essential components that you need to configure in order to use toolchains:</p>
+<ol style="list-style-type: decimal">
+<li>the <tt><a href="/plugins/maven-toolchains-plugin/">maven-toolchains-plugin</a></tt>,</li>
+<li>the <tt><a href="/ref/current/maven-core/toolchains.html">toolchains.xml</a></tt> file.</li></ol>
+<p>The <tt>maven-toolchains-plugin</tt> is the one that sets the toolchain to be used by the toolchain-aware plugins in your project.</p>
+<p>For example, you want to use a different JDK version to build your project than the version used to run Maven, you can configure the version you want to use via this plugin as shown in the <tt>pom.xml</tt> below:</p>
+<div class="source">
 <pre>&lt;plugins&gt;
  ...
   &lt;plugin&gt;
@@ -289,40 +293,40 @@
   ...
 &lt;/plugins&gt;</pre></div>
 <p>As you can see in the example above, a JDK toolchain with <tt>&lt;version&gt;</tt> &quot;1.5&quot; and <tt>&lt;vendor&gt;</tt> &quot;sun&quot; is to be used. Now how does the plugin know where this JDK is installed? This is where the <tt>toolchains.xml</tt> file comes in.</p>
-<p>The <tt>toolchains.xml</tt> file (see below) is the configuration file where you set the installation paths of your toolchains. This file should be put in your <tt>$<a name="user.home">user.home</a>/.m2</tt> directory. When the <tt>maven-toolchains-plugin</tt> executes, the <tt>maven-toolchain</tt> component used by the plugin would look for the <tt>toolchains.xml</tt> file, read it and look for the matching toolchain configured in the plugin. In our example, that would be a JDK toolchain with <tt>&lt;version&gt;</tt> &quot;1.5&quot; and <tt>&lt;vendor&gt;</tt> &quot;sun&quot;. Once a match is found, the plugin then sets the toolchain to be used in the MavenSession. As you can see in our <tt>toolchains.xml</tt> below, there is indeed a JDK toolchain with <tt>&lt;version&gt;</tt> &quot;1.5&quot; and <tt>&lt;vendor&gt;</tt> &quot;sun&quot; configured. So when the <tt>maven-compiler-plugin</tt> we've configured in our <tt>pom.xml</tt> above executes, it would see that a JDK toolchai
 n is set in the MavenSession and would thereby use that toolchain (that would be the JDK installed at <tt>/path/to/jdk/1.5</tt> for our example) to compile the sources.</p>
-<div>
+<p>The <tt>toolchains.xml</tt> file (see below) is the configuration file where you set the installation paths of your toolchains. This file should be put in your <tt>$<a name="user.home">user.home</a>/.m2</tt> directory. When the <tt>maven-toolchains-plugin</tt> executes, the <tt>maven-toolchain</tt> component used by the plugin would look for the <tt>toolchains.xml</tt> file, reads it and looks for the matching toolchain configured in the plugin. In our example, that would be a JDK toolchain with <tt>&lt;version&gt;</tt> &quot;1.5&quot; and <tt>&lt;vendor&gt;</tt> &quot;sun&quot;. Once a match is found, the plugin then sets the toolchain to be used in the MavenSession. As you can see in our <tt>toolchains.xml</tt> below, there is indeed a JDK toolchain with <tt>&lt;version&gt;</tt> &quot;1.5&quot; and <tt>&lt;vendor&gt;</tt> &quot;sun&quot; configured. So when the <tt>maven-compiler-plugin</tt> we've configured in our <tt>pom.xml</tt> above executes, it would see that a JDK toolch
 ain is set in the MavenSession and would thereby use that toolchain (that would be the JDK installed at <tt>/path/to/jdk/1.5</tt> for our example) to compile the sources.</p>
+<div class="source">
 <pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF8&quot;?&gt;
 &lt;toolchains&gt;
   &lt;toolchain&gt;
-     &lt;type&gt;jdk&lt;/type&gt;
-     &lt;provides&gt;
-         &lt;version&gt;1.5&lt;/version&gt;
-         &lt;vendor&gt;sun&lt;/vendor&gt;
-         &lt;id&gt;default&lt;/id&gt;
-     &lt;/provides&gt;
-     &lt;configuration&gt;
-        &lt;jdkHome&gt;/path/to/jdk/1.5&lt;/jdkHome&gt;
-     &lt;/configuration&gt;
+    &lt;type&gt;jdk&lt;/type&gt;
+    &lt;provides&gt;
+      &lt;version&gt;1.5&lt;/version&gt;
+      &lt;vendor&gt;sun&lt;/vendor&gt;
+      &lt;id&gt;default&lt;/id&gt;
+    &lt;/provides&gt;
+    &lt;configuration&gt;
+      &lt;jdkHome&gt;/path/to/jdk/1.5&lt;/jdkHome&gt;
+    &lt;/configuration&gt;
   &lt;/toolchain&gt;
   &lt;toolchain&gt;
-     &lt;type&gt;jdk&lt;/type&gt;
-     &lt;provides&gt;
-         &lt;version&gt;1.6&lt;/version&gt;
-         &lt;vendor&gt;sun&lt;/vendor&gt;
-         &lt;id&gt;ide&lt;/id&gt;
-     &lt;/provides&gt;
-     &lt;configuration&gt;
-        &lt;jdkHome&gt;/path/to/jdk/1.6&lt;/jdkHome&gt;
-     &lt;/configuration&gt;
+    &lt;type&gt;jdk&lt;/type&gt;
+    &lt;provides&gt;
+      &lt;version&gt;1.6&lt;/version&gt;
+      &lt;vendor&gt;sun&lt;/vendor&gt;
+      &lt;id&gt;ide&lt;/id&gt;
+    &lt;/provides&gt;
+    &lt;configuration&gt;
+      &lt;jdkHome&gt;/path/to/jdk/1.6&lt;/jdkHome&gt;
+    &lt;/configuration&gt;
   &lt;/toolchain&gt;
   &lt;toolchain&gt;
-     &lt;type&gt;netbeans&lt;/type&gt;
-     &lt;provides&gt;
-         &lt;version&gt;5.5&lt;/version&gt;
-     &lt;/provides&gt;
-     &lt;configuration&gt;
-         &lt;installDir&gt;/path/to/netbeans/5.5&lt;/installDir&gt;
-     &lt;/configuration&gt;
+    &lt;type&gt;netbeans&lt;/type&gt;
+    &lt;provides&gt;
+      &lt;version&gt;5.5&lt;/version&gt;
+    &lt;/provides&gt;
+    &lt;configuration&gt;
+      &lt;installDir&gt;/path/to/netbeans/5.5&lt;/installDir&gt;
+    &lt;/configuration&gt;
   &lt;/toolchain&gt;
 &lt;/toolchains&gt;</pre></div>
 <p>Note that you can configure as many toolchains as you want in your <tt>toolchains.xml</tt> file.</p></div></div>

Modified: websites/staging/maven/trunk/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.