Commit 00c8173
fix(spring-boot2): pre-merge Spring metadata for Shadow 9.x compatibility
Shadow 9.x enforces DuplicatesStrategy before transformers run, which
breaks the `append` transformer for spring.factories and other Spring
metadata files. Only the last copy survives instead of being concatenated.
Replace `append` calls with a pre-merge task that manually concatenates
Spring metadata files (spring.factories, spring.handlers, spring.schemas,
spring-autoconfigure-metadata.properties) from the runtime classpath
before the shadow JAR is built. The merged files are included first in
the shadow JAR so they take precedence over duplicates from dependency
JARs.
This fixes the PersonSystemTest failure where @SentrySpan AOP and JDBC
instrumentation weren't working because SentryAutoConfiguration wasn't
properly registered in the merged spring.factories.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f47be74 commit 00c8173
File tree
5 files changed
+180
-25
lines changed- sentry-samples
- sentry-samples-netflix-dgs
- sentry-samples-spring-boot-opentelemetry-noagent
- sentry-samples-spring-boot-opentelemetry
- sentry-samples-spring-boot-webflux
- sentry-samples-spring-boot
5 files changed
+180
-25
lines changedLines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
39 | 70 | | |
40 | 71 | | |
| 72 | + | |
41 | 73 | | |
42 | 74 | | |
43 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
44 | 78 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 79 | | |
50 | 80 | | |
51 | 81 | | |
| |||
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
80 | 111 | | |
81 | 112 | | |
| 113 | + | |
82 | 114 | | |
83 | 115 | | |
84 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
85 | 119 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | 120 | | |
91 | 121 | | |
92 | 122 | | |
| |||
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
76 | 107 | | |
77 | 108 | | |
| 109 | + | |
78 | 110 | | |
79 | 111 | | |
80 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
81 | 115 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 116 | | |
87 | 117 | | |
88 | 118 | | |
| |||
Lines changed: 35 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
49 | 80 | | |
50 | 81 | | |
| 82 | + | |
51 | 83 | | |
52 | 84 | | |
53 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
54 | 88 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 89 | | |
60 | 90 | | |
61 | 91 | | |
| |||
Lines changed: 40 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
76 | 111 | | |
77 | 112 | | |
| 113 | + | |
78 | 114 | | |
79 | 115 | | |
80 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
81 | 120 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | 121 | | |
87 | 122 | | |
88 | 123 | | |
| |||
0 commit comments