You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2011/07/27 21:52:05 UTC

svn commit: r1151606 - /maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java

Author: hboutemy
Date: Wed Jul 27 19:52:05 2011
New Revision: 1151606

URL: http://svn.apache.org/viewvc?rev=1151606&view=rev
Log:
added a stacktrace when unexpected error happens when getting an existing wagon provider

Modified:
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java?rev=1151606&r1=1151605&r2=1151606&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java (original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java Wed Jul 27 19:52:05 2011
@@ -359,7 +359,7 @@ public abstract class AbstractDeployMojo
                 "Unsupported protocol: '" + repository.getProtocol() + "' for site deployment to "
                     + "distributionManagement.site.url=" + repository.getUrl() + ".";
             String longMessage =
-                "Supported protocols at this moment: " + getSupportedProtocols() + ".\n"
+                "Supported protocols at this moment: " + getSupportedProtocols( log ) + ".\n"
                     + "    You can add protocols through wagon providers either as maven-site-plugin dependency or "
                     + "extension.\n"
                     + "    For more information, see "
@@ -384,7 +384,7 @@ public abstract class AbstractDeployMojo
         return wagon;
     }
 
-    private String getSupportedProtocols()
+    private String getSupportedProtocols( final Log log )
     {
         try
         {
@@ -394,7 +394,8 @@ public abstract class AbstractDeployMojo
         }
         catch ( ComponentLookupException e )
         {
-            // ignore
+            // in the unexpected case there is a problem when instantiating a wagon provider
+            log.error( e );
         }
         return "";
     }