eclipse-basyx / basyx-java-sdk

java-sdk
MIT License
25 stars 32 forks source link

SDK has redundant dependencies "javax.ws.rs:javax.ws.rs-api" vs. "jakarta.ws.rs:jakarta.ws.rs-api" #265

Closed in-fke closed 1 year ago

in-fke commented 1 year ago

refers to 1.4.0 do a mvn dependency:tree

[INFO] +- javax.ws.rs:javax.ws.rs-api:jar:2.1.1:compile
[INFO] +- org.glassfish.jersey.core:jersey-client:jar:2.39.1:compile
[INFO] |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:compile

Should be the second only (in favor of the first).

After removing the "old" dependency, you could also enforce it in mvn

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- in favor of jakarta.ws.rs:jakarta.ws.rs-api -->
                                        <exclude>javax.ws.rs:javax.ws.rs-api</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

(I probably will be opening some more tickets in the near future - just about to start integrating Basyx SDK 1.4.0 ...)

in-fke commented 1 year ago

Actually, there is a third rs-api spec

[INFO] +- org.keycloak:keycloak-admin-client:jar:19.0.3:compile
[INFO] |  +- org.keycloak:keycloak-core:jar:19.0.3:compile
[INFO] |  +- org.keycloak:keycloak-common:jar:19.0.3:compile
[INFO] |  +- org.jboss.resteasy:resteasy-client:jar:3.13.2.Final:compile
[INFO] |  |  +- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec:jar:2.0.1.Final:compile
FrankSchnicke commented 1 year ago

Thank you very much for pointing this out.

As far as I know, there are some changes between javax and jackarta that may lead to breakage for our users. Thus, this is not something that we will be changing in context of BaSyx Java V1.X. However, we will be on the lookout for this on BaSyx Java V2.