Unable to download dependency from GitHub Package Registry #25517
-
I have successfully deployed my package to the GitHub Package Registry: com.akdeniz.googleplaycrawler 1.1 However, when I add the following dependency into my POM.xml file, Maven is unable to download it:
A simple “mvn install” fails with the following warning:
Checking my .m2 repository folder confirms that neither the POM or JAR file was downloaded. Any idea what I am doing wrong because I am using the same Maven settings.xml file that I used to upload the package which includes all the server and repositry information described in the documentation. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I managed to get it working by changing the dependancy to this:
This is different from the GroupID and ArtifactID given by the GitHub Package Registry web page. Then include the repository name in the repository tag:
In the documentation only the OWNER section was mentioned. |
Beta Was this translation helpful? Give feedback.
-
I’m also trying to add my deployed maven artfact as dependy. I also set up the GitHub CI which deployed it to the Package Registry here: https://github.com/TobseF/HelloMaven/packages/39042 But how to add it as dependy? pom.xml
Which did I missed? Do I also need to setup a settings.xml with credentials? I also tried it in the project and globally in this way:
But I had no succces. Did you set up the authetification an how? Can you add my sample lib as dependency? Best wishes, Tobse |
Beta Was this translation helpful? Give feedback.
-
OK, I aso got it working, by removing the .m2/settings.xml in the project and suing the global username/.m2/settings.xml. There I changed repository url from
to
so I have:
So to add a dependency, do I really need to mention every GitHub Registry depency in my global settings.xml? At the end of the day I have to list there hundreds. Or is it enough to set up my token for the id named github and hope everybody is using this name in their pom.xml -good luck? |
Beta Was this translation helpful? Give feedback.
-
Still not working |
Beta Was this translation helpful? Give feedback.
-
It appears the github page showing how to set up the dependency in a maven pom.xml file simply lies 😉
Hope it helps |
Beta Was this translation helpful? Give feedback.
I managed to get it working by changing the dependancy to this:
This is different from the GroupID and ArtifactID given by the GitHub Package Registry web page.
Then include the repository name in the repository tag: