Oomph generated target vs tycho [message #1819713] |
Tue, 21 January 2020 15:13  |
Eclipse User |
|
|
|
Hello together
I have an eclipse application using gef (version 5) for which I had a target platform that was running fine with maven/tycho to build artifact.
Now I want to write an oomph project file to setup the development environment for this project.
I have tried to setup the modular target section by just "copying" the stuff from original target file to the modular target but if I then try to run maven tycho complains of missing dependencies. Of course I adaptet my pom.xml files for new target name.
The weird point at this is that I have another project at which this setup is running fine (although this one is still eclipse 3 framework). This project was configured by a colleague and I thought it's a good start to learn from. :-) So this is my first time doeing an oomph setup.
I attached root pom.xml, target pom ( I tried with tycho 1.2.0 for which this pom is and with tycho 1.5.1. that, if I am informed correct doesn't need an explicit pom.xml for targets anymor (I can live with default values I think) and the setup file.
Also attached is the working target file and the generated target.
Maybe someone with more experience can help me?
I hope I gave you all necessary information. If something is missing just tell me.
Also I hope the naming of the files is not confusing. I tried to rename the poms to give you a hint were they are located ...
Many thanks in advance!
Best regards
Sebastian
|
|
|
|
|
|
|
|
Re: Oomph generated target vs tycho [message #1820678 is a reply to message #1820658] |
Sun, 26 January 2020 01:50   |
Eclipse User |
|
|
|
Yes, the problem was different and is resolved.
In your case, the *.target itself appears to be correct and from looking at the IU dependencies, it involves features including/requirement other features, which transitively do include the plugin that fails to resolve with Tycho but succeeds in resolving when activating the *.target with PDE in the IDE. I didn't see anything odd about the requirement dependency chain that would explain why Tycho doesn't follow it and resolve the plugin while p2/PDE does. There were issues such as using planner versus slicer, but I believe you've tried using planner instead of slicer (as was in your attachment), and you said that also failed. I asked about the use of <optionalDependencies>ignore</optionalDependencies> in your case.
To actually help with your problem, I really need to be able to reproduce it locally, including being able to execute the Maven/Tycho build step.
I notice now that https://tesat-gitlab.factorplus.de/setup/oomph-blockdiagram/raw/master/oomph.setup/Blockdiagram.setup is public, so I will give it a try...
|
|
|
|
|
|
|
|
|
Re: Oomph generated target vs tycho [message #1820735 is a reply to message #1820727] |
Tue, 28 January 2020 02:55   |
Eclipse User |
|
|
|
I pulled the changes and could reproduce the problem with javax.xml being missing. So I debugged that and indeed the problem was very similar to the other related bug. The details are captured here and a fix is committed:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=559236#c11
This got the Tycho build running farther, but then it failed resolving the product's dependencies because org.eclipse.equinox.executable.feature.group is missing. That's not so surprising because this dependency is not needed at development time, but it's definitely needed to build the executable(s) of the product. I could fix that by adding this requirement to the targlet:<?xml version="1.0" encoding="UTF-8"?>
<p2:Requirement
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:p2="http://www.eclipse.org/oomph/p2/1.0"
name="org.eclipse.equinox.executable.feature.group"
versionRange="[3.8.400,4.0.0]"/>
I chose this range so that the newest version (from 2019) is resolved and generated into the *.target.
I've kicked off a nightly build, so if you get the nightly installer from here you can test with these changes:
https://wiki.eclipse.org/Eclipse_Installer
http://www.eclipse.org/downloads/download.php?file=/oomph/products/latest/eclipse-inst-win64.exe
This bug is open for providing better documentation about the target generator:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469654
At this point, only looking at the source code will help with all the possible details:
https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/plugins/org.eclipse.oomph.targlets.core/src/org/eclipse/oomph/targlets/internal/core/listeners/TargetDefinitionGenerator.java
And yes, the requirements in a targlet are very general and can even be used to specify package requirements. In general one does not actually specify requirements on bundles or features. Rather everything in a p2 repository is an installable unit and each unit has provided capabilities; most capabilities are IRequiredCapability with a namespace, name, and version. Requirements are specified to require some provided capability. So you'll see your requirements are using namespace org.eclipse.equinox.p2.iu and each feature and bundle provides such a capability. By convention, a feature's IU's name ends with .feature.group. So you already have requiremments that resolve to bundles: <requirement
name="com.google.inject"
versionRange="[3.0.0,3.1.0)"/> (namespace="org.eclipse.equinox.p2.iu" is the default value for a Requirement.)
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05799 seconds