Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Oomph generated target vs tycho(Target file is not able to be handled by tycho)
Oomph generated target vs tycho [message #1819713] Tue, 21 January 2020 20:13 Go to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
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 #1820521 is a reply to message #1819713] Wed, 22 January 2020 06:16 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6600
Registered: July 2009
Senior Member
When I compare your Blockdiagram targlet with Oomph's own targlet I see that your targlet is specified with "Include All Requirements = false". Have you tried setting this property to true?

Re: Oomph generated target vs tycho [message #1820524 is a reply to message #1820521] Wed, 22 January 2020 06:56 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
This issue might also be similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=559236 which I've not had time to investigate yet.

If your problem persists, please provide enough details in a Bugzilla that we will be able to reproduce the problem.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820529 is a reply to message #1820524] Wed, 22 January 2020 09:16 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Good morning Ed, Eike

Many thanks for your quick reply.

I tried with your suggestion and setup a complete new eclipse with oomph with setup file containing now Include All Requirements = true.

The maven error remains. Still not finding dependencies although the p2 build within eclipse is running without any error.

I read the bugzilla Ed was refering to and it seems that I have the same error.
Should I extend this bugzilla report or create a new one?


In any case: Many thanks for help!

Best regards
Re: Oomph generated target vs tycho [message #1820533 is a reply to message #1820529] Wed, 22 January 2020 10:19 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
In the meantime I had some minutes to write something down and attached the observed behaviour to the bug mentioned above.
I hope this was ok?!

Best regards and thanks in advance

Sebastian
Re: Oomph generated target vs tycho [message #1820658 is a reply to message #1819713] Sat, 25 January 2020 09:49 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Good morning

If I understand Ed right the bug Mas reported is a different case to the stuff I wrote.
I there anything new to the question I asked?

I feel now like I have kind of taken over the discussion in the bug report.
Should it be placed somewhere else?

Re: Oomph generated target vs tycho [message #1820678 is a reply to message #1820658] Sun, 26 January 2020 06:50 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
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...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820679 is a reply to message #1820678] Sun, 26 January 2020 07:16 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
Unfortunately I get a login prompt for cloning https://tesat-gitlab.factorplus.de/tesat-projects/Blockdiagram.git so I can't test your setup.

Another thing you could try is to add the following to the TargetDefinitionGenerator annotation
<?xml version="1.0" encoding="UTF-8"?>
<base:StringToStringMapEntry
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:base="http://www.eclipse.org/oomph/base/1.0"
    key="generateImplicitUnits">
  <value>true</value>
</base:StringToStringMapEntry>
This way the generated *.target file will not minimize the IUs so it will explicitly list the resolve IUs which ought to force Tycho to resolve them directly if for whatever mysterious reason it's not properly following the dependencies (which might be related to your use of "ignore").



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820684 is a reply to message #1820679] Sun, 26 January 2020 11:38 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Good morning Ed

Although its sunday and I'm at home I want to thank you for your try.

I will ask if I am allowed to give you a user account on this project (it contains not really "secret" stuff yet, but it is not my decision).
Otherwise I hope I will find time tomorrow to make a minimum example showing the same error.
With just an eclipse 4 default example requiring the same stuff as the plugins I wrote in Blockdiagram.

I will also try the hint you gave above tomorrow.

In the meantime: Many thanks so far!



Re: Oomph generated target vs tycho [message #1820697 is a reply to message #1820684] Mon, 27 January 2020 08:10 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Good Morrning Ed

In the meantime I have a response from the project lead and unfortunately I am not allowed to give public access to the blockdiagram project.

What I will try to do within the next days is to create a minimum example that also shows the tycho dependency problem.

I will give an update if I have the minimux example. Maybe this is even the better way to focus on the problem.



Re: Oomph generated target vs tycho [message #1820703 is a reply to message #1820697] Mon, 27 January 2020 10:14 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Hello Ed

I did some tests now and a minimum example.
First of all:
Setting
includeMode -> slicer : did not change anything to the missing dependency in tycho.
generateImplicitUnits -> true: this changes "something". Now pde build is still running fine, but tycho now complains about open jfx linux-64 and it's platformfilter not applied (Linux I don't want to build at the moment, therefore the environment descriptions in the pom only containing Windows environment).

I set up now kind of a minimum example. It is not containing Tesats own code (which I am not allowed to publish unfortunately) but is showing the same error.
It is available via the public repository:
https://tesat-gitlab.factorplus.de/heinrichs/oomph-tycho.git

The setup file is now contained within the repo:
https://tesat-gitlab.factorplus.de/heinrichs/oomph-tycho/raw/master/oomph.setup/Blockdiagram.setup

Btw.: I am quite new to configuring project setup files in oomph.
Is there somewehere a documentation what String to String Map entries are available, which values they can take and what impact these will have on generated target. I know e.g. the difference between slicer and planner is more like a p2 repository topic but it would be good to have an overview what is possible.

Re: Oomph generated target vs tycho [message #1820723 is a reply to message #1820703] Mon, 27 January 2020 18:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
If I run a Tycho build directly as generated, it fails like this:
[INFO] Resolving dependencies of MavenProject: de.tesat.blockdiagram:de.tesat.blockdiagram.application:1.0.0-SNAPSHOT @ D:\user-home-test\blockdiagram-master2\git\oomph-tycho\de.tesat.blockdiagram.application\.polyglot..META-INF_MANIFEST.MF
[INFO] {osgi.os=win32, osgi.ws=win32, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: de.tesat.blockdiagram.application 1.0.0.qualifier
[ERROR]   Missing requirement: de.tesat.blockdiagram.application 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.gef.fx 5.0.1' but it could not be found
If I change the *.target to specify planner, it fails like this:
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: de.tesat.blockdiagram.product 1.0.0.qualifier
[ERROR]   Missing requirement: de.tesat.blockdiagram.feature.feature.group 1.0.0.qualifier requires 'org.eclipse.equinox.p2.iu; de.tesat.blockdiagram.util 1.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: de.tesat.blockdiagram.product 1.0.0.qualifier depends on: org.eclipse.equinox.p2.iu; de.tesat.blockdiagram.feature.feature.group 0.0.0
But that is indeed missing from this simple example.

So it seems to me it does make a difference to specify planner versus slicer so you ought to remove that from your annotation (or specify planner explicitly).

As long as your example fails to resolve its own dependencies rather than ones from the target platform, there's not much else I can test.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820727 is a reply to message #1820723] Mon, 27 January 2020 20:24 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Hello Ed

The minimum example is based on (stating the obvious) blockdiagram application.
In plugin de.tesat.blockdiagram.feature (feature.xml) was a section <requires> with a lot of plugins that were not visible in the Included Plug-ins tab of feature editor.
I removed all dependencies from within Included plug-ins tab but didn't had a look into plain xml this morning.
Sorry for that.
I commited and pushed updated files.

Then I tried again to explicitly state includeMode -> planner
I don't nkow why the behaviour is now different to my first try (maybe I did a typo or something else wrong), but now tycho is complaining about missing javax.xml.
This is required by one of the features (3rd party feature) and is really missing in generated target.
Seems to be a next step I thought but then I had a look into the setup file again.
In setup file is stated below the features list several plugins which should be taken into the target platform.
Since I am quite new to setting up the stuff with oomph let me ask you two things:

1. is there kind of a documentation about what annotations can be given (I had a look and oomphs main website but was not able to find something ..)
2. Is is possible to do the single plugins (in addition to the features) like I did?

Many thanks for help, although the last posts were a little bit messed up by myself.


Re: Oomph generated target vs tycho [message #1820735 is a reply to message #1820727] Tue, 28 January 2020 07:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
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.)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820741 is a reply to message #1820735] Tue, 28 January 2020 09:16 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Good Morning Ed

Many thanks for help!
I will definitely try with nightly build!

The site (https://wiki.eclipse.org/Eclipse_Oomph_Authoring) mentioned in the bugreport (https://bugs.eclipse.org/bugs/show_bug.cgi?id=469654) was already known to me. But does unfortunately not tell the details about setting e.g. slicer/planner.
This was the reason why I was asking. But I had a rough look at the source code you mentioned and there are at least the details listed. I will definitely have a closer look the next days :-)

I will give feedback if the tests with full blockdiagram and nightly build were running.


Re: Oomph generated target vs tycho [message #1820744 is a reply to message #1820741] Tue, 28 January 2020 09:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 32109
Registered: July 2009
Senior Member
Yes, it's also hard to find documentation about some of these PDE details. As I understand it, I think slicer mode is only useful if you explicitly list all IUs. With planner mode, the dependencies of the IUs that are specified are resolved transitively so the list of what you need to specify is much shorter.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Oomph generated target vs tycho [message #1820754 is a reply to message #1820744] Tue, 28 January 2020 11:48 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6600
Registered: July 2009
Senior Member
I just ran a few tests to fresh up my understanding of the provisioning modes (planner vs. slicer). It appears that the slicer includes everything in the TP that's explicitely listed as root requirements PLUS all transitive feature CONTENTS (i.e., possibly specified dependencies NOT). Normal dependencies (e.g., bundle/package requirements) are NOT taken into account. So I think it's a bit like unzipping feature zips into the TP.

Re: Oomph generated target vs tycho [message #1820765 is a reply to message #1820744] Tue, 28 January 2020 13:35 Go to previous message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Hello Ed

In the meantime I transferd the changed stuff to blockdiagram application and used the nightly build to test.
It runs quite perfect now.
Tycho build is running and produces a product that starts without errors.
Many thanks for your help, it was really awsome.

For all the guys who reads this later: I found a useful blog and the creator of it explains well the difference between slicer and planner: http://eclipse-debug.blogspot.com/2010/09/how-p2-based-targets-work.html

Previous Topic:Finding out why oomph takes an action
Next Topic:Eclipse IDE for Java Developers Mars.2 Release 4.5.2
Goto Forum:
  


Current Time: Wed Dec 01 02:45:31 GMT 2021

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

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

Back to the top