Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » TargetDefinitionGenerator usage(How to generate a correct target definition?)
TargetDefinitionGenerator usage [message #1444760] Tue, 14 October 2014 14:12 Go to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
I have managed to get the TargetDefiitionGenerator to work, in that by adding the annotation to the Targlet task, it generates a .target file upon performing it.

<annotation
       source="http:/www.eclipse.org/oomph/targlets/TargetDefinitionGenerator">
        <detail key="location"><value>${git.clone.location/releng/mytarget.target}</value></detail>
        <detail key="includeAllPlatforms"><value>false</value></detail>
        <detail key="includeSource"><value>false</value></detail>
        <detail key="generateVersions"><value>true</value></detail>
      </annotation>


1. I found that the File _must_ exist, otherwise the generation fails (although gracefully, a status is added to the Error log). Bug or feature?

2. I added "generateVersions" since the target is stupid, and without this, Tycho fails to find the correct versions.

3. The generated target only contains requirements from the Targlet where the annotation is added. This is understandable, however, I wanted to have two Targlets, as I saw in other setups in the catalog. However, this means that the generated target will not contain the required features from the other Targlets.

4. Simply adding the same repositories to the Targlet (without adding additional dependencies) seems to work.

5. Note that there may be some requirements that are not needed in the Targlet directly, but are needed in the .target for correct building (e.g. xbase.lib), I circumvented this by adding xtext.sdk requirement directly.

In the end, I managed to solve all my issues, another victory for Oomph Smile
Re: TargetDefinitionGenerator usage [message #1444764 is a reply to message #1444760] Tue, 14 October 2014 14:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Abel,

Comments below.

On 14/10/2014 4:12 PM, Abel Hegedus wrote:
> I have managed to get the TargetDefiitionGenerator to work, in that by
> adding the annotation to the Targlet task, it generates a .target file
> upon performing it.
>
>
> <annotation
> source="http:/www.eclipse.org/oomph/targlets/TargetDefinitionGenerator">
> <detail
> key="location"><value>${git.clone.location/releng/mytarget.target}</value></detail>
> <detail key="includeAllPlatforms"><value>false</value></detail>
> <detail key="includeSource"><value>false</value></detail>
> <detail key="generateVersions"><value>true</value></detail>
> </annotation>
>
>
> 1. I found that the File _must_ exist, otherwise the generation fails
> (although gracefully, a status is added to the Error log). Bug or
> feature?
I think it's a bug that we of course don't notice once it exists...
Please open bugzilla.
>
> 2. I added "generateVersions" since the target is stupid, and without
> this, Tycho fails to find the correct versions.
Yes, we generate one for Oomph purely for our Tycho builds.
>
> 3. The generated target only contains requirements from the Targlet
> where the annotation is added. This is understandable, however, I
> wanted to have two Targlets, as I saw in other setups in the catalog.
> However, this means that the generated target will not contain the
> required features from the other Targlets.
Targlets are composed into a single target definition. In fact we have
a bit of a problem that the generated TP contains things we don't want
from the extra projects materialized by the other targlets...
>
> 4. Simply adding the same repositories to the Targlet (without adding
> additional dependencies) seems to work.
I'm not sure I completely understand the setup involved.
>
> 5. Note that there may be some requirements that are not needed in the
> Targlet directly, but are needed in the .target for correct building
> (e.g. xbase.lib), I circumvented this by adding xtext.sdk requirement
> directly.
Yes, we often want extra things so that they'll be available in the
launched IDE, even if not directly required by the projects in the
workspace...
>
> In the end, I managed to solve all my issues, another victory for
> Oomph :)
Cool. :-)


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: TargetDefinitionGenerator usage [message #1444772 is a reply to message #1444764] Tue, 14 October 2014 14:32 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Thanks, Ed!

Quote:
I think it's a bug that we of course don't notice once it exists...
Please open bugzilla.


I have opened an issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=447112

Quote:
> 4. Simply adding the same repositories to the Targlet (without adding additional dependencies) seems to work.
I'm not sure I completely understand the setup involved.


If I add repository R from Targlet A to the repository list of Targlet B, and requirements in B depend on features in R, then those requirements will be generated into the .target. However, if R is not added to B, the same requirement is not in the generated into the .target.
Re: TargetDefinitionGenerator usage [message #1444773 is a reply to message #1444772] Tue, 14 October 2014 14:34 Go to previous message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 197
Registered: September 2015
Senior Member
Additional note: the setup in question is:
http://git.eclipse.org/c/viatra2/org.eclipse.viatra2.emf.git/diff/setup/org.eclipse.viatra.setup/VIATRAEMF.setup?id=8a786c0ba8ab57061cfd23a98a07c472444582f6

(I'm including the commit in the link for future reference, since I expect the setup will change over time)

I would be happy to hear any useful comments for improving this setup.
Previous Topic:Cloning git , importing and connecting to egit
Next Topic:"Do you trust these certificates"-Dialog does not popup during install
Goto Forum:
  


Current Time: Wed Apr 24 16:58:39 GMT 2024

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

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

Back to the top