----- Original Message -----
From: "Pete Kazmier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 05, 2002 8:46 AM
Subject: Re: [BUG] Checkstyle report generates invalid links to
SourceXReference


> On Sun, May 05, 2002 at 03:40:03AM +0200, Rainer Hermanns wrote:
> > To suggest a solution, I think it would be useful, to create a wrapper
> > task for checkstyle, which maps the directories as correctly as the jxr
> > task does, recursively down from $src.dir with each "sub module" checked
> > separately.
> >
> > What do think about this solution?
>
> As you noted, the real problem here is the fact that <sourceDirectories>
> can specifiy one or more directories, yet the checkstyle task can only
> work with a single source directory.  It does not currently operate on a
> reference such as src.set (similiar to the way the jxr task).
>
> There were two solutions I was contemplating:
>
> 1.  I was going to write a patch for the Checkstyle guys so their Ant
>     task would not only accept a single directory, but alternatively a
>     reference instead (this lets us use our src.set reference).  In
>     addition, I was going to modify their task so that absolute paths
>     weren't generated but rather relative ones.  This would then
>     generate an hierarchy identical to the jxr output and thus make
>     linking to the jxr output trivial.

+1, I was actually going to tackle this one until I realized I had finals
coming up =).

> 2.  Try to convince people that <sourceDirectories> in the POM should
>     only point to one directory instead of one or more.  This change was
>     made to the unit test and integration test elements (only one
>     directory can be specified), so I was going to try and push for
>     consistency.  If the source directory is limited to a single
>     directory then all of these linking issues becomes trivial as well
>     because all these Ant tasks use the same directory when they start
>     processing.
>
> 3.  As a short term "hack", the checkstyle.dvsl stylesheet could just
>     strip off any prefix that matches any of the <sourceDirectory>
>     elements.  This would then generate a normalized output that would
>     be easy to link to the jxr output.  However, this is a hack.
>
> In any case, I'd prefer #1 or #2, and I tend towards #2 because it seems
> that we are just going to keep encountering this problem over and over
> again.  There are many more Ant tasks that take a single source
> directory vs those that take path references.  What are other people's
> opinions?  How important is the ability to specify multiple source
> directories?  It would seem to me that if you have a project spread
> across different directories then you have an organization issue.

I am currently working on a project (not mine, just contracting) that has
this kind of setup:
WebApplication - all web stuff
EJB - All EJB stuff
Test - yep, you guessed it

I am going to be recommending that they switch over to Maven for all of
their projects and I'm sure this issue will come up.

-warner

> Pete
>

Reply via email to