-
Notifications
You must be signed in to change notification settings - Fork 189
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
#443 - publish maven GAVC info into the P2 meta-data #485
#443 - publish maven GAVC info into the P2 meta-data #485
Conversation
I don't think this is enough to cover #443, the properties would be set, but the MavenDependencyInjector wouldn't consume them, would it? |
If it currently does not do this it should do that. At least that are seems to be the way how it is published inside the repository. I don't have a test-case at hand, but at least it should then show up in a published P2-Update-site... Now assume we consume from a P2 site an artifact that was published there with maven coordinates this should work as well?! |
I have put a breakpoint at |
See #473 for a test case of what's expected here. |
@mickaelistria do you think we can merge this as a first valuable step? I could take a look at MavenDependencyInjector afterwards. |
cd8d62f
to
6925c29
Compare
I don't think it's worth merging it if there is no consumer for it. |
6925c29
to
01d9781
Compare
e.g the |
It consumes it from artifact repository, and I believe the tweak you're adding here only affects the metadata repository. Artifacts are already holding information about Maven coordinates, I'm not sure (really not sure, not against) that adding Maven coordinates on installable units/metadata is a good idea as 1 unit can lead to different artifacts. |
Sorry for confusion, you are right. Anyways there is one IU per bundle artifact and tycho already stores this information there, just copied from an arbitrary site generated by tycho:
or take a look at |
@mickaelistria can we merge this given that obviously it is already the case in tycho for other parts to publish that information to the IU? |
we have no test nor use-case for it so far. So I'd rather adding code and behavior to maintain without value to balance it. |
org.eclipse.tycho.p2.publisher.P2GeneratorImplTest explicitly test this behavior for the generator so there is/was a use that was strong enough to put this into a central part of Tycho... |
Also see org.eclipse.tycho.p2.testutil.InstallableUnitMatchers.hasGAV(String, String, String, String) |
If the test is there and is already green, what does this change bring compared to current state? |
It simply aligns with how Tycho behave filling a gap currently not discovered by any test. I'm just a bit curious your change about PGP was also added without any additional test or "gain" in tycho, so how is this different? |
PGP support is a gain for Tycho because there is/was a concrete need from consumers to allow adding PGP signatures to artifact metadata. Although there is no test, there was a clear request and use-case to cover, and this was adding a clearly identified necessary feature for consumers. |
Can you please just merge this with #487 so they can be reviewed together? I'm loosing track and having both patches in the same PR would allow to highlight the value and facilitate review. |
I don't know why it was added at the first place, but if other tycho components do add this information when they work with maven items its seem valid to do it here also. And it adds value to the story for #433 so we better can discover the origin of an artifact.
Artifacts for maven target locations might be seen in the P2 metadata as if the where actually locally build units and not derived from an maven artifact (e.g. like we already do with pom=consider artifacts where this meta-data is already generated the same way as here)
I have already shown in #487 how it could be used to reliable recover maven GAV without fiddling around with the storage location of an artifact (e.g. if we consume one from an update-site that does not store the information on the right path so we can assume it is/was a maven artifact).
But as this is not limited to Maven Target Location artifacts but any IU (e.g. even ones already published in P2 repositories) I think these are separate changes. |
This publishes the info of the original artifact into the P2 metdata.