Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » refresh dependecies before importing the project on eclipse(Follow weird steps while trying to import project on Eclipse)
refresh dependecies before importing the project on eclipse [message #1833538] Fri, 16 October 2020 09:48 Go to next message
Luca Reccia is currently offline Luca RecciaFriend
Messages: 14
Registered: May 2020
Junior Member
Hi guys, I've a simple Xtext that works just fine on my machine.

However, whenever I try to import it on a new pc I should always:
1. clone from the repo
2. perform `gradle build --refresh-dependecies`
3. import the project in Eclipse DSL
4. restore the .classpath file which gets overwritten by Eclipse

Correct .classpath that makes the project work
<?xml version="1.0" encoding="UTF-8"?>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="src" path="src-gen"/>
	<classpathentry kind="src" path="xtend-gen"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
	<classpathentry kind="output" path="target/classes"/>

Wrong .classpath overwritten by Eclipse while importing the project
<?xml version="1.0" encoding="UTF-8"?>
	<classpathentry kind="src" output="bin/main" path="src">
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
	<classpathentry kind="src" output="bin/main" path="xtend-gen">
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
	<classpathentry kind="output" path="bin/default"/>

I've discovered this steps via a lot of trial and error but now I would like to finally fix the project (being able to avoid steps 2 and 3 while installing it somewhere)

I've searched online, but, not knowing much of gradle or maven, I didn't get that far. I was wondering if any of you as any idea on what is happening inside my codebase.

Thank you for your help.

[Updated on: Fri, 16 October 2020 09:48]

Report message to a moderator

Re: refresh dependecies before importing the project on eclipse [message #1833541 is a reply to message #1833538] Fri, 16 October 2020 09:52 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14283
Registered: July 2009
Senior Member
there is no both
either eclipse
or gradle

in your case the gradle eclipse integration does update the .classpath files to be gradle way.

see also

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :

[Updated on: Fri, 16 October 2020 09:58]

Report message to a moderator

Previous Topic:Path Expression Issue
Next Topic:Performance issue in QueuedBuildData
Goto Forum:

Current Time: Wed Jun 29 11:07:50 GMT 2022

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

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

Back to the top