Skip to content

Fix antrun for openwire-generate and allow (require) JDK8 for now #1418

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbonofre
Copy link
Member

No description provided.

@jbonofre
Copy link
Member Author

@kenliao94 as discussed on the mailing list.

@kenliao94
Copy link
Contributor

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (default-cli) on project activemq-client: An Ant BuildException has occured: java.lang.UnsupportedClassVersionError: org/apache/activemq/openwire/tool/JavaGeneratorTask 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 52.0
[ERROR] around Ant part ...<taskdef classname="org.apache.activemq.openwire.tool.JavaGeneratorTask" name="generate" classpathref="maven.compile.classpath" />... @ 5:135 in /Users/qrl/amzn/personal_workspace/activemq/activemq-client/target/antrun/build-main.xml
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (default-cli) on project activemq-client: An Ant BuildException has occured: java.lang.UnsupportedClassVersionError: org/apache/activemq/openwire/tool/JavaGeneratorTask 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 52.0
around Ant part ...<taskdef classname="org.apache.activemq.openwire.tool.JavaGeneratorTask" name="generate" classpathref="maven.compile.classpath" />... @ 5:135 in /Users/qrl/amzn/personal_workspace/activemq/activemq-client/target/antrun/build-main.xml
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:375)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)

Hey @jbonofre it might be due to my local environment but since I configured Java 17 to work on main branch. I seem to can't get rid of this error. I tried to use mvn cli and configured the java_home to point to java 8 and it showed me this error. Do I need to be 5.16 branch and configure java 8 to generate?

@jbonofre
Copy link
Member Author

jbonofre commented Apr 1, 2025

As you can see in my change, jdk8 is still required here. I will update to jdk17+ in a separate PR.

@cshannon
Copy link
Contributor

cshannon commented Apr 7, 2025

As mentioned on the dev list and on the Jira Issue, there is a new project for future OpenWire versions that is being modernized. It's fine to fix this to require JDK 8, but I don't think it's necessary or make sense to bother with fixing the current version for JDK 17.

I think we should probably just remove the old generator entirely from the 6.x build as it doesn't work on newer JDKs and we plan to migrate to the new project for v13 and future updates.

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

Successfully merging this pull request may close these issues.

3 participants