-
Notifications
You must be signed in to change notification settings - Fork 188
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
Inconsistent build-qualifier computation between goals tycho-packaging-plugin:build-qualifier and package-feature #553
Comments
Just wondering, do you do an incremental build ( |
After continuing my debugging it looks like the
In the m2e-build on the Jenkins server, that is affected here, the While the replacement of the m2e.feature actually makes sense (it was not touched in the meantime), although it leads to the described errors, I wonder why the replacement does not happen if all changes are squashed on top of the current master? |
I do a full build |
You need to increment the feature version as well if you increment a bundle version, this is not the |
But I did not increment the bundle version. It was incremented in the commit before (7a6f149), but since there was no release in-between I did not have to increment it. The feature version was incremented longer before both commits, but there was also no release since then. I think this is fine. I think the problem here is that due to other commits that were pushed on the master-branch in the meantime a newer version of the feature (in terms of build-qualifier) is available in the base-line repo. And because there was no other commit on the branch that touches anything that would affect the features build-qualifier, the feature version is driven by that other commits change. So the feature is correctly replaced by the base-line version since it has the exact same version (including build-qualifier) as the one in the baseline. But that baseline-version of the feature contains the wrong build-qualifier of the plugin. So it looks like everything works as expected. However I have the impression that the baseline replacement performed by the |
Tycho |
It looks like it actually is the default behavior of the |
The goals and
tycho-packaging-plugin:build-qualifier
andtycho-packaging-plugin:package-feature
seem to have a different logic how to compute/obtain the build-qualifier of a plugin included in a feature with respect to merged git-branches.The
build-qualifier
goal seems to consider the paths via both parent-git-commits of a merge-commit when computing the latest time a Plug-in was touched by a commit, while thepackage-feature
goal seems to consider only one parent/path (in my case only the second one). But maybe thebuild-qualifier
goal just takes the other one and is 'right' by chance in this case.This can lead to errors like the following where the dependency of a feature to a plug-in cannot be resolved during the assembly of the repository:
The version required by the feature is
1.17.5.20220120-2044
while that plug-in is build with version1.17.5.20220121-0829
:The Git-History looks like the following and the build was performed with the currently checkout branch
guavaOld
:On the master branch the affected plug-in was last touched with commit 7a6f149 on the branch being built that plug-in was last touched with commit 43cc2ad:
What's interesting is that the
feature.xml
file written to the feature-project's target folder (in this caseorg.eclipse.m2e.feature\target\feature.xml
) contains the correctly expanded versions, but in the jar file created next to it the feature.xml has the wrong version of the included plug-in. So it looks like the mistake is happening in the packing step.The text was updated successfully, but these errors were encountered: