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><plugins>
...
<plugin>
@@ -289,40 +293,40 @@
...
</plugins></pre></div>
<p>As you can see in the example above, a JDK toolchain with
<tt><version></tt> "1.5" and <tt><vendor></tt>
"sun" 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><version></tt>
"1.5" and <tt><vendor></tt> "sun". 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><version></tt> "1.5" and
<tt><vendor></tt> "sun" 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><version></tt>
"1.5" and <tt><vendor></tt> "sun". 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><version></tt> "1.5" and
<tt><vendor></tt> "sun" 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><?xml version="1.0" encoding="UTF8"?>
<toolchains>
<toolchain>
- <type>jdk</type>
- <provides>
- <version>1.5</version>
- <vendor>sun</vendor>
- <id>default</id>
- </provides>
- <configuration>
- <jdkHome>/path/to/jdk/1.5</jdkHome>
- </configuration>
+ <type>jdk</type>
+ <provides>
+ <version>1.5</version>
+ <vendor>sun</vendor>
+ <id>default</id>
+ </provides>
+ <configuration>
+ <jdkHome>/path/to/jdk/1.5</jdkHome>
+ </configuration>
</toolchain>
<toolchain>
- <type>jdk</type>
- <provides>
- <version>1.6</version>
- <vendor>sun</vendor>
- <id>ide</id>
- </provides>
- <configuration>
- <jdkHome>/path/to/jdk/1.6</jdkHome>
- </configuration>
+ <type>jdk</type>
+ <provides>
+ <version>1.6</version>
+ <vendor>sun</vendor>
+ <id>ide</id>
+ </provides>
+ <configuration>
+ <jdkHome>/path/to/jdk/1.6</jdkHome>
+ </configuration>
</toolchain>
<toolchain>
- <type>netbeans</type>
- <provides>
- <version>5.5</version>
- </provides>
- <configuration>
- <installDir>/path/to/netbeans/5.5</installDir>
- </configuration>
+ <type>netbeans</type>
+ <provides>
+ <version>5.5</version>
+ </provides>
+ <configuration>
+ <installDir>/path/to/netbeans/5.5</installDir>
+ </configuration>
</toolchain>
</toolchains></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.