Gregory Kick wrote:
> As far as the naming/directory structure goes, I modeled what I did
> after the maven projects. For example, take a look at maven-script
> ( http://svn.apache.org/viewvc/maven/components/trunk/maven-
> script/ ). The maven-script project is a sub-project of maven and
> maven-script-ant is a subproject of maven-script. Hence, codemodel-
> annotation-compiler is named as a subproject of codemodel...
The reason I suggested to keep the directory names shorter, is because
it's easier for us developers (like in terms of shell file name
completion.) Given that the directory names and artifactIds can be
independent, I don't see the point of having redundant "codemodel-"
prefix on every module.
And I'm pretty sure you can find examples in both ways. For example, the
cargo project that I also work on uses shorter directory names. For
example, "core-container-tomcat" module is in core/containers/tomcat, as
you can see in
http://fisheye.codehaus.org/viewrep/cargo/cargo/trunk
> As far as the whole -parent suffix thing goes, I'm not a fan. I
> think that it was something that was was created to appease the old
> maven 1.x-style project inheritance which used a separate directory
> (e.g. codemodel-annotation-compiler and codemodel-parent would be on
> the same level). In fact, it looks like the maven people deprecated
> it for 2.x in their own projects. And while there's nothing to say
> that it's wrong to call the top-level directory codemodel-parent, it
> seems awkward to me to have a codemodel directory under a codemodel-
> parent directory given the naming convention that I just cited.
Just to recap, I believe the proposal was to call directories like:
codemodel/
pom.xml (for 'codemodel-parent' module)
core/
pom.xml (for 'codemodel' module)
annotation-compiler/
pom.xml (for 'codemodel-annotation-compiler' module)
The reason I'm suggesting the codemodel-parent, codemodel, and
codemodel-annotation-compiler is because it's easier for the users,
which includes a large number of non-Maven users.
We can afford to have longer names on things that users don't see.
Instead, we should be using shorter name for things people use.
I can live with redundant directory names, but I really feel strongly
about the artifactId, because it's visible to users.
> Finally, I chose codemodel-core because that suffix seems to be the
> standard among active maven 2.x projects. ( http://mvnrepository.com/
> search.html?query=-core ).
It's certainly common to see modules with "-core" suffix. But that
doesn't necessarily mean that everything core must be suffixed with core.
And besides, from the user's point of view, the notion of
"codemodel-core" doesn't really make much sense, as codemodel is really
just a library (with this little tool called annotation-compiler on the
side), and there's really nothing other than the "core". So why the core
suffix?
The users couldn't care less about how the build structure is organized.
> Anyway, let me know what you guys think of all so that we can settle
> it and maybe see if the results of this discussion can get pushed
> into http://maven.apache.org/guides/mini/guide-naming-conventions.html .
I don't think any of the proposals disccused here is inconsistent with
the document you linked above.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com