[GRADLE-2733] Gradle should honour Ivy artifact type to determine sources and javadoc classification Created: 02/Apr/13 Updated: 10/Feb/17 Resolved: 10/Feb/17
When pointing Gradle at existing internal Ivy repositories, source artifacts appear on the classpath instead of attached as source. Existing Ivy module descriptors (inconsistently) identify source artifacts using the artifact type attribute, and changing these descriptors is not an option. For example:
I found to my surprise that the only way to get Eclipse to attach sources for an artifactName.jar is to provide artifactName-sources.jar, regardless of anything (type or classifier) in the module descriptor.
This is consistent with the stricter Maven naming conventions, where sources is the classifier, but it is not flexible enough for Ivy. This has worked for years with Ivy out of the box; the classpath contains only jars, and the Eclipse plugin IvyDE is configurable with the types to map as sources and javadoc respectively. Gradle must be able to do the same in order to fulfill its promise:
|Comment by Andreas Nyberg [ 18/Jan/14 ]|
This is still a huge problem in my organisation that still has to hack/patch Gradle to make our existing Ivy repositories work.
All artifacts have a "type", and the most common type is "jar". Only "jar" artifacts should ever form a classpath, but Gradle constructs classpaths using the sum of all artifacts on a given configuration. This is not only redundant but actually causes failures when a compiler sees duplicate classes, one in the source archive and one in the jar. Pulling artifacts of a certain type from a given configuration should also be better supported.
|Comment by Benjamin Muschko [ 15/Nov/16 ]|
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.
We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.
Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!
|Comment by Benjamin Muschko [ 10/Feb/17 ]|
Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.