-
Notifications
You must be signed in to change notification settings - Fork 194
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
Bug: 1052 Adding integration test for Mirror can't find product bundle dependencies. #1085
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
dfca2f3
to
65b426c
Compare
Test Results 582 files +3 582 suites +3 4h 1m 43s ⏱️ + 36m 28s For more details on these failures and errors, see this check. Results for commit 6a3e4ac. ± Comparison against base commit 6b9cefe. ♻️ This comment has been updated with latest results. |
65b426c
to
43363bd
Compare
@fipro78 can you try to minimize the testcase as indicated in the bug report? I think a smaller test-case can help us to identify the root cause more quickly. |
@laeubi well I can try to if I remember what I have done back then. But IIRC you also asked for a testcase about plugin based products. Shouldn't then there be plugins that are integrated? IIUC you want me to drop everything else but the product and the target right? |
Yes I think you can drop all the reactor projects (beside target+product of course), and even reduce the product to only contain the This should then make debugging a lot easier as we have only a handful of bundles in the debug in contrast to now a few hundreds. |
I removed everything and tried to build the project alone locally, but it fails with this error:
No idea what is wrong. The pom.xml contains the plugins-repository and I trigger the build via
Any ideas? |
Are you using maven 3.8.6? |
Sorry for confusion, I think this is because the snapshot repository needs to be configured in the https://github.com/eclipse-tycho/tycho/wiki#configure-snapshots-repository-globally |
@laeubi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now!
2b52c19
to
5ba7575
Compare
@fipro78 I have now debugged this and the problem is that there are Projector warnings that prevent a solution here:
This then leads to the situation (as all requirements of a product are considered "non greedy" and optional) that the final result of the target only contains [a.jre.javase 17.0.0, tycho-its-project.issue1052.jaxrs.product 1.0.0.qualifier] what of course is not enough. It then (later on) fails to publish the content to the repository that is more later used to perform the mirror operation. |
<?pde version="3.8"?> | ||
<target name="tycho-its-project.issue1052.target"> | ||
<locations> | ||
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This location can be removed.
@fipro78 can you tell if you would have expsected that the reported requirements are already fulfilled? If yes by what bundle(s) from the target platform? |
@laeubi |
What I suspect here is that the product would actually works, but P2 actually has a problem here because it can't understand some of the requirements. At least the actual error seems misleading here. |
IIRC the initial product configuration did not show theses warnings, e.g. org.osgi.dto is available if Equinox is included. And I think I also added the necessary xml libraries. I would need to restore the initial setting to see. IMHO the error you see now is different than the initial one. |
Well that is because until now these warnings are never printed ;-) I added some output with this PR: |
By the way that are the units that are part of the current target platform: |
The initial target definition contained all necessary dependencies. You can see this in the first commit. While the service api and impl bundles are not necessary for the test, it seems the rest is necessary to show the real error. That said, the initial commit should have been only reduced by removing the api and impl, not the rest. |
I then get the following warnings from the projector:
The list of resolved units is:
|
I would think that the contracts should be resolved via org.apache.aries.javax.jax.rs-api I wonder why the annotation api is resolved via three different jars. Also SLF4J api is available twice. The resolution error does not make sense to me. |
@merks are you aware of any problems regarding P2 and |
If I look at this I see
as there is a version LIST @HannesWell I remember you have investigated some missing support in P2 regarding list support? Could it be: |
Yes that's right and it could definitivly be connected. |
Obviously it does or we wont see this error here, but maybe I don't fully understand the question? |
Here's a simple way to see what the p2 publisher does. Using `platform:/resource/ in the Repository Explorer shows the p2 published results of all workspace projects. Turning on Expert mode lists all the IUs. You can filter to find one and you can double click the version to see the serialized-to-XML p2 metadata of the IU. There should be nothing special about how |
5ba7575
to
f18764a
Compare
tycho-its/projects/product.pluginBased.mavenArtefacts/.mvn/extensions.xml
Outdated
Show resolved
Hide resolved
@fipro78 Tycho is updated to new eclipse release so with some small adjustments this should finally work now! |
23c2b07
to
3788a65
Compare
3788a65
to
e20e3d5
Compare
e20e3d5
to
adc26fb
Compare
adc26fb
to
7aea981
Compare
7aea981
to
82afece
Compare
82afece
to
aa7898f
Compare
@fipro78 I know this is a very long outstanding issue so sorry for the delay, but I think the root cause might be this here: lets see if it not breaks anything and after the merge I hope this will be finally resolved. If not I'm a bit out of clue as it seems no one else is really using plugin based products or facing the issue ... |
aa7898f
to
6a3e4ac
Compare
@fipro78 I now have analyzed the problem and actually it works, but the failure we see here is introduced by some mismatch between maven metadata and OSGi metadata:
Another issue is that Tycho does not fail when resolve the product, that's a bit strange.... |
I now replicated the behavior with two minimal test cases: this shows:
both test cases have a a requirement to the |
@fipro78 unless the bug in Tycho is fixed, you must watch out for messages like this:
these will give you the hints what is missing and needs to be added to the target for your project to package the product. If sou still see issues with none of these warnings please let us know so I can reopen this PR as further work will be performed in #3393. |
No description provided.