Unable locate installable unit in target definition
Asked Answered
S

5

9

I created my own target definition. It worked perfectly until now. Today I opened this target definition and got following error for all software sites I have there:

Unable to locate installable unit <unit name>

The target definition file looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>

<target name="indigo" sequenceNumber="20">
<locations>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.zest.feature.group" version="1.3.0.v20110425-2050-67A18yF6F18CBD5A7N54242"/>
<unit id="org.eclipse.zest.sdk.feature.group" version="1.3.0.v20110425-2050-67C18COMPIAKSVKGQaRTQTiSN8WP"/>
<unit id="org.eclipse.zest.source.feature.group" version="1.3.0.v20110425-2050-67A18yF6F18CBD5A7N54242"/>
<repository location="http://download.eclipse.org/releases/indigo"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.jdt.feature.group" version="3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1"/>
<unit id="org.eclipse.jdt.source.feature.group" version="3.7.2.v20120120-1414-7z8gFcuFMP7BW5XTz0jLTnz0l9B1"/>
<unit id="org.eclipse.pde.source.feature.group" version="3.7.2.v20120120-1420-7b7rFUOFEx2Xnqafnpz0E--0"/>
<unit id="org.eclipse.platform.sdk" version="3.7.2.M20120208-0800"/>
<unit id="org.eclipse.rcp.id" version="3.7.2.M20120208-0800"/>
<unit id="org.eclipse.rcp.sdk.id" version="3.7.2.M20120208-0800"/>
<repository location="http://download.eclipse.org/eclipse/updates/3.7"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.egit.feature.group" version="1.3.0.201202151440-r"/>
<unit id="org.eclipse.egit.source.feature.group" version="1.3.0.201202151440-r"/>
<unit id="org.eclipse.jgit.feature.group" version="1.3.0.201202151440-r"/>
<unit id="org.eclipse.jgit.source.feature.group" version="1.3.0.201202151440-r"/>
<repository location="http://download.eclipse.org/egit/updates"/>
</location>
<location path="${project_loc}/lib" type="Directory"/>
<location includeAllPlatforms="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.tmatesoft.svnkit.feature.group" version="1.7.4.t20120412_2022"/>
<repository location="http://eclipse.svnkit.com/1.7.x"/>
</location>
<location path="${project_loc}/lib/deltapack" type="Profile"/>
</locations>
</target>
Sit answered 11/5, 2012 at 7:10 Comment(0)
P
7

This is a known issue with Eclipse, and unfortunately, there is no clear solution. Things that may fix this:

  • Restart Eclipse
  • Select all entries and hit "Reload"
  • Restart Eclipse with the -clean command line option (no worries, does not erase workspace)
  • Select an entry and open it (hit "Add..."). The old selection will be lost, so you have to reselect it. Upon closing, the target platform will be reloaded, and with a little luck everything, not just the update site that you just edited.
  • The nuclear option: Delete the .metadata folder in your workspace - you'll have to setup your workspace again.
Puebla answered 18/7, 2014 at 13:7 Comment(3)
Before flipping the nuclear switch, you could also try to just delete the folder org.eclipse.pde.core within .metadata/.plugins. This would not require you to setup your workspace again. The next start of Eclipse might take some more time tough.Sumptuary
And one more thing to try: Go to Window > Preferences and then General > Startup and Shutdown > Workspaces and remove all other entries under "Recent workspaces". Then close Eclipse, delete the folder org.eclipse.pde.core as mentioned in my previous comment and start Eclipse again. PDE might look for bundles in other workspaces appearing under "Recent workspaces" (!)Sumptuary
Thanks @Sumptuary it resolved the issue.Bodyguard
C
7

For me editing the .target file manually and increasing the sequenceNumber attribute worked every time (so far).

Crookes answered 7/11, 2014 at 12:21 Comment(1)
Thanks for this advise! Updating sequenceNumber seems to force Eclipse to refresh to definition, which it doesn't seem to do even when the Reload button is pressed.Ardel
W
0

You could also ty to delete the P2 pool directory. On Linux this is usually found under your home directory in folder .p2/pool.

Wide answered 6/1, 2018 at 14:45 Comment(0)
S
-1

I pared down your target definition to one of the sites (eclipse/updates/3.7) and the target resolved correctly.

The errors you are getting mean that the site you are trying to download from do not have the content you are asking for. This may mean that you are asking for a unit or version that no longer exists on the site or it may mean the site is not accessible.

Sanitation answered 8/11, 2012 at 17:0 Comment(1)
Error means artifacts are no available in local cache, servers are irrelevant.Salenasalene
S
-1

Today i had that same issue and I did the following things.

  • I deleted my ".m2/repositories" folder in the user directory.
  • After that I tried to update all softwaresites within the *.target file.

Then an error occured that another repository on my nexus was missing.

  • First I deleted this repository from the *.target file manually and updated it again.

The unable to locate installable unit <unit name> error was gone. Then I fixed the problem with the missing repository and everything seems fine. I hope that this will help.

Slurry answered 17/2, 2015 at 9:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.