Niclas Hedhman wrote:
On Wednesday 31 May 2006 15:46, Trygve Laugstøl wrote:

What you're describing here is the default Maven repository layout. With
your own "osgi" layout you should be able to name your artifacts just
like you want. Check out [1] for how to translate an artifact to a path.


Well, the interface is all good and so on, but I don't se how that really fits into the discussion... Please enlighten me.

There seems to be a bit of confusion here between the naming of artifacts.

One name is the name that the file will get under target/ and the other is the name in the repository. You do not want to change the name under target/ because that means that you will have to configure all plugins using it. It's just not worth the trouble for an intermediate file.

The repository one you have more control over like I'm trying to explain below.

1. Maven do not like to have the groupId part of the filename. Equinox think
     it is a bit of a "must".

2. Maven insist of putting a dash between the artifactId and version in the filename, Equinox insist on an underscore.

This is still only true for the default layout[1], by making your own layout you can translate from an Artifact which has the fields groupId, artifactId, version etc which it IIRC translates into a path like:

 $groupId.replace('.', '/')/$version/$artifactId-$version.$extension

What I was proposing was that you make a translator that returns this:

 $groupId_$artifactId_$version.replace('-', '_')

(as you'll notice I'm not really aware of the OSGi naming rules)

I would suggest prefixing the path with the same group id directory structure that the default layout uses because it can easily kill your favorite ibiblio repository when you have a few hundred artifacts in there.

[1]: https://svn.apache.org/repos/asf/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/repository/layout/DefaultRepositoryLayout.java

These are by themselves nothing to worry or care about and very much personal preference et cetera.


 3. Some people (Jeff) expresses a strong desire that the same filenames are
    used no matter where it is being used.

 4. Jeff also insist on being able to put jars in a single directory, claiming
    management agents get an easier job.

 5. Some people (Richard) likes to have short filenames.

 6. Equinox is troubled by dashes in filenames, making it more difficult to
    use Maven produced bundles in Equinox.

3, 4 and 6 should be solved with a custom repository layout.

 7. I think OBR client should work straight against Maven repository.

This should be possible today as long as the OBR client uses the correct layout translator (be it "default" or "osgi")

Did I forget something??


So, in my PoV the "easiest" would be to;

 * have short artifactIds
 * filename created by [groupId].[artifactId]_[version].[qualifier]
   (dot, dash or underscroe in front of qualifier?)
 * OBR client can do searches (like Jeff suggested) but also work with
   groupId/artifactId and download straight from Maven repositories, incl
   the local cache management.

Just make sure you use the Maven components to do this.

 * Equinox needs no change.
 * Felix changes directory names and artifactIds.

Is this at all possible??

AFAICT, I can't make Maven understand that a particular group uses a different repository layout, and if it can manage a different layout "per repository host" then we might be in a position of something useful. So can it?

Maven will not understand layouts per group id, only layouts per repository which I think should be sufficient.

--
Trygve

Reply via email to