ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: Eclipse build path loses Ivy library on reload
Date Sat, 04 Feb 2012 17:42:58 GMT

Le 3 févr. 2012 à 22:31, Nelson, Ryan a écrit :

> I have a very odd problem here (possible bug?).  When I open Eclipse, or
> when I close and re-open a project, Eclipse loses the Ivy library from
> the build path.  The entry in the .classpath file for the project does
> not change:
> 
> 
> 
> <classpath>
> 
>            <classpathentry kind="src" path="src"/>
> 
>            <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> 
>            <classpathentry kind="con"
> path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=i
> vy.xml&amp;confs=*"/>
> 
>            <classpathentry kind="output" path="classes"/>
> 
> </classpath>
> 
> 
> 
> As you can see, the ivy.xml file is still listed as an entry, but if I
> could take a screengrab of my Eclipse project, Ivy is not listed as a
> library.
> 
> 
> 
> If I right-click the ivy.xml file and choose "Add Ivy Library..." and
> click the Finish button, the library does get added back.  However, the
> Add window doesn't close, and this error shows up in the log: 
> 
> 
> 
> Java Model Exception: Java Model Status [Build path contains duplicate
> entry:
> 'org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xm
> l&confs=*' for project 'adaptiveMathMotion']
> 
>            at
> org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelO
> peration.java:784)
> 
>            at
> org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.ja
> va:3026)
> 
>            at
> org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.ja
> va:2988)
> 
>            at
> org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.ja
> va:3000)
> 
> 
> 
> So clearly when Eclipse goes to update the .classpath file it finds that
> the Ivy library is already there, but why isn't it loading it when the
> project is opened?  I see no other messages in any log file to
> troubleshoot this problem.

I think the IvyDE classpath container is still there even after a close-reopen of the project.
By default Eclipse doesn't show empty library containers [1].

Then the question is why is it empty whereas before the close it was properly resolved ? I
don't know the answer, sometimes Eclipse successfully save the state, sometimes it doesn't,
I never figured out why or how to make it work reliably. One work around is to enable the
resolve on startup [2], so with or without a savec classpath, a resolve is launched so it
could get properly populated. It consumes startup time though.

Nicolas

[1] http://ant.apache.org/ivy/ivyde/faq.html#empty-container
[2] http://ant.apache.org/ivy/ivyde/history/latest-milestone/preferences.html#global


> 
> 
> 
> Is this something I should log on JIRA?
> 
> 
> 
> Ryan
> 


Mime
View raw message