AEM 6.5 GSON version upgrade from 2.8.9 to 2.10.1 | Community
Skip to main content
Level 2
July 26, 2023
Solved

AEM 6.5 GSON version upgrade from 2.8.9 to 2.10.1

  • July 26, 2023
  • 3 replies
  • 1492 views

My gson version is not changing to 2.10.1 I mean not reflecting in http://localhost:4502/system/console/depfinder

Made changes in pom.xml

<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>provided</scope>
</dependency>

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

What you are doing in your pom is to instruct your bundle to consume the com.google.code.gson version 2.10.1 from the runtime (AEM). But the gson version available in AEM is 2.8.9. So you are not really upgrading anything with such a change. 

If you really need to upgrade the gson version, you have 2 options:
1. You manually upload a new version of the gson bundle and upgrade manually

2. You embed your gson version through your bundle

 

Anyways, is there any strong reason why you would need to use the newer version rather than the one provided by AEM?, I think it is safe to use that version provisioned. 

 

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
July 26, 2023

What you are doing in your pom is to instruct your bundle to consume the com.google.code.gson version 2.10.1 from the runtime (AEM). But the gson version available in AEM is 2.8.9. So you are not really upgrading anything with such a change. 

If you really need to upgrade the gson version, you have 2 options:
1. You manually upload a new version of the gson bundle and upgrade manually

2. You embed your gson version through your bundle

 

Anyways, is there any strong reason why you would need to use the newer version rather than the one provided by AEM?, I think it is safe to use that version provisioned. 

 

Esteban Bustamante
ManviSharma
Adobe Employee
Adobe Employee
July 27, 2023

Hi,

 

Change the scope in your pom.xml from <scope>provided</scope> to <scope>compile</scope> for Gson version 2.10.1 to be reflected in AEM's Felix Dependency Finder.

Sachin_Arora_
Community Advisor
Community Advisor
July 27, 2023

Adding dependency in pom.xml wont upload the bundle in AEM until you specifically embed it. Gson comes with Uber jar as well and probably the version of same would be reflecting in your bundle. Please elaborate more to understand what you are trying to achieve. 

New Member
October 22, 2024

Hi @sachin_arora_ - I want to override the gson version in pom.xml over the version which is used from Uber jar. How do I acheive this?