Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Build fails at p2.director
Build fails at p2.director [message #1750552] Thu, 22 December 2016 14:17 Go to next message
ayman salah is currently offline ayman salahFriend
Messages: 85
Registered: June 2015
Member
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 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.


Can you please help me out.

[Updated on: Thu, 22 December 2016 15:50]

Report message to a moderator

Re: Build fails at p2.director [message #1750683 is a reply to message #1750552] Sun, 25 December 2016 08:50 Go to previous messageGo to next message
ayman salah is currently offline ayman salahFriend
Messages: 85
Registered: June 2015
Member
0 help?
Re: Build fails at p2.director [message #1750686 is a reply to message #1750683] Sun, 25 December 2016 12:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 10325
Registered: July 2009
Senior Member
Since you don't give any hint what you are doing inside ant and I don't know many ant pde experts it is hard to give any advice besides there must be a place where the dependencies are collected and you obviously miss a plugin that is new in 2.9 there so I would look for a place where the Deps are Handels

(Or switch to maven tycho)
Re: Build fails at p2.director [message #1750687 is a reply to message #1750686] Sun, 25 December 2016 12:51 Go to previous messageGo to next message
ayman salah is currently offline ayman salahFriend
Messages: 85
Registered: June 2015
Member
What do you mean by Deps are Handels?
Re: Build fails at p2.director [message #1750689 is a reply to message #1750687] Sun, 25 December 2016 15:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 10325
Registered: July 2009
Senior Member
I mean: what do you do in your ant files?
Re: Build fails at p2.director [message #1750690 is a reply to message #1750689] Sun, 25 December 2016 15:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 10325
Registered: July 2009
Senior Member
And I meant "handled"
Re: Build fails at p2.director [message #1750693 is a reply to message #1750690] Sun, 25 December 2016 16:48 Go to previous message
ayman salah is currently offline ayman salahFriend
Messages: 85
Registered: June 2015
Member
Well apparently it was a dependency issue and it happened because of my need to use an older version of eclipse with newer version of Xtext.

What I did was copying the plugins straight into the plugins folder of eclipse which is not recommended by p2 people and completely discouraged. Check this http://www.slideshare.net/PascalRapicault/dos-and-do-nots-about-p2

What I had to do to fix this problem was to again MANUALLY edit the artifacts.xml found in eclipse's root folder and add the entries for missing plugins that I found in the logs 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>


Build now completes successfully.

This is to help anyone who faces the same problem.
Previous Topic:Serialize selected DSL model objects dynamically
Next Topic:how to run junit test from maven
Goto Forum:
  


Current Time: Tue Mar 28 00:53:30 GMT 2017

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

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