Currently the OSGi bundle with the custom plugin always uses the Gson implementation from Bamboo instead of the one inside the bundle itself.
To test this I had this on the plugin code:
Class klass = Gson.class;
URL location = klass.getResource('/' + klass.getName().replace('.', '/') + ".class");
log.warn("Gson: " + location);
Class klass2 = SerializedName.class;
URL location2 = klass2.getResource('/' + klass2.getName().replace('.', '/') + ".class");
log.warn("@SerializedName: " + location2);
And this on pom.xml:
The expected result is that all code that uses classes from the Gson packages should come from the bundle itself, not the one provided by the environment (Bamboo).
But the result was:
This means, Gson class was loaded from Bamboo but the annotation SerializedName came from the bundle, which is a problem in our case because the annotation is being ignored when parsing a JSON file.
Having an import for all Gson packages from Bamboo is not an option to us because we use features that are only available after Gson 2.3.
Is there a way to use the Gson package that is bundled with the plugin itself?
G’day Bamboo customers, The wait is almost over! We are in the final stages of work on the first release of Bamboo Data Center, our self-managed enterprise offering of Bamboo. This Data Center offe...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events