-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
p2 exporter #5716
p2 exporter #5716
Conversation
655ea9b
to
2825001
Compare
#5716 I created a new P2 exporter. |
|
||
Features can require bundles and other features. | ||
|
||
Bundles will come from the `-runbundles` instruction. This instruction can be managed with the resolver but it can also be set manually. Standard rules apply. The workspace is consulted to find the bundles and their versions. The bundles will be the highest available version in the repository. |
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.
As a side note:
There are two kinds of P2 repos. One is a complete repository, that contains all transient dependencies. The second one, like the bnd P2 Repo just contains a set of bundles. The dependencies are resolved in all the other P2 repositories in a target platform.
I mentioned, that I also create an unfinished Exporter:
https://gitlab.com/gecko.io/geckoannotations/-/tree/develop/org.gecko.artifact.p2.exporter?ref_type=heads
I've also chosen the approach of taking -runbundles but only for the complete repository. For the one that should only contain my bundles and no transient dependencies I used the -runrequire instruction:
https://gitlab.com/gecko.io/geckoannotations/-/blob/develop/org.gecko.artifact.p2.exporter/src/org/gecko/artifact/p2/exporter/P2Exporter.java?ref_type=heads
I experienced, that the P2 resolver tries to resolve all dependencies against the target platform repos.
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.
Using -runbundles
does not preclude using -runrequires
. The resolve operation sets the -runbundles
?
It is a pity that I did not know this code ... I could not found the org.gecko.artifact.p2.P2RepositoryCreator though and most of the work seems to happen there?
label=Java ©; \ | ||
description=The Java language | ||
|
||
In the a.bndrun file: |
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.
Do you also generate feature.xml out of these information?
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.
Yes.
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.
Note: We have a model for that:
https://gitlab.com/gecko.io/geckoannotations/-/tree/develop/org.gecko.artifact.model/model?ref_type=heads
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.
can you convert that to an XML schema? In the test I run the schema validator with this schema for common sense check.
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.
Note: This is how I created the metadata. (But I lacked of the rest of the exporter, because of to less bnd knowledge)
https://gitlab.com/gecko.io/geckoannotations/-/blob/develop/org.gecko.artifact.p2/src/org/gecko/artifact/p2/P2RepositoryCreator.java?ref_type=heads
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.
Hmm, lots of overlap. But mine works now :-) Do you think we can pick/learn anything from your work?
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
Signed-off-by: Peter Kriens <[email protected]>
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
--- Signed-off-by: Peter Kriens <[email protected]> Signed-off-by: Peter Kriens <[email protected]>
This is an attempt to provide an exporter for p2 repositories.