Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Converting a target definition file to targlets results in an artificial_root node error
Converting a target definition file to targlets results in an artificial_root node error [message #1818061] Wed, 04 December 2019 23:00 Go to next message
Lars Vogel - out of office until 16.03.2020 is currently offline Lars Vogel - out of office until 16.03.2020Friend
Messages: 1094
Registered: July 2009
Senior Member

Hi,

I'm trying to convert a target definition file to a targlet. For the setup I followed https://wiki.eclipse.org/Oomph_Targlets

AFAICS the repository browser does not allow to search for ID, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=553786 so I might have done something wrong.

Here is my target definition file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="com.vogella.rcp">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
<repository location="http://download.eclipse.org/releases/latest"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20190226160451/repository"/>
<unit id="com.google.gson" version="0.0.0"/>
</location>
</locations>
</target>

And I think this should be the targlet file containing the same:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="com.vogella.rcp.targettarglets">
<locations>
<location xmlns:targlets="http://www.eclipse.org/oomph/targlets/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Default" type="Targlet">

<targlet includeAllPlatforms="true" name="Eclipse RCP" xsi:type="targlets:Targlet">



<requirement name="org.eclipse.platform.sdk"/>
<requirement name="org.eclipse.equinox.sdk.feature.group"/>
<repositoryList name="http://download.eclipse.org/releases/latest"/>
</targlet>
<targlet includeAllPlatforms="true" name="Orbit" xsi:type="targlets:Targlet">

<repositoryList name="http://download.eclipse.org/tools/orbit/downloads/drops/R20190226160451/repository"/>
</targlet>
</location>
</locations>
</target>

But I get an error, see screenshot.

Can you advice, what is wrong?

Best regards, Lars





  • Attachment: root.png
    (Size: 89.66KB, Downloaded 7 times)

[Updated on: Wed, 04 December 2019 23:01]

Report message to a moderator

Re: Converting a target definition file to targlets results in an artificial_root node error [message #1818064 is a reply to message #1818061] Thu, 05 December 2019 03:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31164
Registered: July 2009
Senior Member
I returned https://bugs.eclipse.org/bugs/show_bug.cgi?id=553786 as works for me.

In terms of your error, a Repository List is not a Repository. So you have a Repository List whose name is p2 URL and it has no Repositories in that list. Be sure to look at the details of the Task on the Confirmation page to see that it has expanded to the expected.

Here's how the "Eclipse Platform" Modular target looks in the Eclipse Projects
<?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="Eclipse Platform"
      activeRepositoryList="${eclipse.target.platform}">
    <repositoryList
        name="None"/>
    <repositoryList
        name="2019-12">
      <repository
          url="http://download.eclipse.org/eclipse/updates/4.14-I-builds"/>
    </repositoryList>
    <repositoryList
        name="2019-09">
      <repository
          url="http://download.eclipse.org/eclipse/updates/4.13/R-4.13-201909161045"/>
    </repositoryList>
<!-- and more.. -->
    <repositoryList
        name="Galileo">
      <repository
          url="http://download.eclipse.org/eclipse/updates/3.5/R-3.5.2-201002111343"/>
    </repositoryList>
  </targlet>
</setup.targlets:TargletTask>
Note that the activeRepositoryList attribute determines which RepositoryList is active, so you can specify many different target platforms via a single Targlet task.

Also note that you can drag a *.target (from the Explorer) and drop it on a Targlet task (and only on such a task), to convert it to a Targlet of that task in order to simplify/automate this conversion process.
Re: Converting a target definition file to targlets results in an artificial_root node error [message #1818100 is a reply to message #1818064] Thu, 05 December 2019 22:56 Go to previous messageGo to next message
Lars Vogel - out of office until 16.03.2020 is currently offline Lars Vogel - out of office until 16.03.2020Friend
Messages: 1094
Registered: July 2009
Senior Member

Hi Ed,

thanks for the reply. I think you answered in the context of a Oomph setup tasks. I'm currently trying to set the targlet directly using https://wiki.eclipse.org/Oomph_Targlets


My new targlet looks now like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="com.vogella.rcp.targettarglets">
<locations>
<location xmlns:targlets="http://www.eclipse.org/oomph/targlets/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Default" type="Targlet">
<targlet activeRepositoryList="Repos" includeAllPlatforms="true" includeSources="false" name="Eclipse RCP" xsi:type="targlets:Targlet">



<requirement name="org.eclipse.equinox.sdk.feature.group"/>
<requirement name="org.eclipse.platform.sdk"/>
<repositoryList name="Repos">


<repository url="http://download.eclipse.org/releases/latest"/>
<repository url="http://download.eclipse.org/tools/orbit/downloads/drops/R20190226160451/repository"/>
</repositoryList>
</targlet>
</location>
</locations>
</target>


I now receive the following error:

Problems occurred while resolving the target contents
An error occurred while installing the items
session context was:(profile=_home_vogella_workspace_kiel-15b2b7a2f067e9ae7bf05e45d7b20a829febbbd2, phase=org.eclipse.oomph.targlets.internal.core.TargletContainer$TargletCommitContext$3, operand=null --> [R]org.eclipse.platform.source 4.13.0.v20190916-1045, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.AddSourceBundleAction).
The artifact file for osgi.bundle,org.eclipse.platform.source,4.13.0.v20190916-1045 was not found.
Re: Converting a target definition file to targlets results in an artificial_root node error [message #1818102 is a reply to message #1818100] Thu, 05 December 2019 23:39 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31164
Registered: July 2009
Senior Member
Note that if you copy something in the Setup editor and paste it into the forum, then I can copy that text and paste it into my setup editor. That's a lot less work than trying to reproduce the parts of your sample.

So I just tried this:
<?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="Test">
    <requirement
        name="org.eclipse.equinox.sdk.feature.group"/>
    <requirement
        name="org.eclipse.platform.sdk"/>
    <repositoryList>
      <repository
          url="http://download.eclipse.org/releases/latest"/>
      <repository
          url="http://download.eclipse.org/tools/orbit/downloads/drops/R20190226160451/repository"/>
    </repositoryList>
  </targlet>
</setup.targlets:TargletTask>
I.e., I used Navigate -> Open Setup -> Workspace and created this task there, and then performed just that task in the usual way, but that works for me.

Your failure is kind of odd, because it's not a resolution failure but rather a failure to find the artifact corresponding to the properly resolved IU. That can only happen if the content metadata and the artifact metadata are inconsistent, or if the artifact metadata could not be loaded.

Of course that artifact definitely exists. It's in the report:

https://download.eclipse.org/oomph/archive/reports/download.eclipse.org/releases/2019-09/http___download.eclipse.org_releases_2019-09_201909181001/org.eclipse.platform.source_4.13.0.v20190916-1045.html

And it can only be in the report if the repository is in a consistent state.

And of course it works for me.

One thing you could try is to remove p2's own cache (which uses obscure names that you can't map back to where the cached files came from):

~/.p2/org.eclipse.equinox.p2.repository/cache

And Oomph's p2 cache (which uses names based on the URI from which the data is downloaded):

~/.eclipse/org.eclipse.oomph.p2/cache

A detailed analysis of these caches could help understand what was actually delivered by the server and used to find the artifacts. Something seems to be wrong with one of these:

http___download.eclipse.org_releases_2019-09_compositeArtifacts.jar
http___download.eclipse.org_releases_2019-09_201909181001_artifacts.xml.xz
Previous Topic:Is there a 'Drag to Install' equivalent for Product Catalogs?
Next Topic:Need help in Oomph
Goto Forum:
  


Current Time: Sat Jun 06 05:53:37 GMT 2020

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

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

Back to the top