Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

AEM 6.5 GSON version upgrade from 2.8.9 to 2.10.1

Avatar

Level 2

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>

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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

Avatar

Employee Advisor

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.

Avatar

Community Advisor

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.