improved output: differentiate no toolchain found vs no matching toolchain

git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1636122 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/toolchain/ToolchainMojo.java b/src/main/java/org/apache/maven/plugin/toolchain/ToolchainMojo.java
index 11d25fd..a2392b3 100644
--- a/src/main/java/org/apache/maven/plugin/toolchain/ToolchainMojo.java
+++ b/src/main/java/org/apache/maven/plugin/toolchain/ToolchainMojo.java
@@ -140,6 +140,7 @@
         throws MojoExecutionException
     {
         getLog().info( "Required toolchain: " + getToochainRequirementAsString( type, params ) );
+        boolean typeFound = false;
 
         try
         {
@@ -147,8 +148,15 @@
 
             for ( ToolchainPrivate tc : tcs )
             {
-                if ( type.equals( tc.getType() ) // useful because of MNG-5716
-                                && tc.matchesRequirements( params ) )
+                if ( !type.equals( tc.getType() ) )
+                {
+                    // useful because of MNG-5716
+                    continue;
+                }
+
+                typeFound = true;
+
+                if ( tc.matchesRequirements( params ) )
                 {
                     getLog().info( "Found matching toolchain for type " + type + ": " + tc );
 
@@ -164,7 +172,7 @@
             throw new MojoExecutionException( "Misconfigured toolchains.", ex );
         }
 
-        getLog().error( "No toolchain matched for type " + type );
+        getLog().error( "No toolchain " + ( typeFound ? "matched" : "found" ) + " for type " + type );
 
         return false;
     }