tycho icon indicating copy to clipboard operation
tycho copied to clipboard

tycho-versions-plugin for 4.0.9 fails with "missing class"

Open datho7561 opened this issue 1 year ago • 2 comments

We get the following error while trying to use set-version:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:4.0.9:set-version (default-cli) on project parent: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:4.0.9:set-version failed: A required class was missing while executing org.eclipse.tycho:tycho-versions-plugin:4.0.9:set-version: org/eclipse/tycho/model/manifest/MutableBundleManifest

Specific way that we call it:

./mvnw -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$VERSION-SNAPSHOT

(see https://github.com/eclipse/lsp4mp/blob/f3628e2bc9521d8507c7125ca3e9915f34b567ea/Release.Jenkinsfile#L30)

datho7561 avatar Oct 22 '24 13:10 datho7561

The 4.0.8 version of the plugin works

datho7561 avatar Oct 22 '24 13:10 datho7561

I get the same error. Working command: mvn versions:update-parent -DgenerateBackupPoms=false org.eclipse.tycho:tycho-versions-plugin:4.0.8:set-version -DnewVersion="12.1.0-SNAPSHOT" Not working: mvn versions:update-parent -DgenerateBackupPoms=false org.eclipse.tycho:tycho-versions-plugin:4.0.9:set-version -DnewVersion="12.1.0-SNAPSHOT"

SVNKoch avatar Oct 24 '24 13:10 SVNKoch

I cannot reproduce this.

git clone https://github.com/eclipse/lsp4mp.git
cd lsp4mp/microprofile.jdt
mvn org.eclipse.tycho:tycho-versions-plugin:4.0.9:set-version -DnewVersion=1.2.3-SNAPSHOT

works perfectly fine here.

Can you run with -e and give some information about your environment (java version, etc.)?

sratz avatar Oct 29 '24 10:10 sratz

Just some notes

  • -Dtycho.mode=maven is not supported anymore, you should avoid using that
  • when changing Tycho versions I noticed it is sometimes required to pass -U to force maven to really download everything required.
  • If you are using a different version in your build it can become a problem for CLI invocations, so make sure that the project uses the same tycho version as well as the extensions.xml (if used).

laeubi avatar Oct 29 '24 10:10 laeubi

If you are using a different version in your build it can become a problem for CLI invocations

This was the issue. We were using a 3.y.z version of Tycho for the build, but we didn't specify the version of the tycho-versions-plugin to use, so I'm guessing it pulled in the latest. @rgrunber made a change to update to Tycho 4.0.9 for the build, so now (as @sratz pointed out) running tycho-versions-plugin 4.0.9 on the command line works: https://github.com/eclipse/lsp4mp/commit/7ca4b44ee566643e8e5c32e632e14d2bd2a22240#diff-a8cdf9ab5d54b6694c54edd69c5b02dbcb9d047c63d492cfe2ee7160063dd918R13

datho7561 avatar Oct 29 '24 14:10 datho7561

Thanks for your help and sorry for the noise!

datho7561 avatar Oct 29 '24 14:10 datho7561