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

JCLOUDS-1618: Upgrade to gson 2.10.1 #176

Merged
merged 1 commit into from Jun 16, 2023
Merged

Conversation

gaul
Copy link
Member

@gaul gaul commented Jun 6, 2023

This also upgrades bnd to 7.0.0-SNAPSHOT to work around a META-INF/versions/9/module-info.class=module-info issue. Obviously we cannot merge this due to the use of a SNAPSHOT version but maybe someone has a better suggestion how to approach this?

Removed bnd in #177.

@gaul
Copy link
Member Author

gaul commented Jun 6, 2023

CI reports:

org.codehaus.plexus.component.repository.exception.ComponentLookupException: aQute/bnd/maven/plugin/BndMavenPlugin 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

I don't know if Java 17 is an intended requirement but I am flagging this.

project/pom.xml Outdated
@@ -217,12 +227,12 @@
<project.build.outputTimestamp>1668154596</project.build.outputTimestamp>

<!-- Plugin versions -->
<bnd.version>5.2.0</bnd.version>
<bnd.version>7.0.0-SNAPSHOT</bnd.version>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we are using bnd in the first place -- is this some kind of OSGi thing? @jbonofre

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively we could remove all uses of bnd and <manifestFile> from maven-jar-plugin.

gaul added a commit to gaul/jclouds-1 that referenced this pull request Jun 12, 2023
This blocks upgrading gson.  References apache#176.
@gaul gaul mentioned this pull request Jun 12, 2023
gaul added a commit to gaul/jclouds-1 that referenced this pull request Jun 12, 2023
This blocks upgrading gson.  References apache#176.
gaul added a commit that referenced this pull request Jun 16, 2023
This blocks upgrading gson.  References #176.
@gaul gaul marked this pull request as ready for review June 16, 2023 01:47
@gaul gaul merged commit 8075bbe into apache:master Jun 16, 2023
1 check passed
@gaul gaul deleted the deps/gson-2.10.1 branch June 16, 2023 02:09
@gurkerl83
Copy link

gurkerl83 commented Jul 5, 2023

@gaul I have to say it but I guess this completely breaks OSGi compatibility. I introduced the bnd plugin here which really simplified the OSGi support 8ac994c . Please revert the commit and I will take a look.

@gurkerl83
Copy link

gurkerl83 commented Jul 5, 2023

@gaul

CI reports:

org.codehaus.plexus.component.repository.exception.ComponentLookupException: aQute/bnd/maven/plugin/BndMavenPlugin 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

I don't know if Java 17 is an intended requirement but I am flagging this.

Looking at the error and comparing the bnd-plugin metadata I found that the version in use 5.2 can be updated until 6.0.0.
As you can the version 6.1.0 changes the required jdk version to 17. The max version we can push the bnd-plugin is 6.0.0, in theory; a different question is why they did not introduced it in 6.0.0. This might in fact explain the error.

5.2
Build-Jdk-Spec: 1.8

5.3
Build-Jdk-Spec: 1.8

6.0.0
Build-Jdk-Spec: 1.8

6.1.0
Build-Jdk-Spec: 17

See https://javaalmanac.io/bytecode/versions/

@gaul
Copy link
Member Author

gaul commented Jul 5, 2023

No reversion, see #177 (comment).

@jonesbusy
Copy link

Hi,

Any plan to have this released ?

Outdated gson cause now some issues on a Jenkins plugin (artifact-manager-s3-plugin) (https://issues.jenkins.io/browse/JENKINS-72441, jenkinsci/gson-api-plugin#7)

[INFO] +- org.apache.jclouds.provider:aws-s3:jar:2.5.0:compile
[INFO] |  \- org.apache.jclouds.api:s3:jar:2.5.0:compile
[INFO] |     +- org.apache.jclouds.api:sts:jar:2.5.0:compile
[INFO] |     |  \- org.apache.jclouds:jclouds-core:jar:2.5.0:compile
[INFO] |     |     +- com.google.code.gson:gson:jar:2.8.9:compile

Thanks!

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