Le mercredi 27 juillet 2011, Lukas Theussl a écrit :
> I won't fight about it 
sure, we won't fight :)

> 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.
ok, I understand: I have idea on how to improve the log to have sufficient info 
at first, and the link will only be useful for people needing more verbose 
explanations

> A stack trace is not pretty but google
> doesn't mind that. At least log the stack trace at debug level if you
> prefer.
I don't like the original stacktrace where it is: I'll add stacktrace when 
listing available providers, it should be equivalent with what you're looking 
for in case of the protocol is here but could not be fully loaded, but more 
user friendly in expected case where the protocol is not here

please have a look at my next commits and see if it is ok

Regards,

Hervé

> 
> -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/plu
> >> gi ns/site/AbstractDeployMojo.java
> >> 
> >> Modified:
> >> maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plu
> >> gi ns/site/AbstractDeployMojo.java URL:
> >> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/m
> >> ai
> >> n/java/org/apache/maven/plugins/site/AbstractDeployMojo.java?rev=115099
> >> 4&r1 =1150993&r2=1150994&view=diff
> >> ========================================================================
> >> == ==== ---
> >> maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plu
> >> gi ns/site/AbstractDeployMojo.java (original) +++
> >> maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plu
> >> gi 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-deplo
> >> y- 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-deplo
> >> y- 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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to