Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run on Java 21 #278

Open
anbusampath opened this issue Jan 31, 2024 · 3 comments
Open

Failed to run on Java 21 #278

anbusampath opened this issue Jan 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@anbusampath
Copy link

Execution default-cli of goal se.kth.castor:depclean-maven-plugin:2.0.6:depclean failed: Unsupported class file major version 65

@anbusampath anbusampath added the bug Something isn't working label Jan 31, 2024
@andresnssbx
Copy link

@anbusampath did you find any solution?

@jwachter
Copy link

jwachter commented Jul 16, 2024

One solution you should be able to use is to manage the plugin (temporarily) in your project and define newer Versions of the ASM Libraries as direct plugin dependencies. As the error only stems from ASM not being able to read the newer bytecode it is enough to use an up-to-date version that supports the newer bytecode levels.

<pluginManagement>
      <plugins>
        <plugin>
          <groupId>se.kth.castor</groupId>
          <artifactId>depclean-maven-plugin</artifactId>
          <version>2.0.6</version>
          <dependencies>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-util</artifactId>
                <version>9.7</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-tree</artifactId>
                <version>9.7</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-commons</artifactId>
                <version>9.7</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>9.7</version>
            </dependency>
          </dependencies>
        </plugin>
  ...
  </plugins>
</pluginManagement>

@goodale
Copy link

goodale commented Nov 12, 2024

note to others that may be experiencing this issue

if you are using a repo and the pom you want to analyze inherits from the pom defining the plugin be sure to push your parent pom to remote and then do a mvn -U clean to ensure the pom being analyzed gets the update with the specific asm version that resolves the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants