721607c246
Найден production-bug на staging: ordinis-app в CrashLoopBackOff с NoClassDefFoundError: com/nimbusds/jose/RemoteKeySourceException. Причина: в Phase 2c e2e тестах я добавил nimbus-jose-jwt 9.37.3 как test-scope direct dependency в ordinis-app/pom.xml. Maven scope resolution: direct test-scope побеждает transitive compile-scope, nimbus исключился из Spring Boot fat jar. На runtime JwtDecoders.fromIssuerLocation() (использует Nimbus internally) падал. Fix: - ordinis-auth/pom.xml: explicit compile-scope dep на nimbus-jose-jwt (раньше тянулся транзитивно через oauth2-resource-server starter) - ordinis-app/pom.xml: убрал test-scope direct decl, JwtTestSupport использует nimbus с compile classpath. Verified: BOOT-INF/lib/nimbus-jose-jwt-9.37.3.jar в fat jar после rebuild. e2e AuthE2ETest всё ещё зелёный (12/12).
50 lines
2.0 KiB
XML
50 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<parent>
|
||
<groupId>cloud.nstart.terravault.ordinis</groupId>
|
||
<artifactId>ordinis-parent</artifactId>
|
||
<version>0.1.0-SNAPSHOT</version>
|
||
</parent>
|
||
|
||
<artifactId>ordinis-auth</artifactId>
|
||
<name>Ordinis :: Auth</name>
|
||
<description>JWT-based scope authorization (@nstart/auth контракт). Используется writer и read-api.</description>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>cloud.nstart.terravault.ordinis</groupId>
|
||
<artifactId>ordinis-domain</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-security</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</dependency>
|
||
<!--
|
||
Explicit compile-scope: spring-boot-starter-oauth2-resource-server тянет
|
||
nimbus как transitive compile, но если другой модуль (ordinis-app для
|
||
e2e тестов) объявил nimbus как test-scope direct dep, Maven исключает
|
||
его из compile classpath fat jar'а Spring Boot. Объявление здесь
|
||
гарантирует что nimbus всегда в production jar.
|
||
Caused: java.lang.NoClassDefFoundError: com/nimbusds/jose/RemoteKeySourceException
|
||
at JwtDecoders.fromIssuerLocation
|
||
-->
|
||
<dependency>
|
||
<groupId>com.nimbusds</groupId>
|
||
<artifactId>nimbus-jose-jwt</artifactId>
|
||
<version>9.37.3</version>
|
||
</dependency>
|
||
</dependencies>
|
||
</project>
|