I won't fight about it but I dislike the idea of providing web links in
error messages. In a few years from now they might not exist any more or
provide irrelevant information. A stack trace is not pretty but google
doesn't mind that. At least log the stack trace at debug level if you
prefer.
-Lukas
On 07/27/2011 12:15 AM, Hervé BOUTEMY wrote:
did you try what an end-user can see when he tries to use an unavailable
protocol?
I'm ok with more detailed error message.
But the stacktrace, which is the only message which is displayed at the end of
Maven reactor run, stating that protocol could not be found, is not helpful:
the detailed error message is more expressive IMHO, telling the user where to
find information on how to fix.
Regards,
Hervé
Le mardi 26 juillet 2011, ltheu...@apache.org a écrit :
Author: ltheussl
Date: Tue Jul 26 06:42:00 2011
New Revision: 1150994
URL: http://svn.apache.org/viewvc?rev=1150994&view=rev
Log:
move detailed error message to logger and preserve stacktrace
Modified:
maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugi
ns/site/AbstractDeployMojo.java
Modified:
maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugi
ns/site/AbstractDeployMojo.java URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/mai
n/java/org/apache/maven/plugins/site/AbstractDeployMojo.java?rev=1150994&r1
=1150993&r2=1150994&view=diff
==========================================================================
==== ---
maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugi
ns/site/AbstractDeployMojo.java (original) +++
maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugi
ns/site/AbstractDeployMojo.java Tue Jul 26 06:42:00 2011 @@ -343,7 +343,7
@@ public abstract class AbstractDeployMojo
return buildDirectory;
}
- private Wagon getWagon( final Repository repository, final
WagonManager manager, final Log log ) + private static Wagon getWagon(
final Repository repository, final WagonManager manager, final Log log )
throws MojoExecutionException
{
final Wagon wagon;
@@ -354,13 +354,12 @@ public abstract class AbstractDeployMojo
}
catch ( UnsupportedProtocolException e )
{
- log.error( "Unavailable protocol for site deployment: '" +
repository.getProtocol() + "'" ); + log.error( "Unsupported
protocol for site deployment: '" + repository.getProtocol() +
+ "'. For adding new protocols to the site plugin, see " +
+
"http://maven.apache.org/plugins/maven-site-plugin/examples/adding-deploy-
protocol.html" );
- throw new MojoExecutionException(
- this,
- "Unavailable protocol for
site deployment: '" + repository.getProtocol() + "'", -
"To add a new protocol to site plugin, 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 );
}
catch ( TransferFailedException e )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org