Skip to content
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 is not supporting the effective directive properly #473

Open
laeubi opened this issue Feb 20, 2024 · 5 comments
Open

P2 is not supporting the effective directive properly #473

laeubi opened this issue Feb 20, 2024 · 5 comments

Comments

@laeubi
Copy link
Member

laeubi commented Feb 20, 2024

See this comment here:

Currently P2 generates for example when using this manifest headers:

Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.compo
 nent)(version>=1.3.0)(!(version>=2.0.0)))",osgi.service;filter:="(obj
 ectClass=org.bndtools.headless.build.manager.api.HeadlessBuildPlugin)
 ";effective:=active;cardinality:=multiple,osgi.ee;filter:="(&(osgi.ee
 =JavaSE)(version=17))"

the following requirement:
<requiredProperties namespace='osgi.service' match='(objectClass=org.bndtools.headless.build.manager.api.HeadlessBuildPlugin)' min='0'/>

this has some drawbacks so one can't choose for the effectiveness in a P2 resolve operation should apply or not.

I therefore would suggest that we transform this into something like filter="(osgi.effective.active=true)" so one can choose in the resolve context if such a requirement is to be considered or not.

@chaitanyavalli-r
Copy link

Do we have a fix for this? or any workaround to apply? We are also having the same constraint and the maven builds are failing. Please advise.

@laeubi
Copy link
Member Author

laeubi commented Jul 10, 2024

I fear now one has worked on this until now, so the only option is to provide that dependency.

@microwan
Copy link

Same issue s [ERROR] Missing requirement: org.bndtools.headless.build.manager 7.0.0.202310060912 requires 'osgi.service; (objectClass=org.bndtools.headless.build.manager.api.HeadlessBuildPlugin)' but it could not be found
[ERROR] Cannot satisfy dependency: com.st.stellar.ui.templates 1.1.0.qualifier depends on: osgi.bundle; org.eclipse.pde.ui 0.0.0
[ERROR] Cannot satisfy dependency: org.eclipse.pde.bnd.ui 1.1.100.v20240806-2133 depends on: java.package; org.bndtools.headless.build.manager.api [1.1.0,2.0.0)
[ERROR] Cannot satisfy dependency: org.eclipse.pde.ui 3.15.300.v20240815-2201 depends on: osgi.bundle; org.eclipse.pde.bnd.ui 1.0.0: See log for details

@merks
Copy link
Contributor

merks commented Sep 30, 2024

It's really hard to find the providers of these service registrations, but the do exist. These are all in the platform's target platform:

https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/c710615497e299557f76e4102fcfeaca26644e38/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L571-L658

We don't know how you've defined your target platform. Try adding this:

https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/c710615497e299557f76e4102fcfeaca26644e38/eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target#L621-L626

You can also get them from here:

image

@microwan
Copy link

You are right
i am on the target platform 2024-09 (eclipse official update site)

Build is OK in updating pom as below
<dependencies> <dependency> <groupId>org.bndtools</groupId> <artifactId>org.bndtools.versioncontrol.ignores.plugin.git</artifactId> <version>7.0.0</version> <scope>compile</scope> <optional>false</optional> </dependency> <dependency> <groupId>org.bndtools</groupId> <artifactId>org.bndtools.headless.build.plugin.gradle</artifactId> <version>7.0.0</version> <scope>compile</scope> <optional>false</optional> </dependency> </dependencies>

I am trying to update with your update site
Thank you for your support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants