This works fine, except it still fails for classes that are not part of 
the <sourceDirectories>, but are found in maven.src.dir, e.g. 
SliceDescriptor, our entire test hierarchy etc.

I still think we need to have properties for the sourceDirectories. My 
proposal is to do the following:
1) Use Vincent's patch.
2) Add a new ant property available: maven.sourceDirectories.fileset
3) Change the checkstyle target to use that fileset rather than src.dir.

+1/-1/0?
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers




"Vincent Massol" <[EMAIL PROTECTED]>
05/25/02 11:27 PM
Please respond to "Turbine Maven Developers List"

 
        To:     <[EMAIL PROTECTED]>
        cc: 
        Subject:        [PATCH] checkstyle link fix (second try)


Here is my second patch which replaces the previous one. I am much
happier with this one as :

- There is no change to ProjectProperties.java
- It does not depend on maven.src.dir nor maven.src.set

FYI, it uses JDepend to find the location of the source file :

    public static final String getPackagePath(String absoluteFileName)
throws IOException
    {
        JavaSourceFileParser parser = new JavaSourceFileParser();
        JavaClass clazz = parser.parse(absoluteFileName);
        String packageName = clazz.getPackageName();

        return packageName.replace('.', File.separatorChar) +
            File.separatorChar + clazz.getName() + ".java";
    }

JDepend looks cool and useful :-)

-Vincent

PS: I haven't tried it on unix.
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Attachment: src.patch
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to