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

Can't download dependency avro-1.10.0.2p #60

Open
msvticket opened this issue Sep 22, 2021 · 12 comments
Open

Can't download dependency avro-1.10.0.2p #60

msvticket opened this issue Sep 22, 2021 · 12 comments

Comments

@msvticket
Copy link

When trying to use spf4j-slf4j-test by adding

		<dependency>
			<groupId>org.spf4j</groupId>
			<artifactId>spf4j-slf4j-test</artifactId>
			<scope>test</scope>
			<version>8.9.1</version>
		</dependency>

to my pom.xml I get the following error when running mvn:
Caused by: org.apache.maven.wagon.authorization.AuthorizationException: authentication failed for https://maven.pkg.github.com/zolyfarkas/*/org/apache/avro/avro/1.10.0.2p/avro-1.10.0.2p.pom, status: 401 Unauthorized

I have verified that trying to download the file with curl also gives status 401 Unauthorized.

@zolyfarkas
Copy link
Owner

zolyfarkas commented Sep 22, 2021 via email

@zolyfarkas
Copy link
Owner

zolyfarkas commented Oct 15, 2021 via email

@msvticket
Copy link
Author

I now got around to try again. It still doesn't work. I have tried versions 8.9.2 and 8.9.4:

Could not transfer artifact org.apache.avro:avro:pom:1.10.0.8p from/to github (https://maven.pkg.github.com/zolyfarkas/*): authentication failed for https://maven.pkg.github.com/zolyfarkas/*/org/apache/avro/avro/1.10.0.8p/avro-1.10.0.8p.pom, status: 401 Unauthorized

@zolyfarkas
Copy link
Owner

@msvticket Sorry for the inconvenience.

I removed the requirement only for spf4j-slf4j-test, so I guess it is pulled by another spf4j lib.

You could try to overwrite the avro version by using in your dependencyManagement section of your pom:

<dependency>
  <groupId>org.apache.avro</groupId>
  <artifactId>avro</artifactId>
  <version>1.10.2</version>
</dependency>

use 8.9.4 if you do this.

My hope was for github to remove this nonsensical auth requirement sooner rather than later, so that I don't have to do extra work.

did you try to configure authentication?

@msvticket
Copy link
Author

Something like that. From the stacktrace of the error:

Failed to collect dependencies at org.spf4j:spf4j-slf4j-test:jar:8.9.4 -> org.spf4j.avro:core-schema:jar:1.0.7 -> org.apache.avro:avro:jar:1.10.0.8p

Adding the snippet to dependencyManagement worked though.

I didn't try to configure authentication since I don't want the hassle with adding credentials to a build pipeline in a secure way.

@senderic
Copy link

senderic commented Mar 4, 2022

See my comment here (its unfortunately in a closed issue) #56 (comment)

I'll post it here as well:

Would you consider uploading it to https://jitpack.io/ instead? It is free for opensource and there are no authentication steps to deal with (we just need to reference jitpack in the POM as a repository).

Those steps of making a token are just a bit excessive, makes each system I work with needing an extra step, etc.

Another open source project I work with that uses this (in case you wanted to see an example): https://jitpack.io/#Juniper/netconf-java https://github.com/Juniper/netconf-java

As you can see, the tags form the version.

@sfc-gh-schen
Copy link

@zolyfarkas Can you remove the requirement for spf4j-ui?
I overwrite the avro in my pom.xml, how ever, when I execute the spf4j-ui jar, it throws errors Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "AWT-EventQueue-0"

@zolyfarkas
Copy link
Owner

will switch to https://jitpack.io/ I was waiting for github to remove the auth requirements as they promised, but I guess that will not happen.

@dkapil
Copy link

dkapil commented Jan 23, 2023

Hi @zolyfarkas
We are unable to resolve this issue if we keep the latest versions of spf4j and spf4j-ui and downgrade the version of Avro to 1.10.2 by declaring it specifically in dependencies.

We are getting the error as mentioned by @sfc-gh-schen
Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "AWT-EventQueue-0"

If we can not keep our Github credentials in the repo since it is a public one to fetch the latest version of Avro, is there a workaround we can make spf4j-ui work with old version of Avro?

@zolyfarkas
Copy link
Owner

@dkapil spf4j should work with the public version of avro as well.

If you can share the complete stack trace it would help me understand the error you are encountering.

thanks!

@zolyfarkas
Copy link
Owner

Yeah, looks like that library somehow failed to publish to maven central, I have just republished it. Please let me know if anything else is missing.

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

6 participants