Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 3
Message 21 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

Writing to GitHub I have got the message that GitHub Package Registry currently does not support mutable packages, whether your package is SNAPSHOT or not. So the only way to update your package is to publish a new package.

 

Hope GPR supports mutable packags ASAP!

Copilot Lvl 2
Message 22 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

> Writing to GitHub I have got the message that GitHub Package Registry currently does not support mutable packages, whether your package is SNAPSHOT or not. So the only way to update your package is to publish a new package.

 

This is strange because the docs clearly state that you can deploy multiple packages (though I'm having the same problem - getting a 400 error after getting one deploy to work half-way).

 

 

Copilot Lvl 3
Message 23 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

You can deploy mutiple packages, but you cannot deploy mutable packages.

 

This means that you cannot publish a SNAPSHOT package again, such as publish a `1.0-SNAPSHOT` package, and after updating something you cannot publish this package with version `1.0-SNAPSHOT` again(This is strange for snapshot packages).

 

So the only way to update your package is to publish a new version of you package.

Mission Specialist Lvl 1
Message 24 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

Do you know if this is something being worked on? Snapshots are supposed to be mutable :/

Copilot Lvl 2
Message 25 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

Here're some fixes which worked for us (multimodule pom). This is mostly the summary of this thread:

  • Disable pooling: -Dmaven.wagon.http.pool=false
  • Switch to maven deploy plugin 3.0.0-M1 which isn't failing the build, when it's not able to upload maven-metadata.xml (<-- maybe we can skip the pooling switch. Didn't try that out anymore)
  • Add scm url with org and common prefix in order to group multiple packages (use the same url as in distributionManagement). This project is a multi-module one, so we do need that:
<scm>
<url>https://maven.pkg.github.com/vsfexperts/rbac</url>
</scm>
  • Use personal access token in settings.xml (username=your github account, password=token)

 

Not of all of this might be necessary, but it's at least working correctly for us for now. It just might help you to solve your issues. 

 

Full sample parent pom available at https://github.com/vsfexperts/rbac/packages/64840

Project available at https://github.com/vsfexperts/rbac

 

Copilot Lvl 2
Message 26 of 26

Re: GitHub package registry as Maven repo - trouble uploading artifact

Hey,

 

I'm trying to deploy an artifact to GitHub package registry. Is has nothing special on it it's just a library class (https://github.com/tvcsantos/javautils/) that i need as a dependency to my other projects.

 

I've followed the guide in https://help.github.com/en/articles/configuring-apache-maven-for-use-with-github-package-registry, with no success.

 

Can someone explain how can I deploy an artifact during my workflow. Just to check, I need to have:

 

<distributionManagement>
   <repository>
     <id>github</id>
     <name>GitHub OWNER Apache Maven Packages</name>
     <url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
   </repository>
</distributionManagement>

on my pom.xml, did that got a 401. What I'm I missing.

 

A simple hellow world artifact repository example would be a great starting point for everyone i guess.

 

Thanks