-
Notifications
You must be signed in to change notification settings - Fork 7
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 expects guice no_aop component but is not found in Guice 5.0.1 #82
Comments
It appears to be related to google/guice#1505 |
@Dhivyaa21 thanks for reporting. @martinda we could add a dependency on the relevant library. What do you think? I don't see any other options and don't think it's wrong in any sense. |
Here is the smallest plugins {
id 'java-library'
id 'application'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'io.github.cdancy:artifactory-rest:1.0.0'
implementation 'org.codehaus.groovy:groovy-all:3.0.5'
} Reproduce with:
The error goes away when I comment out the |
Upgrading to a minimum of |
I wrote this gist and it tells me what brings the
Gradle certainly did not make this one easy. |
@martinda In Gradle, it's possible to substitute the dependency. More about it here.
Hope it helps. |
Upgrading to groovy-all:3.0.6 or higher works (I tried 3.0.6 and 3.0.12, as well as org.apache.groovy:groovy-all:4.0.4). So it's not really an issue for artifactory-rest to fix. |
I'm using Kotlin DSL and the Kotlin-equivalent of this did not seem to be removing the classifier. (The result of the code below tries to get guice 5.0.0, but still with the no_aop, for me, so it works partially.) configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.google.inject:guice:6.0.0")).using((module("com.google.inject:guice:5.0.0"))).withoutArtifactSelectors().withoutClassifier()
}
} What worked for me was an approach from https://discuss.gradle.org/t/remove-transitive-dependency-with-classifier-and-replace-with-new-one-without-classifier/26324/5 configurations.all {
// guice 5.x stopped shipping no_aop jar
resolutionStrategy.eachDependency {
if (this.requested.module.toString() == "com.google.inject:guice") {
this.artifactSelection {
this.selectArtifact(DependencyArtifact.DEFAULT_TYPE, null, null)
}
}
}
} |
Current Behavior
Gradle complains about no_aop component of Guice 5.0.1
Context
This issue results in exception during gradle dependency resolution.
Your Environment
My dependencies block
The only dependency that pulls Guice is the
artifactory-rest
.Downgrading Guice to 4.2.2 resolves this issue but I would like to know if it will be downgraded in your library.
The text was updated successfully, but these errors were encountered: