'reference maven shade plugin 3.3.1-SNAPSHOT in pom

According to the site

https://maven.apache.org/plugins-archives/maven-shade-plugin-LATEST/shade-mojo.html

the latest version of the maven shade plugin is 3.3.1-SNAPSHOT and exists since 2021-07-14.

To reference the earlier version 3.3.0-SNAPSHOT, I used the following reference in the pom

<pluginRepositories>
    <pluginRepository>
        <id>maven-snapshots</id>
        <url>https://repository.apache.org/content/repositories/snapshots/</url>
    </pluginRepository>
</pluginRepositories>

My question how to reference 3.3.1-SNAPSHOT in the pom. When running mvn install I am getting the following error:

ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.3.1-SNAPSHOT:shade ([...]) on project [...]: Execution [...] of goal org.apache.maven.plugins:maven-shade-plugin:3.3.1-SNAPSHOT:shade failed: Plugin org.apache.maven.plugins:maven-shade-plugin:3.3.1-SNAPSHOT or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-shade-plugin:jar:3.3.1-20220317.155034-43 -> org.slf4j:slf4j-api:jar:1.7.32: Failed to read artifact descriptor for org.slf4j:slf4j-api:jar:1.7.32: Could not transfer artifact org.slf4j:slf4j-api:pom:1.7.32 from/to maven-snapshots (https://repository.apache.org/content/repositories/snapshots/): transfer failed for https://repository.apache.org/content/repositories/snapshots/org/slf4j/slf4j-api/1.7.32/slf4j-api-1.7.32.pom: Unknown host repository.apache.org: Temporary failure in name resolution -> [Help 1]

So is the problem with slf4j? Can I resolve this somehow?

Thank you!

PS: the reason why i would like to try out the latest version is because I am getting the following errors when running mvn install:

with maven-shade-plugin 3.2.4:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (owlex) on project owl: Error creating shaded jar: Unsupported class file major version 61 -> [Help 1]

with maven-shade-plugin 3.3.0-SNAPSHOT:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.3.0-SNAPSHOT:shade (owlex) on project owl: Error creating shaded jar: Records requires ASM8 -> [Help 1]



Solution 1:[1]

I can recommend to use the most recent version of maven-shade-plugin version 3.3.0 which has been released.

This will handle JDK 17 correctly.

https://www.mail-archive.com/[email protected]/msg01066.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 khmarbaise