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