Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse JustJ » JustJ requires org.eclipse.equinox.p2.iu?(How to solve this dependency?)
JustJ requires org.eclipse.equinox.p2.iu? [message #1828844] Fri, 19 June 2020 18:41 Go to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 24
Registered: April 2018
Location: Berlin
Junior Member

Hi Ed,
I have an Eclipse RCP application and I thought, I would give JustJ a shot - instead of telling my users to install AdoptJDK11 manually.

I followed your docs at https://www.eclipse.org/justj/?page=documentation and

- added the feature in my product file:
...
  <features>
      <feature id="ch.hilbri.blackant.releng.feature" version="2.1.0.qualifier"/>
      <feature id="org.eclipse.emf.ecore"/>
      <feature id="org.eclipse.emf.common"/>
      <feature id="org.eclipse.e4.rcp"/>
      <feature id="org.eclipse.justj.openjdk.hotspot.jre.full" installMode="root"/> 
   </features>
...


- added the update site to my targetplatform definition file (I am using tpd files):
...
location "https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest" {
	org.eclipse.justj.openjdk.hotspot.jre.full.feature.group		lazy
}
...


However, when I try to build my app with maven, it tries to locate equinox.p2.iu and I am not sure where to get that and how to add that to my config.

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: blackant 2.1.0
[ERROR]   Missing requirement: blackant 2.1.0 requires 'org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 0.0.0' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: blackant:ch.hilbri.blackant.releng.product:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.product/pom.xml: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.


Any thoughts or pointers?

I guess this is not strictly related to JustJ, but maybe other users will stumble upon the same issue ... and will probably be much more clever in solver it on their own ...
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1828845 is a reply to message #1828844] Fri, 19 June 2020 18:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Please have a look at this thread:

https://www.eclipse.org/lists/justj-dev/msg00003.html

I'm not sure how Tycho uses a *.tdp file. I assume Tycho can only can use a *.target file. Certainly the error message suggests that the repository itself is missing because org.eclipse.justj.openjdk.hotspot.jre.full.feature.group is definitely present in https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1828848 is a reply to message #1828845] Fri, 19 June 2020 20:54 Go to previous messageGo to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 24
Registered: April 2018
Location: Berlin
Junior Member

Hi Ed,
Thanks for the quick reply. I read through your exchange with Alois - and I feel a little bit lost as well ... using Google to find my way around ...

My target definition file is being built out of the tpd file and picked up by tycho. It contains the JustJ plugins:
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="ch.hilbri.blackant.releng.targetplatform" sequenceNumber="1592598176">
  <locations>
    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
      <unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.e4.rcp.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.platform.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.xtend.sdk.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.xtext.sdk.feature.group" version="0.0.0"/>
      <unit id="org.eclipse.emf.ecore.xcore.lib" version="0.0.0"/>
      <unit id="org.eclipse.emf.ecore.xmi" version="0.0.0"/>
      <unit id="org.junit" version="0.0.0"/>
      <repository location="http://download.eclipse.org/releases/2020-03"/>
    </location>
    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
      <unit id="org.apache.commons.io" version="0.0.0"/>
      <unit id="org.apache.commons.lang3" version="0.0.0"/>
      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository/"/>
    </location>
    <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
      <unit id="org.eclipse.justj.openjdk.hotspot.jre.full.feature.group" version="0.0.0"/>
      <repository location="https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest"/>
    </location>
  </locations>
</target>


In my parent pom file, I played with the resolveWithExecutionEnvironmentConstraints setting. If I use Tycho 1.6 and do not add the resolveWithExecutionEnvironmentConstraints setting to the parent pom, the build fails like this:
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/
[INFO] Adding repository http://download.eclipse.org/releases/2020-03
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-03/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/202003181000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest
[INFO] Fetching p2.index from https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/N202006111504/
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: a.jre.javase 11.0.0
[ERROR]   Software being installed: org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504
[ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; a.jre.javase 0.0.0
[ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full [14.0.1.v20200611-1504,14.0.1.v20200611-1504]
[ERROR] 
[ERROR] Failed to resolve target definition /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.targetplatform/ch.hilbri.blackant.releng.targetplatform.target: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.


If I use Tycho 1.6 and add this line to my parent pom:
<resolveWithExecutionEnvironmentConstraints>false</resolveWithExecutionEnvironmentConstraints>

the build continues significantly further before it fails here:
...
[INFO] --- tycho-p2-director-plugin:1.6.0:materialize-products (materialize-products) @ ch.hilbri.blackant.releng.product ---
[INFO] Installing product blackant for environment win32/win32/x86_64 to /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.product/target/products/blackant/win32/win32/x86_64
Installing blackant 2.1.0.
Installing org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504.
Installation failed.
Cannot complete the install because one or more required items could not be found.
	Software being installed: BlackAnt 2.1.0 (blackant 2.1.0)
	Missing requirement: toolingwin32.win32.x86_64org.eclipse.equinox.p2.reconciler.dropins 2.1.0 requires 'osgi.bundle; org.eclipse.equinox.p2.reconciler.dropins 1.3.300.v20191211-1631' but it could not be found
	Cannot satisfy dependency:
		From: BlackAnt 2.1.0 (blackant 2.1.0)
		To: org.eclipse.equinox.p2.iu; toolingblackant.configuration [2.1.0,2.1.0]
	Cannot satisfy dependency:
		From: toolingblackant.configuration 2.1.0
		To: org.eclipse.equinox.p2.iu; toolingwin32.win32.x86_64org.eclipse.equinox.p2.reconciler.dropins [2.1.0,2.1.0]
There were errors. See log file: /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng/workspace/.metadata/.log


When I switch to Tycho 1.7 while still having the resolveWithExecutionEnvironmentConstraints line in my pom, the build fails like this:
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/
[INFO] Adding repository http://download.eclipse.org/releases/2020-03
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-03/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/202003181000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest
[INFO] Fetching p2.index from https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/N202006111504/
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[ERROR] When using a custom execution environment profile, resolveWithExecutionEnvironmentConstraints must not be set to false -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException


If I disable the resolveWithExecutionEnvironmentConstraints line in my pom and continue to use Tycho 1.7, the build fails like this:
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/
[INFO] Adding repository http://download.eclipse.org/releases/2020-03
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-03/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-03/202003181000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200224183213/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200224183213/repository/
[INFO] Adding repository https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest
[INFO] Fetching p2.index from https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/N202006111504/
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: a.jre.javase 11.0.0
[ERROR]   Software being installed: org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504
[ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; a.jre.javase 0.0.0
[ERROR]   Cannot satisfy dependency: org.eclipse.justj.openjdk.hotspot.jre.full.feature.group 14.0.1.v20200611-1504 depends on: org.eclipse.equinox.p2.iu; org.eclipse.justj.openjdk.hotspot.jre.full [14.0.1.v20200611-1504,14.0.1.v20200611-1504]
[ERROR] 
[ERROR] Failed to resolve target definition /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.targetplatform/ch.hilbri.blackant.releng.targetplatform.target: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.


The log file for the last run contains the following:
!SESSION 2020-06-19 22:57:34.982 -----------------------------------------------
eclipse.buildId=unknown
java.version=13.0.2
java.vendor=N/A
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Framework arguments:  -eclipse.keyring /var/folders/q4/8lq6xbj56j991qsbyrt5h1km0000gn/T/tycho9701994024136580295secure_storage
Command-line arguments:  -eclipse.keyring /var/folders/q4/8lq6xbj56j991qsbyrt5h1km0000gn/T/tycho9701994024136580295secure_storage

!ENTRY org.eclipse.core.net 1 0 2020-06-19 22:57:34.982
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.equinox.p2.metadata.repository 4 0 2020-06-19 22:57:42.210
!MESSAGE Unexpected error loading extension: org.eclipse.equinox.p2.updatesite.metadataRepository
!STACK 0
java.lang.ClassCastException: class org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager cannot be cast to class org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager (org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @6003ad65; org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @2da99821)
	at org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository.setProperty(LocalMetadataRepository.java:301)
	at org.eclipse.equinox.p2.repository.spi.AbstractRepository.setProperty(AbstractRepository.java:194)
	at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.resetCache(UpdateSiteMetadataRepositoryFactory.java:84)
	at org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.load(UpdateSiteMetadataRepositoryFactory.java:63)
	at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:63)
	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:775)
	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:676)
	at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:110)
	at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:61)
	at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:53)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.loadRepository(TargetDefinitionResolver.java:288)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.<init>(TargetDefinitionResolver.java:282)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolver$ResolverRun.addLocation(TargetDefinitionResolver.java:154)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContentWithExceptions(TargetDefinitionResolver.java:121)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(TargetDefinitionResolver.java:94)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.resolveFromArguments(TargetDefinitionResolverService.java:70)
	at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.getTargetDefinitionContent(TargetDefinitionResolverService.java:60)
	at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.resolveTargetDefinitions(TargetPlatformFactoryImpl.java:214)
	at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:155)
	at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:128)
	at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
	at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:84)
	at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:226)
	at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:110)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:264)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)


