Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set-version fails to update MANIFEST.MF if CI-firendly versions are in use #3744

Closed
basilevs opened this issue Apr 13, 2024 · 0 comments · Fixed by #3900
Closed

set-version fails to update MANIFEST.MF if CI-firendly versions are in use #3744

basilevs opened this issue Apr 13, 2024 · 0 comments · Fixed by #3900

Comments

@basilevs
Copy link
Contributor

basilevs commented Apr 13, 2024

Environment

Tycho 4.0.7

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/homebrew/Cellar/maven/3.9.6/libexec
Java version: 21.0.1, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/21.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_GE, platform encoding: UTF-8
OS name: "mac os x", version: "12.7.4", arch: "aarch64", family: "mac"

Test steps

  • Unzip versionFail.zip
  • Ensure that mvn clean verify -f versionFail succeeds
  • Run mvn -f versionFail org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=2.0.0-SNAPSHOT. Ensure is succeeds.
  • Run mvn -f versionFail clean verify again

Expected result

A build should succeed as no manual changes were applied to the project - set-version command was the only actor.

Actual result

A build fails with:

versionFail/META-INF/MANIFEST.MF [5:0]: Unqualified OSGi version 1.0.0.qualifier must match unqualified Maven version 2.0.0-SNAPSHOT for SNAPSHOT builds

Excerpts

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: VersionFail
Bundle-SymbolicName: versionFail
Bundle-Version: 1.0.0.qualifier
Automatic-Module-Name: versionFail
Bundle-RequiredExecutionEnvironment: JavaSE-17
<artifactId>versionFail</artifactId>
<groupId>com.example</groupId>
<packaging>eclipse-plugin</packaging>
<properties>
	<revision>1.0.0-SNAPSHOT</revision>
</properties>
<version>${revision}</version>

Notes

An attempt to use ${revision} in MANIFEST.MF breaks PDE:

Invalid manifest header Bundle-Version: "${revision}" : invalid version "${revision}": non-numeric "${revision}"
sratz added a commit to sratz/tycho that referenced this issue May 31, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes eclipse-tycho#3744.
sratz added a commit to sratz/tycho that referenced this issue May 31, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes eclipse-tycho#3744.
sratz added a commit to sratz/tycho that referenced this issue May 31, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes eclipse-tycho#3744.
laeubi pushed a commit that referenced this issue Jun 1, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes #3744.
eclipse-tycho-bot pushed a commit that referenced this issue Jun 1, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes #3744.

(cherry picked from commit f4e7ede)
eclipse-tycho-bot pushed a commit that referenced this issue Jun 1, 2024
In PomFile#getVersion(), resolve properties used in the raw version of
the project. This is necessary so that downstream manipulators
(MANIFEST.MF, feature.xml, category.xml, ...) can see the actual version
and act on it.

Fixes #3744.

(cherry picked from commit f4e7ede)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant