maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] (MCHANGES-278) Improved logging and exception messages to aid troubleshooting
Date Thu, 03 Jan 2013 16:14:13 GMT

     [ https://jira.codehaus.org/browse/MCHANGES-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dennis Lundberg closed MCHANGES-278.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9
         Assignee: Dennis Lundberg

Patch applied with modifications in [r1428434|http://svn.apache.org/viewvc?view=revision&revision=1428434].
Thank you!

I added expanded exception messages for issues as well.
                
> Improved logging and exception messages to aid troubleshooting
> --------------------------------------------------------------
>
>                 Key: MCHANGES-278
>                 URL: https://jira.codehaus.org/browse/MCHANGES-278
>             Project: Maven 2.x Changes Plugin
>          Issue Type: Improvement
>          Components: announcement
>    Affects Versions: 2.6
>         Environment: mvn --version :
> Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
> Maven home: /opt/local/apache-maven-3.0.4
> Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
> Java home: /usr/lib/jvm/java-6-openjdk/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "2.6.32-40-generic", arch: "i386", family: "unix"
>            Reporter: Markus Spann
>            Assignee: Dennis Lundberg
>            Priority: Minor
>             Fix For: 2.9
>
>
> Aid the user in troubleshooting configuration issues by improving logging and exception
messages such as the "Couldn't find the release 'XYZ' among the supplied releases." MojoExecutionException.
> # Add String representation of found releases to Exception in method {{org.apache.maven.plugin.changes.ReleaseUtils.getLatestRelease(List<Release>,
String)}}
> {code:java}
>     throw new MojoExecutionException( "Could not find release [" + pomVersion
>           + "] among the supplied releases: " + toString(releases) );
>     // ... snip ...
>     public String toString(List<Release> _releases) {
>         List<String> releaseStrs = new ArrayList<String>(_releases.size());
>         for (Release release : _releases) {
>             releaseStrs.add(toString(release));
>         }
>         return releaseStrs.toString();
>     }
>     public String toString(Release _release) {
>         return _release.getClass().getSimpleName()
>                 + "[version='" + _release.getVersion() + "'"
>                 + ", date='" + StringUtils.defaultString(_release.getDateRelease()) +
"'"
>                 + ", description='" + StringUtils.defaultString(_release.getDescription())
+ "'"
>                 + ", totalActions=" + _release.getActions().size()
>                 + "]";
>     }
> {code}
> # Add debug log to announcement generation:
> {code:java}
>     public void doGenerate( List<Release> releases ) throws MojoExecutionException
>     {
>         String version = ( versionPrefix == null ? "" : versionPrefix ) + getVersion();
>         getLog().debug( "Generating accouncement for version [" + version + "], found
releases: " + releaseUtils.toString(releases) );
>         doGenerate( releases, releaseUtils.getLatestRelease( releases, version ) );
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message