Files
mdm-ordinis/ordinis-auth/pom.xml
T
Zimin A.N. 721607c246 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).
2026-05-05 20:58:44 +03:00

50 lines
2.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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>