haraldk / TwelveMonkeys

TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO
https://haraldk.github.io/TwelveMonkeys/
BSD 3-Clause "New" or "Revised" License
1.9k stars 314 forks source link

Add artifact prefix "twelvemonkeys-" to all modules to avoid conflicts with other projects #747

Open dinosavings opened 1 year ago

dinosavings commented 1 year ago

Describe the bug

The pom.xml as documented says to include the jar file via maven as

<dependency>
        <groupId>com.twelvemonkeys.imageio</groupId>
        <artifactId>imageio-webp</artifactId>
        <version>3.9.4</version>
    </dependency>
As a result the final jar names that are included in the final war file are: common-lang-3.9.4.jar, common-io-3.9.4.jar, imageio-core-3.9.4.jar, common-image-3.9.4.jar etc.

This could lead to conflicts.

It is fortunate that the apache commons are plural e.g commons-io-1.4jar, commons-lang-2.5.jar.

**Version information**

1. The version of the TwelveMonkeys ImageIO library in use.
3.9.4

2. The *exact* output of `java --version` (or `java -version` for older Java releases). 

openjdk version "1.8.0_352"
OpenJDK Runtime Environment Corretto-8.352.08.1 (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM Corretto-8.352.08.1 (build 25.352-b08, mixed mode)

3. Extra information about OS version, server version, standalone program or web application packaging, executable wrapper, etc. Please state exact version numbers where applicable.

NA

**To Reproduce**

Steps to reproduce the behavior:

Include
com.twelvemonkeys.imageio imageio-webp 3.9.4

in the pom.xml for a project that generates a war file. View the war file and look for 3.9.4 jar files. You will see these are not prefixed with twelvemonkeys.

**Expected behavior**

Prefix all artifactId with twelvemonkeys. e.g
com.twelvemonkeys.imageio twelvemonkeys-imageio-webp 3.9.4

Thus, all twelvemonkeys jar files will have this prefix and have no chance of possible conflicts.
haraldk commented 1 year ago

I agree that the possible naming conflict is unfortunate, but I don't think this is a bug. We're at version 3.9.4 at this moment, I think suddenly changing the maven coordinates would create more confusion than just keeping it as-is.

It's already in my plan to change to the suggested scheme for version 4.