You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mikael Lundgren <mi...@leanon.se> on 2003/11/18 19:47:28 UTC

Subversion changelog

Hi,

I'm trying to get Maven to generate changelog reports based on the 
contents of a Subversion repository, however all I get is empty reports.

I have found the following information and applied it:

- I have installed Apache 2.0.48, Subversion 0.33, Java 1.4.2_02, Maven 
1.0rc1
- I have created a build.properties file
- I have set the maven.changelog.range to the empty string
- I have set the maven.changelog.factory= 
org.apache.maven.svnlib.SvnChangeLogFactory
- I can run svn log -h from the command prompt in the directory where I 
run "maven site" and the log file shows up as expected (it is not empty)
- I have set 
<connection>http://127.0.0.1/repos/leanon/leif/trunk</connection> in the 
repository portion of project.xml, I have also tested the url to 
actually point to the right place, not that it seems to matter much...

Here is what I get (I only include what I find to be the relevant output):

site:run-reports:
     [echo] Generating the Change Log...
maven-changelog-plugin:report:
     [echo] Generating the changelog report
SCM Working Directory: C:\ttt\leanon\leif\trunk
SCM Command Line[0]: svn
SCM Command Line[1]: log
SCM Command Line[2]: -v
ChangeLog found: 0 entries

That last line... "0 entries" worries me...

I checked the bug tracking system but all I could find was a mention of 
a problem that seems unrelated - and should be fixed by the range 
property mentioned above.

Anyone with any pointer? Is this even supposed to work at all?

Thanks!!
-- 
Mikael Lundgren, LeanOn AB


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by di...@multitask.com.au.
> Is Subversion fully supported by the scm now?

If you mean the scm plugin, no. If you mean the scm reporting plugins 
(changelog, activity, developer-activity etc), yes.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Heiko Kundlacz <he...@qnamic.com>.
dion@multitask.com.au wrote:

>Heiko Kundlacz <he...@qnamic.com> wrote on 19/11/2003 07:12:28 
>AM:
>
>  
>
>>As I know Subversion isn't support. If you want to use subversion you 
>>should write your own plugin based on:
>>
>><url>http://jsvn.alternatecomputing.com/</url>
>>
>>They provide an ant task you can implement. I tried out the checkout 
>>command and it works.
>>
>>Heiko
>>
>>Mikael Lundgren wrote:
>>
>>    
>>
>FWIW, SubVersion is supported by the scm reporting plugins.
>--
>dIon Gillard, Multitask Consulting
>Blog:      http://blogs.codehaus.org/people/dion/
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>
Is Subversion fully supported by the scm now?

Heiko



-- 
------------------------------------------------------
Heiko Kundlacz   | MailTo:   heiko.kundlacz@qnamic.com
Qnamic AG        | Tel:      +41 62 209 7056
Fabrikstr. 10    | Natel:    +41 78 861 4006
4614 Haegendorf  | Fax:      +41 62 209 7044
Switzerland      | Homepage: http://www.qnamic.com
------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by di...@multitask.com.au.
Heiko Kundlacz <he...@qnamic.com> wrote on 19/11/2003 07:12:28 
AM:

> As I know Subversion isn't support. If you want to use subversion you 
> should write your own plugin based on:
> 
> <url>http://jsvn.alternatecomputing.com/</url>
> 
> They provide an ant task you can implement. I tried out the checkout 
> command and it works.
> 
> Heiko
> 
> Mikael Lundgren wrote:
> 
FWIW, SubVersion is supported by the scm reporting plugins.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Heiko Kundlacz <he...@qnamic.com>.
As I know Subversion isn't support. If you want to use subversion you 
should write your own plugin based on:

<url>http://jsvn.alternatecomputing.com/</url>

They provide an ant task you can implement. I tried out the checkout 
command and it works.

Heiko

Mikael Lundgren wrote:

> Hi,
>
> I'm trying to get Maven to generate changelog reports based on the 
> contents of a Subversion repository, however all I get is empty reports.
>
> I have found the following information and applied it:
>
> - I have installed Apache 2.0.48, Subversion 0.33, Java 1.4.2_02, 
> Maven 1.0rc1
> - I have created a build.properties file
> - I have set the maven.changelog.range to the empty string
> - I have set the maven.changelog.factory= 
> org.apache.maven.svnlib.SvnChangeLogFactory
> - I can run svn log -h from the command prompt in the directory where 
> I run "maven site" and the log file shows up as expected (it is not 
> empty)
> - I have set 
> <connection>http://127.0.0.1/repos/leanon/leif/trunk</connection> in 
> the repository portion of project.xml, I have also tested the url to 
> actually point to the right place, not that it seems to matter much...
>
> Here is what I get (I only include what I find to be the relevant 
> output):
>
> site:run-reports:
>     [echo] Generating the Change Log...
> maven-changelog-plugin:report:
>     [echo] Generating the changelog report
> SCM Working Directory: C:\ttt\leanon\leif\trunk
> SCM Command Line[0]: svn
> SCM Command Line[1]: log
> SCM Command Line[2]: -v
> ChangeLog found: 0 entries
>
> That last line... "0 entries" worries me...
>
> I checked the bug tracking system but all I could find was a mention 
> of a problem that seems unrelated - and should be fixed by the range 
> property mentioned above.
>
> Anyone with any pointer? Is this even supposed to work at all?
>
> Thanks!!



-- 
------------------------------------------------------
Heiko Kundlacz   | MailTo:   heiko.kundlacz@qnamic.com
Qnamic AG        | Tel:      +41 62 209 7056
Fabrikstr. 10    | Natel:    +41 78 861 4006
4614 Haegendorf  | Fax:      +41 62 209 7044
Switzerland      | Homepage: http://www.qnamic.com
------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Mikael Lundgren <mi...@leanon.se>.
I have no idea about how to put the patch into Jira, it seems I would 
need to log in but I have no login....

So... here is a patch... through mail ;-) If anyone wants to put it into 
Jira please do!



*** SvnChangeLogParser.java     Wed Nov 19 19:32:53 2003
--- 
/Projekt/maven/src/plugins-build/changelog/src/main/org/apache/maven/svnlib/
SvnChangeLogParser.java Wed Nov 19 19:25:56 2003
***************
*** 120,126 ****

       /** The pattern used to match svn header lines */
       private static final String pattern =
!         "^rev (\\d+):\\s+" +             // revision number
           "(\\w+)\\s+\\|\\s+" +            // author username
           "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
           "\\d+:\\d+:\\d+) " +             // time 16:01:00
--- 120,126 ----

       /** The pattern used to match svn header lines */
       private static final String pattern =
!         "^r(\\d+) \\|\\s+" +             // revision number
           "(\\w+)\\s+\\|\\s+" +            // author username
           "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
           "\\d+:\\d+:\\d+) " +             // time 16:01:00



Regards /Mikael

Emmanuel Venisse wrote:

> Could put a patch in Jira? We apply it asap.
> 
> Thanks
> 
> Emmanuel



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Emmanuel Venisse <em...@venisse.net>.
Could put a patch in Jira? We apply it asap.

Thanks

Emmanuel

----- Original Message ----- 
From: "Mikael Lundgren" <mi...@leanon.se>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, November 19, 2003 7:39 PM
Subject: Re: Subversion changelog


> Well,
>
> that was it... after some experimenting I now get a working changelog in
> maven! One line of code had to change...
>
> Here is the original code in
> org/apache/maven/svnlib/Attic/SvnChangeLogParser.java:
>
>      /** The pattern used to match svn header lines */
>      private static final String pattern =
>          "^rev (\\d+):\\s+" +             // revision number
>          "(\\w+)\\s+\\|\\s+" +            // author username
>          "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
>          "\\d+:\\d+:\\d+) " +             // time 16:01:00
>          "([\\-+])(\\d\\d)(\\d\\d)";      // gmt offset -0400
>
> and here is the code I put in:
>
>      /** The pattern used to match svn header lines */
>      private static final String pattern =
>          "^r(\\d+) \\|\\s+" +             // revision number
>          "(\\w+)\\s+\\|\\s+" +            // author username
>          "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
>          "\\d+:\\d+:\\d+) " +             // time 16:01:00
>          "([\\-+])(\\d\\d)(\\d\\d)";      // gmt offset -0400
>
> Note the line with the comment "revision number" which is the only
> change to the plugin code.
>
> Now I made a "dirty" plugin... I checked out a changelog-plugin from
> cvs, made my changes, ran the tests (btw i changed the test file as well
> to look like a current SubVersion log file), created a jar, fooled maven
> to take my version of the plugin and now it works.
>
> Regards
> /Mikael Lundgren
>
> Mikael Lundgren wrote:
>
> > Hmmm,
> >
> > it seems that subversion 0.33.0 changed the format of the data created
> > by running svn log... from http://svn.collab.net/repos/svn/trunk/CHANGES
> > the following line:
> >
> > * 'svn log' output headers now say "rXXXX | " instead of "rev XXXX:  "
> >
> > Could this be the problem? I checked the sources for the maven changelog
> > plugin and the regular exception seems to expect "rev xxxx" and not
> > "rxxxx"...
> >
> > Now this would seem trivial to change in the java source code for the
> > plugin, unfortunately I have no idea about how to actually create my own
> > version of the changelog plugin nor how to tell maven how to use a
> > different version of the plugin... surely this is documented somewhere?
> >
> > Regards
> >
> > /Mikael Lundgren
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Mikael Lundgren <mi...@leanon.se>.
Well,

