Netflix / eureka

AWS Service registry for resilient mid-tier load balancing and failover.
Apache License 2.0
12.37k stars 3.74k forks source link

Compilation error with javax.xml.namespace after upgrading to Hoxton.SR5 and above (eureka-client-1.9.21) #1329

Open guerricmerleHUG opened 4 years ago

guerricmerleHUG commented 4 years ago

When using Spring cloud Hoxton.SR4, spring-cloud-netflix. 2.2.2.RELEASE is used : jettison then stax-api is provided with an runtime scope by eureka-client (1.9.17) image

So my Spring Boot (2.2.8) application which uses Soap WebService (spring-boot-starter-web-services) with Java 11 compiles correctly and the import javax.xml.namespace.QName package is known.

if i change to Hoxton.SR5 or higher, spring-cloud-netflix. 2.2.3.RELEASE is used : jettison then stax-api now comes with a compile scope by eureka-client (1.9.21) image

So my application doesn't compile anymore and in STS I get this error in this import import javax.xml.namespace.QName;

The javax.xml.namespace package can be accessed from more than one module: <unnamed>, java.xml

eureka-client 1.9.21: the pom contains a compile scope for jettison: https://repo1.maven.org/maven2/com/netflix/eureka/eureka-client/1.9.21/eureka-client-1.9.21.pom

eureka-client 1.9.17: the pom contains a runtime scope for jettison https://repo1.maven.org/maven2/com/netflix/eureka/eureka-client/1.9.17/eureka-client-1.9.17.pom

samshay commented 3 years ago

A lot of dependences have this problem : if i compare the generated pom between 1.9.20 and 1.9.21, i see a difference for dependency guice for exemple https://repo1.maven.org/maven2/com/netflix/eureka/eureka-client/1.9.20/eureka-client-1.9.20.pom

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
<scope>runtime</scope>
</dependency>

https://repo1.maven.org/maven2/com/netflix/eureka/eureka-client/1.9.21/eureka-client-1.9.21.pom

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.1.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>*</artifactId>
<groupId>org.glassfish.jersey</groupId>
</exclusion>
</exclusions>
</dependency>

It's a real problem because i have a lot of transitive dependencies with the version 1.9.21 like javax.inject

Maybe a bug with version of gradle update here : https://github.com/Netflix/eureka/commit/bf424b7732ff6dfcb31d55e81b3f16f797ce1eb0#diff-4aaf7070e72f1b6a0a15242954cefdf74eebda75c7006d0ec9a22a3fd8018f69