Page 1 of 1

Duplicate plugins. How do I identify which ones being used?

PostPosted: Wed Nov 23, 2022 2:15 am
by luke
Hey guys, I am having a problem where I am noticing discrepancies across my developer environment vs production, in which we have different .jar files being used for plugins. Not only that, but within our developer environment we have 3 of the same plugin .jar file in different versions and are not sure which one is being used (and therefore which ones to remove). For example, we have in our plugins directory on developer,

1. poi-ooxml-4.1.1.jar
2. poi-ooxml-5.1.0.jar
3. poi-ooxml-lite-5.1.0.jar

How can I find out exactly which plugin is being used in my application? Is there a way to view it in the servoy developer IDE in the plugins explorer? Or is there some sort of code I should be looking for in which it identifies the file location of a plugin when being used in the application?

Any advice would be greatly appreciated. Thanks.

Re: Duplicate plugins. How do I identify which ones being us

PostPosted: Thu Nov 24, 2022 8:14 pm
by emera
Hello,

When doing a war export and checking the duplicate jars we look in the MANIFEST.MF files. We always try to pick the latest version of a specific jar, if it's not already present in the Servoy core.

To determine the duplicate jar names we check the Bundle-SymbolicName attribute, if that is missing we check Automatic-Module-Name, else we fallback to the file name without the version number.
To compare the versions we look at the Implementation-Version or Bundle-Version attributes. If none is present, then we consider the version is 0.

In your case I think poi-ooxml-5.1.0.jar (Automatic-Module-Name: org.apache.poi.ooxml) and poi-ooxml-lite-5.1.0.jar (Automatic-Module-Name: org.apache.poi.ooxml.schemas) are exported in the war. They don't seem duplicates considering the above criteria.

Re: Duplicate plugins. How do I identify which ones being us

PostPosted: Fri Nov 25, 2022 8:02 pm
by emera
I checked poi-ooxml-5.1.0.jar and poi-ooxml-lite-5.1.0.jar content and they don't seem duplicates to me. I expected poi-ooxml-lite to be fully included in poi-ooxml, but it actually contains some extra packages.