that was it... after some experimenting I now get a working changelog in 
maven! One line of code had to change...

Here is the original code in 
org/apache/maven/svnlib/Attic/SvnChangeLogParser.java:

     /** The pattern used to match svn header lines */
     private static final String pattern =
         "^rev (\\d+):\\s+" +             // revision number
         "(\\w+)\\s+\\|\\s+" +            // author username
         "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
         "\\d+:\\d+:\\d+) " +             // time 16:01:00
         "([\\-+])(\\d\\d)(\\d\\d)";      // gmt offset -0400

and here is the code I put in:

     /** The pattern used to match svn header lines */
     private static final String pattern =
         "^r(\\d+) \\|\\s+" +             // revision number
         "(\\w+)\\s+\\|\\s+" +            // author username
         "(\\d+-\\d+-\\d+ " +             // date 2002-08-24
         "\\d+:\\d+:\\d+) " +             // time 16:01:00
         "([\\-+])(\\d\\d)(\\d\\d)";      // gmt offset -0400

Note the line with the comment "revision number" which is the only 
change to the plugin code.

Now I made a "dirty" plugin... I checked out a changelog-plugin from 
cvs, made my changes, ran the tests (btw i changed the test file as well 
to look like a current SubVersion log file), created a jar, fooled maven 
to take my version of the plugin and now it works.

Regards
/Mikael Lundgren

Mikael Lundgren wrote:

> Hmmm,
> 
> it seems that subversion 0.33.0 changed the format of the data created 
> by running svn log... from http://svn.collab.net/repos/svn/trunk/CHANGES 
> the following line:
> 
> * 'svn log' output headers now say "rXXXX | " instead of "rev XXXX:  "
> 
> Could this be the problem? I checked the sources for the maven changelog 
> plugin and the regular exception seems to expect "rev xxxx" and not 
> "rxxxx"...
> 
> Now this would seem trivial to change in the java source code for the 
> plugin, unfortunately I have no idea about how to actually create my own 
> version of the changelog plugin nor how to tell maven how to use a 
> different version of the plugin... surely this is documented somewhere?
> 
> Regards
> 
> /Mikael Lundgren



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Mikael Lundgren <mi...@leanon.se>.
dion@multitask.com.au wrote:

> It'd be good to change the regexp code to match both versions.
> --
> dIon Gillard, Multitask Consulting
> Blog:      http://blogs.codehaus.org/people/dion/
> 

Yes, it would I guess. I have tried to create such an expression and 
even got it to work using the ORO package demonstrator at the jakarta 
site. However I can't get it to work with the regexp package.

Now I officially give up :-( This is starting to take way too much time 
for something that someone with better knowledge about regexp probably 
can fix in minutes.

Regards
/Mikael Lundgren


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by di...@multitask.com.au.
It'd be good to change the regexp code to match both versions.
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/



Mikael Lundgren <mi...@leanon.se> wrote on 20/11/2003 03:53:56 
AM:

> Hmmm,
> 
> it seems that subversion 0.33.0 changed the format of the data created 
> by running svn log... from http://svn.collab.net/repos/svn/trunk/CHANGES 

> the following line:
> 
> * 'svn log' output headers now say "rXXXX | " instead of "rev XXXX:  "
> 
> Could this be the problem? I checked the sources for the maven changelog 

> plugin and the regular exception seems to expect "rev xxxx" and not 
> "rxxxx"...
> 
> Now this would seem trivial to change in the java source code for the 
> plugin, unfortunately I have no idea about how to actually create my own 

> version of the changelog plugin nor how to tell maven how to use a 
> different version of the plugin... surely this is documented somewhere?
> 
> Regards
> 
> /Mikael Lundgren
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Mikael Lundgren <mi...@leanon.se>.
Hmmm,

it seems that subversion 0.33.0 changed the format of the data created 
by running svn log... from http://svn.collab.net/repos/svn/trunk/CHANGES 
the following line:

* 'svn log' output headers now say "rXXXX | " instead of "rev XXXX:  "

Could this be the problem? I checked the sources for the maven changelog 
plugin and the regular exception seems to expect "rev xxxx" and not 
"rxxxx"...

Now this would seem trivial to change in the java source code for the 
plugin, unfortunately I have no idea about how to actually create my own 
version of the changelog plugin nor how to tell maven how to use a 
different version of the plugin... surely this is documented somewhere?

Regards

/Mikael Lundgren


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by Mikael Lundgren <mi...@leanon.se>.
Thanks for the replies!

My connection string is set to 
scm:svn:http://127.0.0.1/repos/leanon/leif/trunk I incorrectly copied 
the wrong line from my project.xml file, but I don't think this matters 
much.

When i run svn log -v from the directory I get the expected log output 
which is defintitively NOT empty, here are the first few lines:

===== Start svn log -v output

C:\ttt\leanon\leif\trunk>svn log -v
------------------------------------------------------------------------
r20 | mikael | 2003-11-18 15:06:15 +0100 (Tue, 18 Nov 2003) | 2 lines
Changed paths:
    M /leanon/leif/trunk/project.xml

Changed to Subversion URL, it "works" in the sense that Maven does not stop
processing a maven site command, however no SCM related information is 
generated
.
------------------------------------------------------------------------
r19 | mikael | 2003-11-18 15:04:34 +0100 (Tue, 18 Nov 2003) | 1 line
Changed paths:
    A /leanon/leif/trunk/build.properties

Needed for subversion support
------------------------------------------------------------------------
r5 | mikael | 2003-11-17 11:26:36 +0100 (Mon, 17 Nov 2003) | 1 line
Changed paths:
    D /leanon/leif/trunk/offerter

===== Stop svn log -v output

I did take a look at the sources for the changelog plugin but I could 
not see any obvious reasons for it not to work. It could be that the log 
format has changed and that the regular expression that is supposed to 
parse the log file is no longer current, however I'm not that good at 
reading regular expressions to be able to tell...

I also checked the latest changes to the plugin but the subversion parts 
have not changed lately so a later version does not seem to be an answer.

-- 
Mikael Lundgren, LeanOn AB, www.LeanOn.se
Phone: +46 18 146405, Mobile: +46 703 400105
Kontroll på projekt och tid: www.teamplanet.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subversion changelog

Posted by di...@multitask.com.au.
Mikael Lundgren <mi...@leanon.se> wrote on 19/11/2003 05:47:28 
AM:

> Hi,
> 
> I'm trying to get Maven to generate changelog reports based on the 
> contents of a Subversion repository, however all I get is empty reports.
> 
> I have found the following information and applied it:
> 
> - I have installed Apache 2.0.48, Subversion 0.33, Java 1.4.2_02, Maven 
> 1.0rc1
> - I have created a build.properties file
> - I have set the maven.changelog.range to the empty string
> - I have set the maven.changelog.factory= 
> org.apache.maven.svnlib.SvnChangeLogFactory
> - I can run svn log -h from the command prompt in the directory where I 
> run "maven site" and the log file shows up as expected (it is not empty)
> - I have set 
> <connection>http://127.0.0.1/repos/leanon/leif/trunk</connection> in the 

> repository portion of project.xml, I have also tested the url to 
> actually point to the right place, not that it seems to matter much...

The connection string is incorrect. It ALWAYS starts with 'scm' followed 
by a delimiter and then the scm type, so yours should start with
'scm:svn:' where ':' is the delimiter. But I don't think it is used.

> Here is what I get (I only include what I find to be the relevant 
output):
> 
> site:run-reports:
>      [echo] Generating the Change Log...
> maven-changelog-plugin:report:
>      [echo] Generating the changelog report
> SCM Working Directory: C:\ttt\leanon\leif\trunk
> SCM Command Line[0]: svn
> SCM Command Line[1]: log
> SCM Command Line[2]: -v
> ChangeLog found: 0 entries
> 
> That last line... "0 entries" worries me...

What happens when you run

svn log -v

in

C:\ttt\leanon\leif\trunk
?

> I checked the bug tracking system but all I could find was a mention of 
> a problem that seems unrelated - and should be fixed by the range 
> property mentioned above.
> 
> Anyone with any pointer? Is this even supposed to work at all?
Yes, it should work.

Better error messages would be nice too :-)
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org