[GRADLE-2285] Dependency with package type 'orbit' should be interpreted as a jar Created: 09/May/12  Updated: 04/Jan/13  Resolved: 27/Jun/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-rc-3
Fix Version/s: 1.1-rc-1

Type: Bug
Reporter: Vijay Nagpal Assignee: Unassigned
Resolution: Duplicate Votes: 2

Issue Links:
Duplicate
Duplicates GRADLE-2188 Artifact not found resolving dependen... Resolved

 Description   

When gradle resolves dependencies of dropwizard-core ('com.yammer.dropwizard:dropwizard-core:0.4.0'), one of the transitive dependencies is 'org.eclipse.jetty.orbit:javax.servlet:3.0.0.v201112011016' whose artifact type is 'orbit'. Since the artifact type is 'orbit', gradle does not interpret this as a 'jar' packaging type and shows up an error. I do not have the same problem when resolving the dependency with maven.

Similar issues have been raised in jetty (http://jira.codehaus.org/browse/JETTY-1493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs) and ivy (https://issues.apache.org/jira/browse/IVY-899?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel#issue-tabs) for this.

I have been digging around in Ivy to see the code change that was made for a similar problem (IVY-899). The change in Ivy is in /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java and the corresponding change in Gradle should be in gradle/subprojects/core-impl/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/GradlePomModuleDescriptorBuilder.java

I have identified the fix and will be issuing a pull request as soon as I get some time to make the change and test it out.

-Vijay



 Comments   
Comment by Eirik Lygre [ 16/Jun/12 ]

This is also a duplicate of GRADLE-2188. The response to that one was "come with a pull request", so you creating one will be great!

Comment by Daz DeBoer [ 27/Jun/12 ]

Duplicate of GRADLE-2188

Comment by Vijay Nagpal [ 13/Jul/12 ]

Here are the package types that Ivy currently interprets as a jar:

  • ejb
  • bundle
  • maven-plugin
  • eclipse-plugin
  • jbi-component
  • jbi-shared-library

Here is what Gradle interprets as a jar:

  • ejb
  • bundle
  • maven-plugin
  • eclipse-plugin

As part of this bug fix, I am adding 'orbit' packaging type to be interpreted as a jar.

Should I also add the remaining package types that Ivy interprets as jars (i.e. jbi-component and jbi-shared-library)?

BTW: The extra package types (jbi*) were added into Ivy as part of https://issues.apache.org/jira/browse/IVY-899

Comment by Daz DeBoer [ 16/Jul/12 ]

Thanks for the feedback.
We're currently working on fixing this issue in a manner that doesn't involve explicitly listing all of the packaging types that should be mapped to 'jar'.
You can read more at:
https://github.com/gradle/gradle/blob/master/subprojects/docs/src/design-docs/dependency-management-bug-fixes.md#correct-handling-of-packaging-and-dependency-type-declared-in-poms

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