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

Open
basilevs opened this issue Apr 13, 2024 · 0 comments
Open

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}"
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

No branches or pull requests

1 participant