On 19 September 2011 01:01, Barrie Treloar <[email protected]> wrote:
> On Sun, Sep 18, 2011 at 9:39 PM, sebb <[email protected]> wrote:
>> Is there a plugin which can be used to check that a project is using
>> the standard Maven directory layout?
>>
>> For example, src/main/java rather than src/java; src/changes/changes.xml etc.
>>
>> AFAICT. the verifier plugin could be used for this, but:
>> 1) the rules would have to be defined
>> 2) the rules file would have to be copied to each project to be checked.
>>
>> I'm looking for a plugin that can just be invoked directly from the
>> CLI in any project.
>>
>> Ideally the plugin would generate a report showing the non-standard files.
>
> I'm not sure what you plan on doing with the information, are you able
> to elaborate?
>
> The standard directories layout
> http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
> lists what you are looking for.

It lists only some of the standard files and paths.
For example it does not list src/changes/changes.xml

> It's just as quick to visually inspect them.

Maybe if one knows the locations by heart, and does not have lots of
projects to check.

> And the only way to know if they are using non-standard directories
> would be if the pom defined those non-standard directories, otherwise
> maven wont know about them.

Again, that involves more work than running a plugin; poms can be
large and don't have a standard order of top-level entries.

Also, Maven seems to be able to detect certain non-standard directory locations.

For example, Commons DbUtils currently uses src/java and src/test, and
the pom does not define these locations, yet Maven can compile the
source and tests.

> I guess the tool could also help you migrate to the standard layout...

The intention was to produce a compliance report, a sort of checkstyle
for the layout.
You could then decide what fixes to make.

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to