[GRADLE-461] Transitive dependencies not working for the Scala plugin (works in maven) Created: 24/Apr/09 Updated: 04/Jan/13 Resolved: 24/Nov/10
|Reporter:||Jeppe Nejsum Madsen||Assignee:||Hans Dockter|
Note: Need Gradle with the Scala plugin: http://jira.codehaus.org/browse/GRADLE-287
Running "gradle test" for the attached project yields the following compilation error:
The reason is due to missing dependency 'org.mortbay.jetty:jetty-util:6.1.6'. The Attributes class is not referenced directly from the project, only indirectly from the Server class. So I think it shouldn't be necessary to declare this dependency. The jetty pom (http://repo2.maven.org/maven2/org/mortbay/jetty/jetty/6.1.6/jetty-6.1.6.pom) contains this
Running "mvn test" works fine and doesn't not specify this jar in the pom.
I'm unsure whether this is a problem with the Scala gradle plugin or Gradle itself
|Comment by Hans Dockter [ 31/Aug/09 ]|
I think this points to a more fundamental issue we should analyze for 0.9.
|Comment by Hans Dockter [ 12/Nov/09 ]|
Is this still an issue for you?
The compile configuration resolves non-transitive by design (one can change this easily). There are issues with Groovy that the transitive dependencies must be available to compile. Which means that for Groovy this might cause trouble. In general we plan to make the compile configuration resolve transitively and provide a code quality check instead, which ensures that classes from transitive dependencies are not directly accessed in the code.
I would like to rename this issue for this purpose and transform it from BUG to IMPROVEMENT. Is this OK?
|Comment by Jeppe Nejsum Madsen [ 12/Nov/09 ]|
The issue still exists in Gradle 0.8, but it is not a showstopper since I can just specify the deps manually.
Renaming and transforming is fine with me.
|Comment by Hans Dockter [ 16/Nov/09 ]|
Then it should remain a bug. I still need to understand why exactly you need an indirect dependency here to compile code.
|Comment by Hans Dockter [ 22/Apr/10 ]|
The compile configuration is now resolved transitively by default.