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:
<repository> <!-- This is a temporary reference as the Maven Shade plugin that supports Java 16 is not released yet --> <id>maven-snapshots</id> <url>https://repository.apache.org/content/repositories/snapshots/</url> </repository>
And then use the appropriate version in the plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.3.0-SNAPSHOT</version> ...
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] 90 Error: 91 Error: To see the full stack trace of the errors, re-run Maven with the -e switch. 92 Error: Re-run Maven using the -X switch to enable full debug logging. 93 Error: 94 Error: For more information about the errors and possible solutions, please read the following articles: 95 Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 96 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!