Repository: maven Updated Branches: refs/heads/master 7c7bf4dfe -> c28348024
improved javadoc Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c2834802 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c2834802 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c2834802 Branch: refs/heads/master Commit: c28348024afbe8800ba162a62523f8e6c035bde8 Parents: 7c7bf4d Author: Hervé Boutemy <hbout...@apache.org> Authored: Sun Feb 15 20:56:54 2015 +0100 Committer: Hervé Boutemy <hbout...@apache.org> Committed: Sun Feb 15 20:56:54 2015 +0100 ---------------------------------------------------------------------- .../org/apache/maven/toolchain/ToolchainManager.java | 13 ++++++++++--- .../maven/toolchain/ToolchainManagerPrivate.java | 11 ++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/c2834802/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java ---------------------------------------------------------------------- diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java index fc035f4..9966af2 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManager.java @@ -40,14 +40,21 @@ public interface ToolchainManager String ROLE = ToolchainManager.class.getName(); /** - * to be used from plugins capable of working with toolchains. + * Retrieve toolchain of specified type from build context. It is expected that + * <code>maven-toolchains-plugin</code> contains the configuration to select the appropriate + * toolchain and is executed at the beginning of the build. + * + * @param session the Maven session, must not be {@code null} + * @param type the type, must not be {@code null} + * @return the toolchain selected by <code>maven-toolchains-plugin</code> */ Toolchain getToolchainFromBuildContext( String type, MavenSession context ); /** - * Select all toolchains matching the type and requirements + * Select all toolchains available in user settings matching the type and requirements, + * independently from <code>maven-toolchains-plugin</code>. * - * @param session the maven session, must not be {@code null} + * @param session the Maven session, must not be {@code null} * @param type the type, must not be {@code null} * @param requirements the requirements, may be {@code null} * @return the matching toolchains, never {@code null} http://git-wip-us.apache.org/repos/asf/maven/blob/c2834802/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManagerPrivate.java ---------------------------------------------------------------------- diff --git a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManagerPrivate.java b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManagerPrivate.java index 407c8be..6836bf1 100644 --- a/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManagerPrivate.java +++ b/maven-core/src/main/java/org/apache/maven/toolchain/ToolchainManagerPrivate.java @@ -21,18 +21,22 @@ package org.apache.maven.toolchain; import org.apache.maven.execution.MavenSession; - /** * Component for use by the <code>maven-toolchains-plugin</code> only. + * It provides API: <ol> + * <li>to retrieve every toolchains available in user settings,</li> + * <li>to store chosen toolchain into build context for later use by toolchain-aware plugins.</li> + * </ol> * * @author mkleint * @since 2.0.9 + * @see ToolchainManager#getToolchainFromBuildContext(String, MavenSession) */ public interface ToolchainManagerPrivate { /** - * Retrieves the toolchains of given type from the user settings. + * Retrieves every toolchains of given type available in user settings. * * @param type the type, must not be {@code null} * @param context the Maven session, must not be {@code null} @@ -42,11 +46,12 @@ public interface ToolchainManagerPrivate throws MisconfiguredToolchainException; /** - * Stores the toolchain into build context. + * Stores the toolchain into build context for later use by toolchain-aware plugins. * * @param toolchain the toolchain to store, must not be {@code null} * @param context the Maven session, must not be {@code null} * @since 2.0.9 + * @see ToolchainManager#getToolchainFromBuildContext(String, MavenSession) */ void storeToolchainToBuildContext( ToolchainPrivate toolchain, MavenSession context );