|
38 | 38 | ~ OSGi and JPMS options |
39 | 39 | --> |
40 | 40 | <bnd-module-name>org.apache.logging.log4j.spring.cloud.config.client</bnd-module-name> |
| 41 | + <bnd-extra-packages-options> |
| 42 | + <!-- Used only for annotations --> |
| 43 | + org.springframework.boot.autoconfigure;resolution:=optional |
| 44 | + </bnd-extra-packages-options> |
41 | 45 | <bnd-extra-module-options> |
| 46 | + <!-- Optional dependencies should not be transitive --> |
| 47 | + spring.boot.autoconfigure;transitive=false, |
42 | 48 | <!-- Filebased module names: MUST be static --> |
43 | 49 | spring.cloud.context;substitute="spring-cloud-context";static=true;transitive=false |
44 | 50 | </bnd-extra-module-options> |
45 | 51 | <Fragment-Host>org.apache.logging.log4j.core</Fragment-Host> |
46 | | - |
47 | | - <!-- dependency versions --> |
48 | | - <spring-boot.version>3.2.1</spring-boot.version> |
49 | | - <spring-cloud.version>2022.0.4</spring-cloud.version> |
50 | | - |
51 | 52 | </properties> |
52 | 53 |
|
53 | | - <dependencyManagement> |
54 | | - <dependencies> |
55 | | - |
56 | | - <dependency> |
57 | | - <groupId>org.springframework.boot</groupId> |
58 | | - <artifactId>spring-boot-dependencies</artifactId> |
59 | | - <version>${spring-boot.version}</version> |
60 | | - <type>pom</type> |
61 | | - <scope>import</scope> |
62 | | - </dependency> |
63 | | - |
64 | | - <dependency> |
65 | | - <groupId>org.springframework.cloud</groupId> |
66 | | - <artifactId>spring-cloud-dependencies</artifactId> |
67 | | - <version>${spring-cloud.version}</version> |
68 | | - <type>pom</type> |
69 | | - <scope>import</scope> |
70 | | - </dependency> |
71 | | - |
72 | | - <dependency> |
73 | | - <groupId>org.springframework.boot</groupId> |
74 | | - <artifactId>spring-boot-starter-test</artifactId> |
75 | | - <version>${spring-boot.version}</version> |
76 | | - <exclusions> |
77 | | - <exclusion> |
78 | | - <groupId>org.springframework.boot</groupId> |
79 | | - <artifactId>spring-boot-starter-logging</artifactId> |
80 | | - </exclusion> |
81 | | - </exclusions> |
82 | | - </dependency> |
83 | | - |
84 | | - </dependencies> |
85 | | - </dependencyManagement> |
86 | | - |
87 | 54 | <dependencies> |
88 | 55 |
|
| 56 | + <dependency> |
| 57 | + <groupId>org.springframework.boot</groupId> |
| 58 | + <artifactId>spring-boot-autoconfigure</artifactId> |
| 59 | + <scope>provided</scope> |
| 60 | + </dependency> |
| 61 | + |
89 | 62 | <dependency> |
90 | 63 | <groupId>org.apache.logging.log4j</groupId> |
91 | | - <artifactId>log4j-core</artifactId> |
| 64 | + <artifactId>log4j-api</artifactId> |
92 | 65 | </dependency> |
93 | 66 |
|
94 | 67 | <dependency> |
95 | | - <groupId>org.springframework.cloud</groupId> |
96 | | - <artifactId>spring-cloud-config-client</artifactId> |
97 | | - <exclusions> |
98 | | - <exclusion> |
99 | | - <groupId>org.springframework</groupId> |
100 | | - <artifactId>spring-jcl</artifactId> |
101 | | - </exclusion> |
102 | | - </exclusions> |
| 68 | + <groupId>org.apache.logging.log4j</groupId> |
| 69 | + <artifactId>log4j-core</artifactId> |
103 | 70 | </dependency> |
104 | 71 |
|
105 | 72 | <dependency> |
106 | | - <groupId>org.springframework.cloud</groupId> |
107 | | - <artifactId>spring-cloud-starter-bootstrap</artifactId> |
| 73 | + <groupId>org.springframework</groupId> |
| 74 | + <artifactId>spring-context</artifactId> |
108 | 75 | </dependency> |
109 | 76 |
|
110 | 77 | <dependency> |
111 | | - <groupId>commons-logging</groupId> |
112 | | - <artifactId>commons-logging</artifactId> |
113 | | - <scope>runtime</scope> |
| 78 | + <groupId>org.springframework.cloud</groupId> |
| 79 | + <artifactId>spring-cloud-context</artifactId> |
114 | 80 | </dependency> |
115 | 81 |
|
116 | 82 | <dependency> |
|
120 | 86 | </dependency> |
121 | 87 |
|
122 | 88 | <dependency> |
123 | | - <groupId>org.junit.vintage</groupId> |
124 | | - <artifactId>junit-vintage-engine</artifactId> |
| 89 | + <groupId>junit</groupId> |
| 90 | + <artifactId>junit</artifactId> |
125 | 91 | <scope>test</scope> |
126 | 92 | </dependency> |
127 | 93 |
|
128 | 94 | <dependency> |
129 | | - <groupId>org.springframework.boot</groupId> |
130 | | - <artifactId>spring-boot-starter-test</artifactId> |
| 95 | + <groupId>org.springframework</groupId> |
| 96 | + <artifactId>spring-beans</artifactId> |
| 97 | + <scope>test</scope> |
| 98 | + </dependency> |
| 99 | + |
| 100 | + <dependency> |
| 101 | + <groupId>org.springframework</groupId> |
| 102 | + <artifactId>spring-test</artifactId> |
131 | 103 | <scope>test</scope> |
132 | | - <exclusions> |
133 | | - <exclusion> |
134 | | - <groupId>org.springframework</groupId> |
135 | | - <artifactId>spring-jcl</artifactId> |
136 | | - </exclusion> |
137 | | - </exclusions> |
138 | 104 | </dependency> |
139 | 105 |
|
140 | 106 | <dependency> |
141 | 107 | <groupId>org.springframework.boot</groupId> |
142 | | - <artifactId>spring-boot-starter-log4j2</artifactId> |
| 108 | + <artifactId>spring-boot-test</artifactId> |
143 | 109 | <scope>test</scope> |
144 | | - <exclusions> |
145 | | - <exclusion> |
146 | | - <groupId>org.springframework</groupId> |
147 | | - <artifactId>spring-jcl</artifactId> |
148 | | - </exclusion> |
149 | | - </exclusions> |
150 | 110 | </dependency> |
151 | 111 |
|
152 | 112 | </dependencies> |
153 | 113 |
|
| 114 | + <build> |
| 115 | + <plugins> |
| 116 | + <!-- |
| 117 | + ~ Unban Spring JCL, so we don't need to exclude it. |
| 118 | + --> |
| 119 | + <plugin> |
| 120 | + <groupId>org.apache.maven.plugins</groupId> |
| 121 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 122 | + <executions> |
| 123 | + <execution> |
| 124 | + <id>ban-logging-dependencies</id> |
| 125 | + <configuration> |
| 126 | + <rules> |
| 127 | + <bannedDependencies> |
| 128 | + <includes> |
| 129 | + <include>org.springframework:spring-jcl</include> |
| 130 | + </includes> |
| 131 | + </bannedDependencies> |
| 132 | + </rules> |
| 133 | + </configuration> |
| 134 | + </execution> |
| 135 | + </executions> |
| 136 | + </plugin> |
| 137 | + </plugins> |
| 138 | + </build> |
154 | 139 | </project> |
0 commit comments