Ant build fails after mirrorArchive step

100 views Asked by At

So due to having to stick with some eclipse version, I had to install plugins manually by copying them into plugins folder.

After doing that everything works fine and my projects are loaded correctly.

I am using eclipse indigo 3.7.0 64 bit with Xtext 2.9.2

When I run Ant to build my solution it fails at runDirector p2.director with this message:

[java] [p2.director] Missing requirement: Xtext Generator 2.9.2.v201603040440 (org.eclipse.xtext.generator 2.9.2.v201603040440) requires 'bundle org.eclipse.xtext.xtext.generator [2.9.0,3.0.0)' but it could not be found

I don't know much about p2 but I believe that there is some XML file that I should edit or point to some correct repo or something.

I also am getting this in a step before the build fails:

[java] [p2.mirror] Unable to satisfy dependency from org.eclipse.xtext.xbase.ui 2.9.2.v201603040440 to bundle org.eclipse.xtext.xbase.ide [2.9.0,3.0.0).
[java] [p2.mirror] Unable to satisfy dependency from org.eclipse.xtext.generator 2.9.2.v201603040440 to bundle org.eclipse.xtext.xtext.generator [2.9.0,3.0.0).
[java] [p2.mirror] Messages while mirroring artifact descriptors.

I also tried using -d and -v when running ant, but this specific part has nothing more than normal in the debug and verbose mode.

Where is p2.mirror located?

Where can I set p2.mirror?

I am 100% sure that I have these jars, Are they supposed to be somewhere else?

1

There are 1 answers

0
Ayman Salah On BEST ANSWER

Okay so, I now know what was wrong and I have fixed it. Let me walk you through what I did:

I had to manually install the plugins I need because updating from eclipse itself was impossible because I had to use an old version of eclipse 3.7.0.

After installing the plugins manually another modification had to be made which was updating the artifacts.xml of eclipse manually. Adding entries for missing plugins that are now found in the plugins folder such as:

<artifact classifier='osgi.bundle' id='org.eclipse.xtext.xtext.generator' version='2.9.2.v201603040440'>
  <properties size='1'>
    <property name='download.size' value='1623614'/>
  </properties>
</artifact>

After updating the artifacts.xml, p2 local repository had to be updated as well because it uses the artifacts.xml and needs to see the added list of plugins.

After doing all of this the build worked beautifully. I hope this helps, been stuck for days.

NOTE: What I had to do is completely discouraged by p2 people, do it at your own risk. See: http://www.slideshare.net/PascalRapicault/dos-and-do-nots-about-p2