eclipse plugin - How to enable/install the "compatibility layer" in Maven Tycho Surefire so that Platform.getPlugin() works -


i have test failure due illegalstateexception platform.getplugin("...") calls @deprecated org.eclipse.core.runtime.platform.getpluginregistry() "only works if compatibility layer installed , must not used otherwise."

this test works in-workspace during development, fails (reproducible) when ran maven tycho surefire. gathered has org.eclipse.core.runtime.compatibility, have attempted in pom.xml:

<plugin>     <groupid>org.eclipse.tycho</groupid>     <artifactid>tycho-surefire-plugin</artifactid>     <version>${tycho-version}</version>     <configuration>         ...              <dependencies>             <dependency>                 <type>p2-installable-unit</type>                 <artifactid>org.eclipse.core.runtime.compatibility</artifactid>             </dependency>         </dependencies>         <bundlestartlevel>             <bundle>                 <id>org.eclipse.core.runtime.compatibility</id>                 <level>4</level>                 <autostart>true</autostart>             </bundle>         </bundlestartlevel>     </configuration> 

unfortunately (above) still not work - doing wrong?

as alternative answer fix this, guess try adapt line in test use api deprecated platform.getplugin() - how obtain org.eclipse.core.runtime.plugin given id without using deprecated apis requiring compatibility layer causing me issues here?

actually platform.getbundle() instead of platform.getplugin() did trick.

also, in case else ever hits this, dependency configuration work - lead unrelated illegalstateexception in specific test case, caused me confusion.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -