File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven site reports (developer activity) and SCM configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven site reports (developer activity) and SCM configuration" Watch "Maven site reports (developer activity) and SCM configuration" New topic
Author

Maven site reports (developer activity) and SCM configuration

Mateusz Papiernik
Greenhorn

Joined: Jul 05, 2009
Posts: 13
Hi guys!

I've been struggling with this problem for a while, and after reading Maven plugins documentation and experimenting with different configurations I decided to seek help. I hope I won't be a bother

I'm developing a multi-module JEE application, with parent POM and several submodules (EJB modules, WAR archive module, EAR assembly module, some utility JARs with entities, exceptions, common classes, and so on). I'm trying to generate a site report with comprehensive report set.

I've set up all site template parameters in parent src/site/site.xml:



and lots of report generation configuration stuff in parent pom.xml. I do not have site.xml definitions per submodule, nor any specific site reports configuration in pom.xml files in submodules.

The site reports work well up a to a point. Almost all reports are generated correctly, including submodules correctly linked in the menu of the report site. The problem is with maven-changelog-plugin I use. My goal is to configure a project-wide developer activity report that would include activity in all branches on the SVN repository (I use traditional trunk/tags/branches layout).

My SCM is configured as follows:



and maven-changelog-plugin config looks like that:



The problem is, with SCM referencing trunk, and not the root directory of the SVN repository, the developer activity report is inacurrate. Trunk includes only commits made by person in charge of merging branches together, there is no trace of "real work" in the branches -- which I am not surprised about.

The problem emerges when I change the SCM configuration to point to the project root, instead of trunk working directory:



Now maven site target fails. Generation of the site for parent module goes through, seeking changelog for https://svn.host/svn/myproject (and generating complete developer activity report I guess) - however every submodule fails. Maven-changelog-plugin is trying to lookup svn log for https://svn.host/svn/myproject/submodule - a non-existent repository path.

What am I missing? Is it possible to generate an accurate developer activity report for multi-module project, or should I drop generating sites for submodules completely? Or maybe disable generating this particular report for submodules, and rely only on parent module to get this report?

I was hoping Maven could parse svn log for the whole repository to generate this report, but after reading documentation I can't find any clue how to achieve this.

I'd be very grateful for any clues how to approach this problem.


Thanks a lot!
Mateusz


SCJP 1.6
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16012
    
  19

It's hard for me to answer this, since you're fairly ambitious in your goals and it's hard to read all you've got without killing a tree (hard copy). Which is more work than I'm up to at the moment.

However, I think that basically this is what's being done for a number of the jakarta projects, and a lot of them use the maven site goal to build their respective corners of the jakarta website. Since all that stuff is open-source, you might want to look at how they did it.

The one thing that I'm suspecting, however, is that each of the sub-projects has its own site build info in the sub-project POMs.

You mentioned the side nodes of the SVN tree. That's not part of the normal development/release data set, since there's only one authoritative version of the system (the trunk) which may have snapshots and production. Technically. one could run the maven site rules on all the tags and branches, allowing for the possibility that they might want to deploy to the master URL. Tags, however, are theoretically immutable, and branches are normally only of interest to the people involved in the branch, who presumably can produce their own local site, if that's what they're into.


Customer surveys are for companies who didn't pay proper attention to begin with.
Mateusz Papiernik
Greenhorn

Joined: Jul 05, 2009
Posts: 13
Tim Holloway wrote:It's hard for me to answer this, since you're fairly ambitious in your goals and it's hard to read all you've got without killing a tree (hard copy). Which is more work than I'm up to at the moment.


Oh, of course - I didn't expect you to go that far

Tim Holloway wrote:
However, I think that basically this is what's being done for a number of the jakarta projects, and a lot of them use the maven site goal to build their respective corners of the jakarta website. Since all that stuff is open-source, you might want to look at how they did it.


I was looking for some projects to sniff at - didn't think about Jakarta. Thanks, I will definitely explore this route and check how they configured their site reports.

Tim Holloway wrote:
The one thing that I'm suspecting, however, is that each of the sub-projects has its own site build info in the sub-project POMs.


That's what I'm suspecting too. The main question is, whether they all generate developer activity, or they skip it - and the only one generated is in the master project.

Tim Holloway wrote:
You mentioned the side nodes of the SVN tree. That's not part of the normal development/release data set, since there's only one authoritative version of the system (the trunk)


Yes, I am aware of that - in the production environment. The point is, we have a situation where the developer activity report will be used to score the activity of all the developers. And as long as the development goes mostly in branches by per person basis and changes are merged to trunk by a single person responsible for these merges (hence only his commits are visible in svn log for /trunk, and no history of others' work whatsoever, apart from merged files), the only way to do that is to include these branches in reports.

Tim Holloway wrote:
Technically. one could run the maven site rules on all the tags and branches, allowing for the possibility that they might want to deploy to the master URL. Tags, however, are theoretically immutable, and branches are normally only of interest to the people involved in the branch, who presumably can produce their own local site, if that's what they're into.


Exactly that's what would happen if not for the concept of single report used to monitor the activity of everyone. In "real world" I would not be even remotely interested in exact activity in branches, as long as the final product merged to /trunk would be exactly what I wanted - but as for now, I am obliged to to the "invigilation" stuff, and developer activity gathering the svn logs would be of real help. I am not the one who is enforcing the idea, I just have to comply.

I will try to disable developer activity reports in submodules, giving the possibility to finish the site build with SCM set to / instead of /trunk and I will see how it goes.

Thanks for your suggestions and help!


Best wishes,
Mateusz
 
wood burning stoves
 
subject: Maven site reports (developer activity) and SCM configuration