Maven Shade Plugin Snapshot


Does anyone know how to get GitHub Actions to compile and shade Java with a Maven snapshot version of the shade plugin?

I’m upgrading my code bases to Java 16 and I need to use version 3.3.0-SNAPSHOT of the Maven Shade plugin to get the code to compile because previous versions do not support Java 16. To do that in Maven, I declare the Maven Snapshot repo in my POM:

            <!-- This is a temporary reference as the Maven Shade plugin 
                that supports Java 16 is not released yet -->

And then use the appropriate version in the plugin:


This compiles fine on Jenkins and locally, but when using GitHub Actions, I get this error:

Error:  Plugin org.apache.maven.plugins:maven-shade-plugin:3.3.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-shade-plugin:jar:3.3.0-SNAPSHOT -> [Help 1]
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1]
Error: Process completed with exit code 1.

Is there a way to get Actions to use the declared repo? Or is there another way?

Action Build Failure: Fix Java 16 compilation. · BentoBoxWorld/Challenges@015b5d3 · GitHub
Project: GitHub - BentoBoxWorld/Challenges: Add-on for BentoBox to add challenges for BSkyBlock and AcidIsland

Thanks in advance!

1 Like

Hi! I’m afraid I’m not sure what’s happening so hopefully other members can chime in.

In the meantime, while it might not resolve the issue, we do recommend using the latest releases of our Actions:

Thanks. I updated to v2 for those, but the issue still remains. It seems the maven snapshot repo is ignored.

I found out how to fix it. In Maven there is an option to specify plugin repos. So adding this to the POM makes it work: