Community
Participate
Working Groups
BuildQualifierMojo make use of the following code to separate the qualifier: String version = project.getArtifact().getVersion(); if (version.endsWith("-" + Artifact.SNAPSHOT_VERSION)) { version = version.substring(0, version.length() - Artifact.SNAPSHOT_VERSION.length() - 1); } The correct way would be to just use a split at "-" regardless of whether the qualifier is SNAPSHOT or something else like Final. Only supporting the snapshot qualifier makes it impossible to setup a proper versioning mechanism with Betas, Final version and Patches.
Patch submitted for review: https://git.eclipse.org/r/#/c/30845/
I am not convinced this is a good idea. -SNAPSHOT has special meaning in Maven, while other suffixes do not. Maven does not expand 1.2.3-Final version, and I don't expect Tycho to expand it either.
(In reply to Igor Fedorenko from comment #2) > I am not convinced this is a good idea. -SNAPSHOT has special meaning in > Maven, while other suffixes do not. Maven does not expand 1.2.3-Final > version, and I don't expect Tycho to expand it either. I see your point, so than that's a feature not a bug - right?
At very least more discussion is warranted, I think, and m2e-dev mailing list is a good place. Personally, I don't like this change. I had bundles versioned as 1.2.3-GA in the past, and that was the exact version I wanted. Most likely the "fix" is to make versioning scheme somehow configurable. I think the default scheme should be left as-is, but there should be API to contribute and enable alternative schemes.
(In reply to Igor Fedorenko from comment #4) > Most likely the "fix" is to make versioning scheme somehow configurable. I > think the default scheme should be left as-is, but there should be API to > contribute and enable alternative schemes. +1 while the current scheme maven version x.y.z-SNAPSHOT <-> osgi/p2 version x.y.z.qualifier maven version x.y.z <-> osgi version x.y.z is simple and it's easy for tacho to do a lookup maven artifact <-> osgi artifact both ways, it's probably not flexible enough as there are different versioning schemes used by different projects. At this point the lookup between maven and osgi/p2 artifacts is implicitly hardcoded and spread over various places int the tycho codebase, so it will take significant work to isolate these so we can make it pluggable. also see similar bug 382482
(In reply to comment #0) > Only supporting the snapshot qualifier makes it impossible to setup a proper > versioning mechanism with Betas, Final version and Patches. Do you have more details on what you consider a "proper version mechanism". Maven and Eclipse have quite distinct ideas on this - so please make sure to always propose what the Maven and what the OSGi version should be according to you.
(In reply to comment #5) > maven version x.y.z-SNAPSHOT <-> osgi/p2 version x.y.z.qualifier > maven version x.y.z <-> osgi version x.y.z These are the schemes that we currently support. > also see similar bug 382482 This bug proposes to also allow maven version x.y.z <-> osgi version x.y.z.qualifier (with "qualifier" being replaced with the build qualifier) I'm open for other ideas, but so far I haven't seen anything that was properly thought-out yet.
*** Bug 454747 has been marked as a duplicate of this bug. ***
Eclipse Tycho is moving away from this bugs.eclipse.org issue tracker to https://github.com/eclipse/tycho/issues/ instead. If this issue is relevant to you, your action is required. 0. Verify this issue is still happening with latest Tycho 2.4.0-SNAPSHOT if issue has disappeared, please change status of this issue to "CLOSED WORKFORME" with some details about your testing environment and how you did verify the issue; and you're done if issue is still present when latest release: * Create a new issue at https://github.com/eclipse/tycho/issues/ ** Use as title in GitHub the title of this Bugzilla ticket (may include the bug number or not, at your own convenience) ** In the GitHub description, start with a link to this bugzilla ticket ** Optionally add new content to the description if it can helps towards resolution ** Submit GitHub issue * Update bugzilla ticket ** Add to "See also" property (up right column) the link to the newly created GitHub issue ** Add a comment "Migrated to <link-to-newly-created-GitHub-issue>" ** Set status as CLOSED MOVED ** Submit All issues that remain open will be automatically closed next week or so. Then the Bugzilla component for Tycho will be archived and made read-only.