Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Targlets: How do I require everything found in the referenced repositories?
Targlets: How do I require everything found in the referenced repositories? [message #1761247] Tue, 09 May 2017 11:05 Go to next message
Peter-René Jeschke is currently offline Peter-René JeschkeFriend
Messages: 4
Registered: May 2017
Junior Member
I'm trying to set up our current workflow with Oomph. For every project, we have a .target file that contains the dependencies needed for this project. Because these are frequently outdated (due to updates of internal features), we often have to edit the target platform to include the latest version of our features. I hope to fix this with targlets.

My goal is to specify the repositories and require all features that are available. I tried the following XML:

<?xml version="1.0" encoding="UTF-8"?>
<setup.targlets:TargletTask
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:setup.targlets="http://www.eclipse.org/oomph/setup/targlets/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/targlets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupTarglets.ecore">
  <targlet name="MyTarglet"
      activeRepositoryList="Default">
    <requirement
        name="*"/>
    <repositoryList
        name="Default">
      <repository
          url="http://packagedrone.local/p2/Feature_one"/>
      <repository
          url="http://packagedrone.local/p2/Feature_two"/>
    </repositoryList>
  </targlet>
</setup.targlets:TargletTask>


I've seen the * requirement in the Oomph.setup so I expected it to work. But the installed target platform is empty! When I edit the target definition, the content tab stays empty. What did I miss? How can I fix this?

Another question: Will the targlets only include the latest version? We need to import outdated versions, too.

Thanks!
Re: Targlets: How do I require everything found in the referenced repositories? [message #1761250 is a reply to message #1761247] Tue, 09 May 2017 11:14 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 189
Registered: September 2015
Senior Member
As far as I know, the * requirement only works in combination with Source Locators, see https://git.eclipse.org/c/diffmerge/org.eclipse.emf.diffmerge.patch.git/tree/releng/org.eclipse.emf.diffmerge.patch.setup/Modelpatch.setup#n139 :

<requirement
          name="*"/>
<sourceLocator
          rootFolder="${git.clone.edm.patch.location}"
          locateNestedProjects="true"/>


Note that including a source locator and a list of repositories will make the Targlet task import the projects using the source locator AND ensure that all their dependencies are resolved from the list of repositories.

This way, when your projects get added dependencies, you can simply Perform Setup Tasks and those will be added to the Modular Target.
Re: Targlets: How do I require everything found in the referenced repositories? [message #1761348 is a reply to message #1761250] Wed, 10 May 2017 06:27 Go to previous messageGo to next message
Peter-René Jeschke is currently offline Peter-René JeschkeFriend
Messages: 4
Registered: May 2017
Junior Member
This works, but can't I force the targlet to import all features? Currently, I can't add a feature (from a repository) to a project if my projects didn't depend on it previously because the target platform doesn't include the feature.
Re: Targlets: How do I require everything found in the referenced repositories? [message #1761436 is a reply to message #1761348] Thu, 11 May 2017 06:59 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29545
Registered: July 2009
Senior Member
The use case for including all features in an update site seems to me much more questionable than the use case for requiring all things in git repository. There are very few update sites I can think of where including everything in the update site in the target platform makes significant sense. A site either contains way too many things (e.g., a release train repository), or it contains a small number of root features (e.g., an SDK or an "all" feature), in which case you can include that. With the repository explorer you can easily inspect any update site and drag and drop requirements into targlets. Doing this unselectively seems not generally useful to me.
Previous Topic:Use git repository path for working set
Next Topic:Oomph Update Site broken?
Goto Forum:
  


Current Time: Sat Sep 22 18:36:04 GMT 2018

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

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

Back to the top