-
Notifications
You must be signed in to change notification settings - Fork 116
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 564868 - Support Maven Artifacts in PDE-Target Platform #21
Conversation
Signed-off-by: Christoph Läubrich <[email protected]>
That's great progress! How can one control from the .target file which Maven repositories are accessible? |
I tried to use the m2e settings so whats configure there should be used here. As the target file itself does not (necessarily) have any maven context the support might be rather basic and only use global configured repositories. My plan is to enhance the PDE support in such a way that more is possible later (notably inherit p2 repositories defined in pom files) and the it might be possible to inherit from the parent project some data. The only thing I can think of right now would be to use the name of the target or the name of the project where the target is located in. Both suffer a bit IMO as the can contain any characters and do not necessary form a good BSN prefix. |
Any idea why FileCompletionTest fails? |
Signed-off-by: Christoph Läubrich <[email protected]>
No need to worry about FileCompletionTests, they started failing with an upgrade to newer WTP. |
Signed-off-by: Christoph Läubrich <[email protected]>
@mickaelistria as the contribution is larger than 1k LOC it seems a review from the IP team is required, can you schedule one for this PR? |
Wouldn't it be better if instead of 1 root entry per Maven artifact, it would be 1 root entry "Maven artifacts" with multiple possible artifacts and repository children elements?
Maybe |
The problem with one root is that it either limits you to "one must fit all" or a very complex configuration wizard/serialization format. Another point is, that if each entry is just one dependency it nicely maps to the section of a regular pom so it is easy to integrate this kind of location e.g. with tycho without the need to support additional configuration that might interfere. |
Signed-off-by: Christoph Läubrich <[email protected]>
Signed-off-by: Christoph Läubrich <[email protected]>
Signed-off-by: Christoph Läubrich <[email protected]>
Signed-off-by: Christoph Läubrich <[email protected]>
👍
The issue is that the .target and the m2e configuration are totally not correlated: several Maven projects can use the same target, but have different Maven repos available, so that would result in different resolution according to the context; while PDE target platform is a singleton shared by all bundles in the workspace without contextual project-specific settings considered.
Because of the above, I think it should currently be the only supported source to resolve artifacts, ignoring project specific settings. |
I think that's the real issue I'd like to address hopefully in the future but changing PDE here might take some time ... my vision would be that m2e understands tycho (+pomless) maven builds and adds a project specific target configuration to the project as it is done with the ME2 Container.
Yep at the moment only global maven settings are taken into account, at least if I understand the m2e code correctly (I'm using MavenPlugin.getMaven().getArtifactRepositories() here). Of course this feature can be enhanced later on, but for now I don't want to add to much extra features here without additional support from PDE/Tycho. |
I think we can merge it now, but I prefer nitpicking before the merge:
|
I fact m2e is supplying this to pde as a plugin, maybe just throw away the whole 'by' part and simply use 'wrapped.<...>' I'll try to adjust the wizard as well. WDYT about the possible IP issue? eclipsefdn/eca check suggest an extra review for contributions > 1k LOCs |
Signed-off-by: Christoph Läubrich <[email protected]>
Since this .target resolution is only devtime and is not very likely to leak its artifacts into the wild (they'll remain in user development area), it's OK to stick to wrapped.<...> |
This adds support for maven artifacts as PDE target platform items. I'm not sure how I made acomplete build and test this inside eclipse, but starting from inside eclipse works as expected (due to a bug in PDE one needs to mark the ui bundle as autostart).
The following features are included:
Add a plain bundle artifact from maven
Add a bundle artifact from maven including its dependencies
There are three choices
get an error when any item is not already a bundle
ignore artifacts with missing bundle-data
missing artifacts will then of course not be part of the target
add missing meta-data automatically
plain jar will be displayed with a jar symbol and bundles with a plugin symbol when "show location content" is selected.