[GRADLE-1122] duplicate dependencies in build.gradle result in no dependecy in .classpath Created: 17/Aug/10  Updated: 04/Jan/13  Resolved: 14/Nov/11

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

Type: Bug
Reporter: Philip Crotwell Assignee: Unassigned
Resolution: Fixed Votes: 0


 Description   

Running gradle eclipse on this build.gradle results in a .classpath without antlr as a dependency. Comment out one of the two antlr deps and it works correctly. Obviously, this is a dumb dependency list, but either the .classpath should have just the latest version, both versions, or gradle should signal an error.

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'project-report'

group = 'edu.sc.seis'
version = '1.0'

dependencies

{ compile "antlr:antlr:2.7.1" compile "antlr:antlr:2.7.2" }

repositories

{ mavenCentral() }

.......with duplicated dependency:
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
</classpath>

.......with single dependency:
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
<classpathentry sourcepath="GRADLE_CACHE/antlr/antlr/sources/antlr-2.7.2-sources.jar" kind="var" path="GRADLE_CACHE/antlr/antlr/jars/antlr-2.7.2.jar" exported="true"/>
</classpath>

------------------------------------------------------------
Gradle 0.9-rc-1
------------------------------------------------------------

Gradle buildtime: Wednesday, 4 August 2010 8:04:33 AM EST
Groovy: 1.7.3
Ant: Apache Ant version 1.8.1 compiled on April 30 2010
Ivy: 2.2.0-rc1
Java: 1.6.0_20
JVM: 16.3-b01-279
JVM Vendor: Apple Inc.
OS Name: Mac OS X



 Comments   
Comment by Hans Dockter [ 17/Aug/10 ]

Sorry for all the issues with the new Eclipse plugin. The problem is that for some reasons we need to duplicate logic of our dependency DSL. And the duplication is just not complete. We will enhance the dependency DSL soon, so that the Eclipse plugin can simply use it.

Generated at Wed Jun 30 11:47:28 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.