Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] For Maven users: Questions about versions and Eclipse

The ${groupId}/${artifactId}/${version}/${artifactId}-${version}.${type} structure you see on a maven repository is just an organizational database thing.
It is designed for a filesystem and web resource paths to find a specific maven coordinate (the groupId + artifactId + version + classifier + type).

The maven dependency resolution system maintains this structure in the $HOME/.m2/repository (also known as the Local Repository) in a form of local cache.

The final name given to the artifact when assembled, bundled, archived, etc... is up to the configuration of the final project's pom.
In practice, most projects leave the final name alone and use the convention that maven has established. (maven got started in mid 2001 as part of the Apache Alexandria project, and became a standalone project in late 2005).

It is important to treat the repositories as a database, and think of it in those terms.
the paths + filenames in the repository system can be thought of as the schema for the data (which is the contents of the artifact itself).

The important thing to your question is how the various plugins for the maven projects finally place the dependencies into a means that satisfies the OSGi framework you are using.
Not how to make the repository system adjust to osgi, as that's the wrong way to be thinking. (not to mention that the repository system is being used by more tooling than maven nowadays)

- Joakim Erdfelt

On Tue, Nov 8, 2011 at 8:54 AM, Eric Gwin <eric.gwin@xxxxxxxxxx> wrote:
Hi,

I'm trying to figure out if there is concensus at Eclipse regarding the versioning of bundles in a Maven repository.

OSGi/Eclipse requires <major>.<minor>.<service>.<qualifier> where the qualifier is some string designation for the build. However, Maven users utilizing "version ranges" would require usage of the Maven standard of <major>.<minor>.<revision>-[qualifier/buildno].

Some experimentation on my part shows that Maven renames objects based upon the artifactId and versionId when publishing. I haven't confirmed whether they are renamed back when retrieved for a build. However, to be compatible with Eclipse they will need to retain the <bundle_name>_<M>.<m>.<s>.<qualifier>.jar naming. Do they? Am I wrong? Since I don't use Maven for building I cannot test it easily.

Now Tycho utilizes P2 repositories, so the question is mostly sidestepped, but not all projects use Tycho to generate their bundles, not all projects generate only eclipse plugins, and not all teams publish only to P2. I'm wondering how other teams deal with the disparity between versioning schemes.

I don't want to accommodate Maven publishing standards only to break the artifacts published (Publishing to Maven shouldn't preclude the bundles use in Eclipse). However, given the growing number of bugs I'm receiving regarding Maven support, I believe that ignoring Maven methodology isn't in the best interest of the project as a whole.

Any comments/suggestions?

Thanks.

-Eric
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev


Back to the top