Skip to content
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

No sources in maven-central for guice-4.1.0-no_aop.jar #1073

Open
scf37 opened this issue Jan 21, 2017 · 17 comments
Open

No sources in maven-central for guice-4.1.0-no_aop.jar #1073

scf37 opened this issue Jan 21, 2017 · 17 comments

Comments

@scf37
Copy link

scf37 commented Jan 21, 2017

http://central.maven.org/maven2/com/google/inject/guice/4.1.0/

@mcculls
Copy link
Contributor

mcculls commented Jan 21, 2017

The source is there:

http://central.maven.org/maven2/com/google/inject/guice/4.1.0/guice-4.1.0-sources.jar

The same source is used to build both the classic and no-AOP versions:

https://github.com/google/guice/wiki/OptionalAOP#building-guice-without-aop

it's just that the no-AOP build uses the munge preprocessor to remove all bytecode-dependent APIs. Munge preserves line-numbering so if you load that source into an IDE for debugging purposes the line-numbers will still match, regardless of which binary you're debugging.

@scf37
Copy link
Author

scf37 commented Jan 21, 2017

Ok, problem is IDEA and sbt does not pull sources by default as they rely on naming conventions.

@mcculls
Copy link
Contributor

mcculls commented Jan 21, 2017

They don't let you override this and choose a different source? Most IDEs will let you tell them where the source is.

@scf37
Copy link
Author

scf37 commented Jan 21, 2017

They do, if sources are already downloaded. But to download them, one have to import "full" guice first or wget them manually. Just inconvenient.

I suggest to upload guice sources twice under different names - for guice and guice-no_aop artifacts.

@tangmin823
Copy link

@mcculls
guice-no_aop.jar still can't be found from maven central?
image

Pls, I use your help, thanks.

@ckzgraphics
Copy link

ckzgraphics commented Sep 6, 2021

Still facing this issue on IDEA IntelliJ for com.google.inject:guice:5.0.1. Is there any workaround for this?

Could not find guice-no_aop.jar (com.google.inject:guice:5.0.1).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/google/inject/guice/5.0.1/guice-5.0.1-no_aop.jar

Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

@GedMarc
Copy link

GedMarc commented Sep 6, 2021

uhhh there is no such jar, for v5, also - no more need for it

@qyhsmx
Copy link

qyhsmx commented Mar 5, 2022

is there any solutions for this ?

@Yurii-Loienko
Copy link

Yurii-Loienko commented Apr 29, 2022

Have the same issue :( And looks like still no solution
Could not find guice-5.1.0-no_aop.jar (com.google.inject:guice:5.1.0).

@mcculls
Copy link
Contributor

mcculls commented Apr 29, 2022

You won't find guice-5.1.0-no_aop.jar because it doesn't exist any more - the 5.x releases don't include a separate no_aop jar because that functionality is now included in the main release jar guice-5.1.0.jar under a feature flag:

https://github.com/google/guice/wiki/Guice501#guice-core

Removed no-aop build variant

To disable bytecode generation, use the new -Dguice_bytecode_gen_option=DISABLED flag.
When disabled, ASM & AOP-related code will still be linked into Guice, but will not be used

If your build is attempting to download guice-5.1.0-no_aop.jar then that suggests the build hasn't been updated to refer to the main release jar - is this a public build and what build tool are you using (Maven or Gradle?)

@martinda
Copy link

martinda commented May 9, 2022

I can reproduce this issue with the hyper-simplified build.gradle file posted to this Gradle forum. I don't understand how to fix it. I don't understand how to "refer to the main jar". Nor do I understand how one can refer to "not the main jar".

@mcculls
Copy link
Contributor

mcculls commented May 9, 2022

@martinda TestNG 7.1.0 (a transitive dependency of groovy-all:3.0.5) declares a dependency on the old no_aop artifact:

https://repo1.maven.org/maven2/org/testng/testng/7.1.0/testng-7.1.0.pom

Gradle sees that dependency and aligns its version with the version applied to other guice dependencies in the project - it appears to ignore the fact it has a different classifier. More recent releases of TestNG have upgraded to guice 5 and now depend on the main guice artifact.

https://repo1.maven.org/maven2/org/testng/testng/7.5/testng-7.5.pom

You can update the transitive version of TestNG with the following change to your build.gradle:

dependencies {
    implementation 'io.github.cdancy:artifactory-rest:1.0.0'
    implementation 'org.codehaus.groovy:groovy-all:3.0.5'
    constraints {
        implementation('org.testng:testng:7.5') {
            because 'previous versions try to pull in the no_aop classifier which no longer exists'
        }
    }
}

@martinda
Copy link

martinda commented May 9, 2022

@mcculls Thanks! I just discovered exactly that myself. Nice to have some confirmation. I had to write a pom.xml to find out as I could not see it using gradle.

@martinda
Copy link

martinda commented May 9, 2022

@mcculls how did you find out? What command did you type that told you it was caused by testng?

@martinda
Copy link

I wrote this gist and it tells me what brings the no_aop artifact.

@mcculls
Copy link
Contributor

mcculls commented May 10, 2022

Hi @martinda - I just used gradle dependencies to see where guice was being pulled in and at what version

I then took a closer look at dependencies pulling in guice 4.x (looking at their pom file on Maven central) to see if they were using the no_aop classifier or not.

neverpanic pushed a commit to bmwcarit/joynr that referenced this issue Jun 27, 2022
According to google/guice#1073

To disable bytecode generation, use the new

-Dguice_bytecode_gen_option=DISABLED

flag. When disabled, ASM & AOP-related code will still be linked
into Guice, but will not be used.
@peacetrader
Copy link

Hi, I am facing the same issue.
I get the same error for these depenedencies :
testImplementation("net.serenity-bdd:serenity-core:3.3.2")
testImplementation("net.serenity-bdd:serenity-cucumber:3.3.2")
testImplementation("net.serenity-bdd:serenity-rest-assured:3.3.2")

Could not find guice-5.1.0-no_aop.jar (com.google.inject:guice:5.1.0).

Searched in the following locations:
https://repo.maven.apache.org/maven2/com/google/inject/guice/5.1.0/guice-5.1.0-no_aop.jar

How to resolve this pls?. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants