You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Ersin Er <er...@gmail.com> on 2006/01/22 20:21:22 UTC
Naming conventions for artifactIds, groupIds and how this relates to site generation
Hi all,
We currently use artifactIds like package names. For example we have:
<artifactId>org.apache.ldap.server.core</artifactId>
(and we have no groupId for this definition, so it's inherited from
parent which is org.apache.directory.server.)
However I think we should have:
<groupId>org.apache.ldap.server</groupId>
<artifactId>core</artifactId>
This allows a better repository structure which looks like the
standard Java library layout where groupIds are like package names and
artifactIds are like class names.
Another income using this approach is that it allows finer site
generation. m2 uses artifactIds for generating subproject directories.
This was we do not overside site deploy urls for all subprojects.
The only problem with this approach is the name of the distribution
jar files. With the approach I propose we get:
asn1-<version>.jar in org/apache/directory/asn1/<version>
instead of:
org.apache.directory.asn1-<version>.jar or org.apache.-<version>.jar
So it may be best to use shortest explanotory name possible like:
directory-asn1
mina-core
common-ldap
apacheds-plugin or apacheds-maven-plugin (not maven-directory-plugin
(which is an internal convention of maven project I think) ?)
protocol-kerberos (not apacheds-protocol-kerberos ?)
It this is still not explanatory then I offer more. We may keep
package name artifactIds which causes other problems.
And also maven conventions favor the final approach.
As the final note consider that eclipse project generated by maven
take the name from artifactIds. (However IMO they should have taken
the name field in the pom.)
And I still see chance for the first scheme I offered (single level
artifactId like core), please also consider that one.
WDYT?
And I think Brett may have good advices for us while he knows the
conventions and incomes best.
Cheers,
--
Ersin
Re: Naming conventions for artifactIds, groupIds and how this relates
to site generation
Posted by Alex Karasulu <ao...@bellsouth.net>.
Ersin Er wrote:
>Hi all,
>
>We currently use artifactIds like package names. For example we have:
>
><artifactId>org.apache.ldap.server.core</artifactId>
>
>
Yeah this was an experiment that just did not work out. I'm ready to
back out of this.
>(and we have no groupId for this definition, so it's inherited from
>parent which is org.apache.directory.server.)
>
>However I think we should have:
>
><groupId>org.apache.ldap.server</groupId>
><artifactId>core</artifactId>
>
>This allows a better repository structure which looks like the
>standard Java library layout where groupIds are like package names and
>artifactIds are like class names.
>
>
Right plus the fact that the groupId is a package prevents collisions
now with the artifactId. This is something we did not consider with
this present scheme.
>Another income using this approach is that it allows finer site
>generation. m2 uses artifactIds for generating subproject directories.
>
>
Ooooooohh ok that certainly clarifies what we must do. Everything is
getting to be somewhat messy now with all these artifacts having their
id's set to the package name. It's also very redundant with the groupId
also having the same package name. It's out of control.
...
>So it may be best to use shortest explanotory name possible like:
>
>directory-asn1
>mina-core
>common-ldap
>apacheds-plugin or apacheds-maven-plugin (not maven-directory-plugin
>(which is an internal convention of maven project I think) ?)
>protocol-kerberos (not apacheds-protocol-kerberos ?)
>
>It this is still not explanatory then I offer more. We may keep
>package name artifactIds which causes other problems.
>
>And also maven conventions favor the final approach.
>
>As the final note consider that eclipse project generated by maven
>take the name from artifactIds. (However IMO they should have taken
>the name field in the pom.)
>
>And I still see chance for the first scheme I offered (single level
>artifactId like core), please also consider that one.
>
>WDYT?
>
>And I think Brett may have good advices for us while he knows the
>conventions and incomes best.
>
>
I agree with reverting to simple short artifactIds with the groupId
being set to a package.
+1 Please Brett let us know. I think you, Brett, may have warned me a
few times about this approach being not too good where maven is
concerned. I really should have listened more rather than exprimenting :).
Alex
Re: Naming conventions for artifactIds, groupIds and how this relates to site generation
Posted by Ersin Er <er...@gmail.com>.
Hi,
Which form is better up to you?
1)
<groupId>org.apache.directory.mina</groupId>
<artifactId>core</artifactId>
which deploys to:
http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/core/<version>/core-<version>.jar
or
2)
<groupId>org.apache.directory.mina</groupId>
<artifactId>org.apache.directory.mina</artifactId>
which deploys to:
http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/org.apache.directory.mina/<version>/org.apache.directory.mina-<version>.jar
or
3)
<groupId>org.apache.directory.mina</groupId>
<artifactId>mina-core</artifactId>
which deploys to:
http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/mina-core/<version>/mina-core-<version>.jar
And another point: if we choose, for example the 3rd option, consider
integration and filter subprojects:
Which one do you prefer?
3.1)
<groupId>org.apache.directory.mina</groupId>
3.1.1) <artifactId>mina-netty-codec-filter</artifactId>
or
3.1.2) <artifactId>mina-filter-codec-netty</artifactId>
which deploys to:
3.1.1) http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/mina-netty-codec-filter/<version>/mina-netty-codec-filter-<version>.jar
or
3.1.2) http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/mina-filter-codec-netty/<version>/mina-filter-codec-netty-<version>.jar
or
3.2)
<groupId>org.apache.directory.mina.filter.codec</groupId>
<artifactId>mina-netty-codec-filter</artifactId>
http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/filter/codec/mina-netty-codec-filter/<version>/mina-netty-codec-filter-<version>.jar
or
3.3)
<groupId>org.apache.directory.mina.filter.codec</groupId>
<artifactId>netty</artifactId> (which mimics 3.1.2 which is strict
package-class like scheme)
which deploys to:
http://cvs.apache.org/maven-snapshot-repository/org/apache/directory/mina/filter/codec/netty/<version>/netty-<version>.jar
I wish I did not write anything wrong. It has been a bit hard to write
this e-mail :-) You'll need to think about applicable schemes for
[1-2](.[1-9])+ yourself ;-)
--
Ersin