fix(auth): explicit nimbus-jose-jwt в ordinis-auth — production crashloop

Найден 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).
This commit is contained in:
Zimin A.N.
2026-05-05 20:58:44 +03:00
parent bcedddef71
commit 721607c246
2 changed files with 18 additions and 6 deletions
+4 -6
View File
@@ -96,12 +96,10 @@
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.37.3</version>
<scope>test</scope>
</dependency>
<!-- nimbus-jose-jwt — на compile classpath через ordinis-auth.
Здесь не дублируем (тест-scope direct override compile-transitive
и nimbus не попадает в Spring Boot fat jar). -->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
+14
View File
@@ -31,5 +31,19 @@
<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>