-
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
tycho-p2-director-plugin / director: Cannot invoke "org.osgi.framework.BundleContext.getProperty(String)" because the return value of "org.eclipse.equinox.internal.p2.engine.EngineActivator.getContext()" is null #3437
Comments
Can you provide an integration-test to demonstrate the issue in more context? |
By the way here is where the mojo is used as part of the test: |
Here's a minimal <project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>foo</groupId>
<artifactId>bar</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>4.0.5</version>
<executions>
<execution>
<id>run-director</id>
<goals>
<goal>director</goal>
</goals>
<phase>package</phase>
<configuration>
<repositories>a</repositories>
<installIUs>b</installIUs>
<destination>c</destination>
<profile>d</profile>
<installFeatures>true</installFeatures>
<roaming>true</roaming>
<p2os>win32</p2os>
<p2ws>win32</p2ws>
<p2arch>x86_64</p2arch>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> And this is the result:
|
@sratz can you try if adding the |
okay the problem is that |
Even worse Actually all phases do so and as these "constants" are not constant but compile time changeable the compiler need to instantiate the class and can't inline it :-\ |
@sratz I now used your example for a first attempt to create a PR here, of course this would probably always fail so testcase needs to be enhanced together with the fix: |
See eclipse-equinox/p2#439 Fix #3437 (cherry picked from commit 87563c6)
See eclipse-equinox/p2#439 Fix #3437 (cherry picked from commit 87563c6)
You can try out the current tycho snapshot build if it fixes the issue for you! |
It's working fine with the new snapshot. Thank you! |
I am trying to use the new
director
mojo oftycho-p2-director-plugin
that was backported to 4.0.5 in #3411, but this runs into the following exception:My plugin config looks like this:
In
5b0707d#diff-75e34d80e724a1b1c5162508b06dfb539324b39bf97c008a0f8c43d5a86b2873R40
there was a change from
EngineActivator.getContext().getProperty()
toSystem.getProperty()
in the copiedfromp2 code, seemingly for a similar reason, but there appears to be still code assuming to be running in an OSGI context.Am I missing something here?
The text was updated successfully, but these errors were encountered: