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"?>
<classpath>
	<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"/>
</classpath>


Wrong .classpath overwritten by Eclipse while importing the project
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" output="bin/main" path="src">
		<attributes>
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="src" output="bin/main" path="xtend-gen">
		<attributes>
			<attribute name="gradle_scope" value="main"/>
			<attribute name="gradle_used_by_scope" value="main,test"/>
		</attributes>
	</classpathentry>
	<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"/>
</classpath>


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 online Christian DietrichFriend
Messages: 14026
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 https://docs.gradle.org/current/userguide/eclipse_plugin.html#sec:eclipse_customizing_the_generated_files


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[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: Fri Jul 30 05:08:23 GMT 2021

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

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

Back to the top