maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1151605 - /maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/AbstractDeployMojo.java
Date Wed, 27 Jul 2011 19:49:29 GMT
Author: hboutemy
Date: Wed Jul 27 19:49:28 2011
New Revision: 1151605

URL: http://svn.apache.org/viewvc?rev=1151605&view=rev
Log:
improved error message to be sufficient for fix: the link is only here as complementary info

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=1151605&r1=1151604&r2=1151605&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:49:28 2011
@@ -355,13 +355,20 @@ public abstract class AbstractDeployMojo
         }
         catch ( UnsupportedProtocolException e )
         {
-            log.error( "Unsupported protocol for site deployment: '" + repository.getProtocol()
+ "'." );
-            log.error( "Supported protocols at this moment: " + getSupportedProtocols() +
"." );
-            log.error( "For adding new protocols to the site plugin, see "
-                + "http://maven.apache.org/plugins/maven-site-plugin/examples/adding-deploy-protocol.html"
);
+            String shortMessage =
+                "Unsupported protocol: '" + repository.getProtocol() + "' for site deployment
to "
+                    + "distributionManagement.site.url=" + repository.getUrl() + ".";
+            String longMessage =
+                "Supported protocols at this moment: " + getSupportedProtocols() + ".\n"
+                    + "    You can add protocols through wagon providers either as maven-site-plugin
dependency or "
+                    + "extension.\n"
+                    + "    For more information, see "
+                    + "http://maven.apache.org/plugins/maven-site-plugin/examples/adding-deploy-protocol.html";
 
-            throw new MojoExecutionException( "Unsupported protocol for site deployment:
'" + repository.getProtocol()
-                + "'.", e );
+            log.error( shortMessage );
+            log.error( longMessage );
+
+            throw new MojoExecutionException( null, shortMessage, "\n" + shortMessage + "\n"
+ longMessage );
         }
         catch ( TransferFailedException e )
         {



Mime
View raw message