Hmm ... the code base is in a public repository https://www.github.com/roberthilbrich/blackant, so you could have a look at the code/configuration, if you want.

Any pointers or ideas? And thank you for taking the time to look at this issue - I really appreciate that.

[Updated on: Fri, 19 June 2020 21:00]

Report message to a moderator

Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1828868 is a reply to message #1828848] Sat, 20 June 2020 14:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
Often these things feel like black magic. :-(

I thought it best that I reproduce exactly what you are seeing.

As with any project I work on, the first step is an Oomph setup for the project so that I never have to set it up manually ever again. There were a bunch of errors and warnings so I had to figure out how to get rid of those via further setup tasks. Then I noticed you're using EMF and Xcore, so that was interesting. There were some annoying warnings, so I figured out how to get rid of all warnings and all informational message.

Then I was able to reproduce the latest problem you showed. In the end though, this problem seems unrelated to the use of JustJ. Perhaps just more careful checking by Tycho 1.7. In any case, it needed fixing...

I'm not familiar with how one forks in order to contribute changes, so I have attached a zip of all the files I changed, including the BlackAnt.setup that I used. If you want to include that in your Git repository, I can add a link to it in Oomph's Github project catalog...

I'll briefly explain the changes and why

/ch.hilbri.blackant.libs.poi/.classpath

This project has no src folder so it has build path errors, so I removed it from the classpath.

/ch.hilbri.blackant.libs.poi/build.properties

Also remove the source... entry here.

/ch.hilbri.blackant.model/.settings/org.eclipse.jdt.core.prefs

Warn about unchecked casts because otherwise you get a whack of informational messages from the @Suppressed("unchecked") annotations.

/ch.hilbri.blackant.model/model/BlackAnt-Model.xcore

Use .length instead of .size so that code isn't generated that does an unchecked cast; this is probably why you turned off the warning.

/ch.hilbri.blackant.model/src-gen/ch/hilbri/blackant/model/impl/BlackAntModelImpl.java

This is a generated file that uses .length instead of .size().

/ch.hilbri.blackant.releng/BlackAnt.setup

The new Oomph setup for your project. If you rename it or put it on some other path, this task should be modified to also be of that path:
<?xml version="1.0" encoding="UTF-8"?>
<setup:EclipseIniTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    option="-Doomph.redirection.blackant.git"
    value="=https://raw.githubusercontent.com/roberthilbrich/blackant.git/master/ch.hilbri.blackant.releng/BlackAnt.setup->$git.clone.blackant|uri}/ch.hilbri.blackant.releng/BlackAnt.setup"
    vm="true">
  <description>Set an Oomph redirection system property to redirect the logical location of this setup to its physical location in the Git clone.</description>
</setup:EclipseIniTask>
This task ensures that once the Git clone is created the version of the setup in the clone is used rather than the committed version visible in the web view.

/ch.hilbri.blackant.releng/pom.xml

Enable <resolveWithExecutionEnvironmentConstraints>false</resolveWithExecutionEnvironmentConstraints> .

/ch.hilbri.blackant.releng.feature/.project

There were warnings about the org.eclipse.xtext.ui.shared.xtextNature nature and I don't think this needs/uses that nature.

/ch.hilbri.blackant.releng.product/ch.hilbri.blackant.product

The platform no longer needs/uses org.eclipse.equinox.ds but rather org.apache.felix.scr. You should also remove it from /ch.hilbri.blackant.releng.feature/feature.xml though I've not done that here. Also remove org.eclipse.equinox.p2.reconciler.dropins; I think this is the cause of your failure. The product does not include this bundle. You could include it if you need it but that's up to you. I don't see much p2 UI in your actual product...

/ch.hilbri.blackant.releng.targetplatform/.project

I also removed the nature here, but maybe you need it and maybe I see a warning only because I didn't install whatever support the *.tdp file. The *.setup should install whatever needs to be installed for editing a *.tdb; I have not done that yet, but it's easy to add a p2 task.

With these changes, the product builds, includes expect -vm option, and it launches. I don't know what it does. :-P
  • Attachment: blackant.zip
    (Size: 18.25KB, Downloaded 134 times)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1829129 is a reply to message #1828868] Thu, 25 June 2020 14:49 Go to previous messageGo to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 24
Registered: April 2018
Location: Berlin
Junior Member

Ed,
thank you very much for your elaborate feedback. I incorporated all your proposed changes, moved to Tyhco 1.7 and Eclipse 2020-06 and also adapted the BlackAnt.setup file for the tpd-file support to be used with the Eclipse Platform product. You are right, all warnings are gone and the product runs fine, when started from the Eclipse UI.

But when I do the headless build with maven, it still fails:

[robert:~] $ cd blackant-master 
[robert:~/blackant-master] $ cd git 
[robert:~/blackant-master/git] $ cd blackant/ch.hilbri.blackant.releng
[robert:...t/ch.hilbri.blackant.releng] $ mvn verify                                      
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/blackant-master/git/blackant/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/
[INFO] Adding repository http://download.eclipse.org/releases/2020-06
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-06/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/202006171000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200529191137/repository/
[INFO] Adding repository https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/latest
[INFO] Fetching p2.index from https://download.eclipse.org/justj/sandbox/jres/14/updates/nightly/N202006111504/
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/blackant-master/git/blackant/ch.hilbri.blackant.gui/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/blackant-master/git/blackant/ch.hilbri.blackant.gui/pom.xml
[ERROR] When using a custom execution environment profile, resolveWithExecutionEnvironmentConstraints must not be set to false -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
[robert:...t/ch.hilbri.blackant.releng] $                                                                               


Anything I can do?
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1829158 is a reply to message #1829129] Fri, 26 June 2020 06:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
That's very strange. I reused the setup to create a brand new clean development environment with exactly what's committed in your Git repository currently. Then I created an External Tools launch configuration with Location: D:\eclipse\apache-maven-3.6.3\bin\mvn.cmd Working Directory: ${project_loc:/ch.hilbri.blackant.releng} Arguments: clean verify and in the Environment tab, added JAVA_HOME C:\Program Files\Java\jdk-11.0.5 to run the build. I've attached the log of that build to demonstrate that it really does simply work for me.

The exception seems to come from this code:

https://github.com/eclipse/tycho/blob/master/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java#L101

But why do I not get that exception and you do? Somehow the profile must not exist in your case though I see nothing to indicate that you've specified a custom profile...

I even tried an older Maven version D:\eclipse\apache-maven-3.3.9 and that also worked. I tried an older version of Java (1.8), but the tests fail in that case (though the product does build in that case too).

All I can think that could be different between the two is the JAVA_HOME or the mvn version, but that doesn't really make sense to me either.

Looking at the Tycho code above, I think this must kick in:

https://github.com/eclipse/tycho/blob/master/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentConfigurationImpl.java#L88

So I ran mvn with -X and looked at the log (also attached), to see it contains this
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ D:\Users\merks\blackant-master2\git\blackant\ch.hilbri.blackant.gui\pom.xml
[DEBUG] Using execution environment 'JavaSE-11' configured in Bundle-RequiredExecutionEnvironment (first entry)
I think it will be necessary to compare what you see running with -X versus what I see in that case, BlackAntDebug.log.



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1829166 is a reply to message #1829158] Fri, 26 June 2020 09:17 Go to previous messageGo to next message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 24
Registered: April 2018
Location: Berlin
Junior Member

I debugged this further - it seems to be related to the installed jdks. Using openJDK 13.0.2+8_2 (installed via `brew install openjdk`) the build fails:

[robert:...t/ch.hilbri.blackant.releng] $ JAVA_HOME=/usr/local/Cellar/openjdk/13.0.2+8_2/ && mvn -v && mvn verify                                                                                                           
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 13.0.2, vendor: N/A, runtime: /usr/local/Cellar/openjdk/13.0.2+8_2/libexec/openjdk.jdk/Contents/Home
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.5", arch: "x86_64", family: "mac"
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/
[INFO] Adding repository http://download.eclipse.org/releases/2020-06
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-06/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/202006171000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200529191137/repository/
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: org.eclipse.equinox.sdk.feature.group 3.20.200.v20200528-0603
[ERROR]   Missing requirement: org.eclipse.equinox.app 1.4.500.v20200422-1833 requires 'osgi.ee; (&(osgi.ee=JavaSE)(version=1.7))' but it could not be found
[ERROR]   Cannot satisfy dependency: org.eclipse.equinox.compendium.sdk.feature.group 3.20.200.v20200511-1702 depends on: org.eclipse.equinox.p2.iu; org.eclipse.equinox.app [1.4.500.v20200422-1833,1.4.500.v20200422-1833]
[ERROR]   Cannot satisfy dependency: org.eclipse.equinox.sdk.feature.group 3.20.200.v20200528-0603 depends on: org.eclipse.equinox.p2.iu; org.eclipse.equinox.compendium.sdk.feature.group [3.20.200.v20200511-1702,3.20.200.v20200511-1702]
[ERROR] 
[ERROR] Failed to resolve target definition /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.targetplatform/ch.hilbri.blackant.releng.targetplatform.target: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

However, when I use the AdoptJDK 11 (manually downloaded the pkg), the build works fine:
[robert:...t/ch.hilbri.blackant.releng] $ JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home && mvn -v && mvn verify                                                                             
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /usr/local/Cellar/maven/3.6.3_1/libexec
Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.5", arch: "x86_64", family: "mac"
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/
[INFO] Adding repository http://download.eclipse.org/releases/2020-06
[INFO] Fetching p2.index from http://download.eclipse.org/technology/epp/packages/2020-06/
[INFO] Fetching p2.index from http://download.eclipse.org/releases/2020-06/202006171000/
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository/
[INFO] Adding repository https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository
[INFO] Fetching p2.index from https://download.eclipse.org/tools/orbit/downloads/drops2/R20200529191137/repository/
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.gui:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.releng.product:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.product/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.releng.product:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.product/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.releng.product:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.product/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.releng.feature:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.feature/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.releng.feature:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.feature/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.releng.feature:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.releng.feature/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.gui.tests:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui.tests/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.gui.tests:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui.tests/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.gui.tests:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.gui.tests/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.model:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.model:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.model:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.model.edit:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.edit/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.model.edit:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.edit/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.model.edit:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.edit/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.model.editor:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.editor/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.model.editor:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.editor/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.model.editor:2.1.0-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.model.editor/pom.xml
[INFO] Computing target platform for MavenProject: blackant:ch.hilbri.blackant.libs.poi:4.1.1-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.libs.poi/pom.xml
[INFO] Resolving dependencies of MavenProject: blackant:ch.hilbri.blackant.libs.poi:4.1.1-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.libs.poi/pom.xml
[INFO] Resolving class path of MavenProject: blackant:ch.hilbri.blackant.libs.poi:4.1.1-SNAPSHOT @ /Users/robert/Git-Repositories/BlackAnt/ch.hilbri.blackant.libs.poi/pom.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
...

Can you think of anything that is missing in the brew version of openJDK, so that maven fails to recognize the execution environment?
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1829172 is a reply to message #1829166] Fri, 26 June 2020 09:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
I really don't know the internal workings of Tycho well enough, i.e., I know pretty much nothing about the internal implementation details of Tycho, to be able to answer that.

I expect it has something to do with the system properties defined by the JRE and that one or more of them is not in the form expected by Tycho/Maven. Perhaps a dump of System.getProperties() for both JDKs might shed light on ones that look odd.

It's probably better to ask on the Tycho user mailing list...

Were you otherwise able to complete a build of the product?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: JustJ requires org.eclipse.equinox.p2.iu? [message #1829182 is a reply to message #1829172] Fri, 26 June 2020 13:13 Go to previous message
Robert Hilbrich is currently offline Robert HilbrichFriend
Messages: 24
Registered: April 2018
Location: Berlin
Junior Member

Yes, it works now perfectly. The path to the jre is also added to the ini-file.
[robert:...blackant/win32/win32/x86_64] $ cat BlackAnt.ini                                                                                                                                                                
-startup
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1200.v20200508-1552
-clearPersistedState
-vm
plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_14.0.1.v20200611-1504/jre/bin

Thank you for your support in making this possible and adding the notes to https://www.eclipse.org/justj/?page=documentation about the additional settings for tycho.
Previous Topic:JustJ Documentation is Available
Next Topic: javax.activation and javax.xml.bind ??
Goto Forum:
  


Current Time: Mon Dec 30 17:11:38 GMT 2024

Powered by FUDForum. Page generated in 0.05062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top