-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle 6.0 resolves wildcarded maven dependencies differently than Gradle 5.X #10850
Comments
Thanks for trying Gradle 6.0! This is caused by a breaking change in Gradle 6.0: by default, Gradle no longer resolves dependencies for which the metadata is missing. For a single dependency version, that means no The simple solution is to configure the repository to tell it you want to search for artifacts without metadata. See the documentation on how to do that. |
thanks for the reply @ljacomet, that is a really useful doc page. I found what you are describing in this section: But I'm not quite clear on what combination of metadata source need to be added to get the old behavior. Before I had this: repositories {
maven {
url "http://repo.mycompany.com/repo"
}
} And according to the doc it sounds like I only need to add the
However, now my build fails earlier, so I also added the I tried consulting the relevant docs but it just says that |
Thanks for the feedback, will look into improving the documentation.
and for Gradle >= 6.0 it becomes:
So to restore pre 6.0 behaviour, you need to copy the old declaration. Note that if your repository never has metadata, you can also simply tell Gradle to look for |
thanks for the further explanation @ljacomet! I'll go ahead and close this issue since I understand what needs to be changed. |
Gradle 6.x has different defaults for ivy repos. This change allows using dependencies from Amazon S3. gradle/gradle#10850
Gradle 6.x has different defaults for ivy repos. This change allows using dependencies from Amazon S3. gradle/gradle#10850
Gradle 6.x has different defaults for ivy repos. This change allows using dependencies from Amazon S3. gradle/gradle#10850
Expected Behavior
I have a working project that has a dependency on a maven artifact produced by a peer component like this:
The complete build.gradle file can be found here: https://github.com/OpenLiberty/open-liberty/blob/master/dev/com.ibm.ws.ejbcontainer.async_fat/build.gradle
Current Behavior
The dependency
test:com.ibm.ws.ejbcontainer.fat_tools:1.+
fails to resolve with Gradle 6.0 with the following error:Context
Currently my project is using Gradle 5.5 and can be built with Java 8, 11, or 12. I am trying to get it working with Java 13 too so I am trying to upgrade to Gradle 6.0.
It seems that there is a general behavior change with the way wildcarded dependencies work in Gradle now (for example
com.foo:bar:1.+
). My configuration may have been invalid but tolerated in Gradle 5.X, so I'm willing to accept a pointer to a Gradle issue/pr/doc page that describes the behavior change and ideally the steps needed to get around this.Steps to Reproduce
This will take a while, but you can do:
java13-gradle-bug-report
branch./gradlew releaseNeeded
and it will eventually failYour Environment
The text was updated successfully, but these errors were encountered: