On 19 September 2011 03:49, Barrie Treloar <baerr...@gmail.com> wrote: > On Mon, Sep 19, 2011 at 10:56 AM, sebb <seb...@gmail.com> wrote: >>> 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 > > Yes, that's because the changes plugin defines this location. > See > http://maven.apache.org/plugins/maven-changes-plugin/examples/alternate-changes-xml-location.html > As do all the other plugins for non-core locations. > > I don't think the meta-information about locations is available to > Maven from the plugins, each plugin defines its own configuration and > Maven doesn't interpret that in anyway. > You would have to bake each plugin's default layouts into your > standard directory plugin checker.
Yes, that would be required, unless plugins can be interrogated for their defaults somehow. >>> 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. > > I hear you that this is a lot of work, but I'm still trying to > understand why you want to do this. > Not using the standard directories is a pain, but its a once off > configuration. > > What is the problem you are trying to solve? Consistency. It's a lot easier to understand projects if they use a standard layout. Many of the Commons projects started before Maven 2 and the standard layout. >> 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. > > It's defined in the pom, see > https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/pom.xml > <build> > <sourceDirectory>src/java</sourceDirectory> > <testSourceDirectory>src/test</testSourceDirectory> Sorry, don't know how I managed to miss that. >>> 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. > > I definitely agree, life is easier when the defaults are used. > But once configured its done and can be ignored again. > > And my fingers definitely twitch to relocation the code to the default > locations, but unless I'm the admin of that project the inertia is > normally too great to see this change occur. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org