Kohsuke,
In switching email addresses I lost the thread so i'm working off of
the archives for this one...
Well, this clears up the first point of dissonance. My original
layout operated under the assumption that the directory names and the
artifactIds should match. I stand by that just because it's one less
thing to keep straight and it helps immensely in navigating source
when you're not familiar with a project (we like friendly open source
communities right? :-) ). But even if we put that aside for a
moment, I still think we may be doing more harm than good.
> 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.
I work with Maven source from bash and my tab key is intact... :-)
> 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.
I don't really agree here because I would think that the
project-subproject convention in use by maven and other large,
influential projects (spring) makes the -parent suffix overtly counter
intuitive. I mean sure, you can figure it out, but if I saw a list of
codemodel-* artifacts and a codemodel artifact i would think that
codemodel would be the top-level. There are only 3 artifacts in this
case so it's not at all a big deal, but it could get to be a bit
strange for larger projects (e.g. jaxb).
> 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.
Wait, so are you saying that the directories aren't the issue? And
does "shorter names for things people use" refer to codemodel v.
codemodel-core?
As far as the whole -core thing goes, that was just a best guess. It
doesn't at all matter to me what you think the best name for it is,
but I don't think that it should be called codemodel alone (for the
reasons stated above) if it's going to inherit from the same parent
project as the annotation compiler. I think that there's some
consensus in the maven community that the hyphen indicates a hierarchy
(since maven 2.x when -parent projects were phased out) and I don't
think that it's worth swimming upstream just to end up with the
codemodel artifact. I can't imagine anyone taking to the streets
because they had to type out a bit longer of an artifactId for clarity
(especially when "int x" will get you excommunicated from the church
of I-had-to-read-your-code). It seems to me that if it really is an
issue then it would be better to reevaluate the project hierarchy and
move the annotation compiler out of the codemodel umbrella.
And the point of that naming convention doc was that this discussion
is complete outside its scope. If we establish some clear conventions
then we could recommend them.
Anyway, at the end of the day, you're the owner and can do whatever
you want, but in a vote, the proposed directory/pom structure revision
that was outlined gets my -1 (with a +1 for changing codemodel-core to
codemodel-something-else).
--
Gregory Kick
http://kickstyle.net/