[GRADLE-2715] Cannot resolve an ivy module with custom ivy status Created: 20/Mar/13 Updated: 03/Sep/13 Resolved: 03/Sep/13 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 1.8-rc-1 |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Issue Links: |
|
Description |
I have a legacy ivy repository where jars were built with a custom ivy status. Is there a way to tell Gradle about accepting a custom ivy status? If I try to pull from this repo, gradle fails with an error message about "bad status". |
Comments |
Comment by Gradle Forums [ 20/Mar/13 ] |
I'm afraid there not currently any way to use Gradle's built-in repository implementations when the contained modules have a custom status. One way to get it to work would be to use an appropriately configured Ivy DependencyResolver instance: you can see a few examples of these in our integration tests (no other docs, sorry). You can check these out at [1]https://github.com/gradle/gradle/tree.... |
Comment by Gradle Forums [ 20/Mar/13 ] |
It appears that org.gradle.api.internal.artifacts.ivyservice.DefaultSettingsConverter.convertForResolve is taking the URLResolver (that I'm creating) and overriding all the settings, which specifically include our custom statuses. The act of calling addResolver is what is setting the IvySettings from IvySettingsFactory. The examples given by Daz don't cover the settings of IvySettings, they only really set the patterns. It doesn't seem possible in 1.4 to set custom statuses. |
Comment by Gradle Forums [ 20/Mar/13 ] |
Right, sorry for the misdirect. When we construct a custom IvySettings instance and add your resolver to it, we effectively overwrite any settings that were configured when the resolver was constructed. So it's not possibly to update the set of known statuses to use when resolving. I see 2 ways to tackle this: If you're interested in pursuing 2., I'd be happy to help out. This would involve:
The first step is pretty trivial, and there are good examples of similar tests in org.gradle.integtests.resolve.ivy.IvyDynamicRevisionResolveIntegrationTest. We'd appreciate the contribution. |