[ http://jira.codehaus.org/browse/MOJO-78?page=comments#action_59432 ] 

Paul Ruest commented on MOJO-78:
--------------------------------

running mvn scm:changelog works

running mvn changelog:changelog fails (range 30 days) with an empty 
changelog.xml file.  The following exceptions are seen for each log item 
returned from CVS.

[WARNING] Exception in the cvs changelog consumer.
java.lang.IllegalArgumentException: Unable to parse date: 2006/02/10 14:31:57
        at org.apache.maven.scm.ChangeSet.setDate(ChangeSet.java:280)
        at org.apache.maven.scm.provider.cvslib.command.changelog.CvsChangeLogCo
nsumer.processGetDate(CvsChangeLogConsumer.java:217)
        at org.apache.maven.scm.provider.cvslib.command.changelog.CvsChangeLogCo
nsumer.consumeLine(CvsChangeLogConsumer.java:129)
        at org.codehaus.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.ja
va:194)
        at org.codehaus.plexus.util.cli.StreamPumper.run(StreamPumper.java:143)

Note that ChangeLogReport:getChangedSets will return the existing 
target/changelog.xml file.  If changelog has failed and produced an empty file, 
delete it to get change log to generate a new one from CVS.

Digging around in the code I noticed two things:

1) the private dataFormat in org.apache.maven.changelog.ChangeLogReport was 
yyyy-MM-dd which is passed into provider.changeLog when the type is range.  
Using the dataFormat of yyyy/MM/dd HH:mm:ss will get changelog working for me 
since it matches the date format in the exception.

2)org.apache.maven.scm.ChangeSet.setDate( String date, String userDatePattern ) 
trys TIMESTAMP_FORMAT_2 if the user pattern fails, and if that fails trys 
TIMESTAMP_FORMAT_2 again.  It is likely that one of these two failures cases 
should use TIMESTAMP_FORMAT_1 which I believe would also fix the changelog 
report problem in my case.

Not sure if these remarks are for the general case or relate only to a fix my 
specific configuration (maven 2.0.2, 
changelog-maven-plugin-2.0-beta-2-SNAPSHOT, cvs client 1.11.19)




> Changelog report produces (wrongly) empty output
> ------------------------------------------------
>
>          Key: MOJO-78
>          URL: http://jira.codehaus.org/browse/MOJO-78
>      Project: Mojo
>         Type: Bug

>   Components: changelog
>     Reporter: Matthew Beermann
>     Priority: Critical

>
>
> I can confirm that the bug reported in MPCHANGELOG-31 and MPCHANGELOG-38 is 
> still alive and well in Maven 2:
> m2 -X changelog:changelog
> <snip>
> [INFO] [changelog:changelog]
> [INFO] Generating changed sets xml to: 
> C:\checkouts\system-core\target\changelog.xml
> [DEBUG] Executing CVS command: log -d "2005-09-11<2005-10-12"
> Server is not supporting gzip-file-contents request
> [INFO] ChangeSet between 2005-09-11 and 2005-10-12: 0 entries
> Note that entering the same cvs log command by hand produces perfectly 
> normal-looking output, but Maven doesn't like it for whatever reason.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to