[GRADLE-1984] Running gradle eclipse twice results in duplicated java source entries in .classpath Created: 06/Dec/11  Updated: 04/Jan/13  Resolved: 06/Dec/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-6
Fix Version/s: 1.0-milestone-7

Type: Bug
Reporter: Sergey Kadaner Assignee: Unassigned
Resolution: Fixed Votes: 0

Issue Links:
Duplicate
Duplicates GRADLE-1056 eclipse plugin duplicates src/main/ja... Resolved
Duplicates GRADLE-1994 Duplicate build path entry (src/main/... Resolved
Duplicated by GRADLE-1953 "gradle eclipse" creates duplicate cl... Resolved

 Description   

Running gradle eclipse twice results in duplicated java source entries in .classpath file

For example:
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/java"/>

Adding the following snippet solved the issue for me:

eclipse.classpath.file.beforeMerged

{ classpath -> classpath.entries.clear() }
Generated at Wed Jun 30 12:09:39 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.