Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 21 of 23

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 22 of 23

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.

Copilot Lvl 2
Message 23 of 23

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