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

consider downgrade the target java version to 8 or 11? #166

Open
Anilople opened this issue Sep 4, 2023 · 2 comments · May be fixed by #167
Open

consider downgrade the target java version to 8 or 11? #166

Anilople opened this issue Sep 4, 2023 · 2 comments · May be fixed by #167

Comments

@Anilople
Copy link

Anilople commented Sep 4, 2023

When I run

mvn com.iluwatar.urm:urm-maven-plugin:help -Ddetail=true -Dgoal=map

got

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.041 s
[INFO] Finished at: 2023-09-04T22:28:27+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.iluwatar.urm:urm-maven-plugin:2.1.1:help (default-cli) on project apollo-openapi: Execution default-cli of goal
 com.iluwatar.urm:urm-maven-plugin:2.1.1:help failed: Unable to load the mojo 'help' in the plugin 'com.iluwatar.urm:urm-maven-plugin:2.1.1' due t
o an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com/iluwatar/urm/urm_maven_plugin/HelpMojo 
has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

environment:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\Apache\apache-maven-3.6.3\bin\..
Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-11.0.19.7-hotspot
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"

In

<target>17</target>

The target compiled .class's java version is 17, could downgrade it to 8 or 11? Because many projects don't use java 17 yet, that will cause this plugin cannot work on those project.

@Anilople
Copy link
Author

Anilople commented Sep 4, 2023

Only this method use java 17's feature

assertEquals(1, strings.stream().filter(s -> s.contains("package com.iluwatar.urm.testdomain")).toList().size());
assertEquals(2, strings.stream().filter(s -> s.contains("TestPojo")).toList().size());

When I delete it, this project can compile by jdk 8.

@iluwatar
Copy link
Owner

iluwatar commented Oct 8, 2023

The only way is forward. I'd rather fix this by resolving the issues with newer Java.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants