Skip to content

Commit 7b82d73

Browse files
siri-varmasvegiraju-microsoftsalaboyartur-ciocanucicoyle
authored
Move dependency management and plugin management to parent pom (#1260)
* Clean up pom Signed-off-by: sirivarma <[email protected]> * downgrade dependency Signed-off-by: sirivarma <[email protected]> * Fix Signed-off-by: sirivarma <[email protected]> * Fix thigns Signed-off-by: sirivarma <[email protected]> * Fix class not found Signed-off-by: sirivarma <[email protected]> * Remove import Signed-off-by: sirivarma <[email protected]> * Address comments Signed-off-by: Siri Varma Vegiraju <[email protected]> * cleanup Signed-off-by: Siri Varma Vegiraju <[email protected]> * Fix deps Signed-off-by: siri-varma <[email protected]> * cleanup Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> * Fix deps Signed-off-by: siri-varma <[email protected]> * Fix things Signed-off-by: siri-varma <[email protected]> * Fix finals Signed-off-by: siri-varma <[email protected]> * Fix finals Signed-off-by: siri-varma <[email protected]> * upgrade test containers to .5 Signed-off-by: sirivarma <[email protected]> * This is it Signed-off-by: sirivarma <[email protected]> * Fix feedback Signed-off-by: sirivarma <[email protected]> * Add comment Signed-off-by: sirivarma <[email protected]> * Add comment Signed-off-by: sirivarma <[email protected]> * Change to properties Signed-off-by: sirivarma <[email protected]> --------- Signed-off-by: sirivarma <[email protected]> Signed-off-by: Siri Varma Vegiraju <[email protected]> Signed-off-by: siri-varma <[email protected]> Co-authored-by: Siri Varma Vegiraju <[email protected]> Co-authored-by: salaboy <[email protected]> Co-authored-by: artur-ciocanu <[email protected]> Co-authored-by: Cassie Coyle <[email protected]>
1 parent 57f6b96 commit 7b82d73

File tree

7 files changed

+279
-103
lines changed

7 files changed

+279
-103
lines changed

dapr-spring/pom.xml

+29
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<maven.compiler.source>11</maven.compiler.source>
3333
<maven.compiler.target>11</maven.compiler.target>
3434
<maven.compiler.release>11</maven.compiler.release>
35+
<testcontainers.version>1.19.8</testcontainers.version>
36+
<junit.version>5.10.2</junit.version>
3537
</properties>
3638

3739
<dependencyManagement>
@@ -43,6 +45,31 @@
4345
<type>pom</type>
4446
<scope>import</scope>
4547
</dependency>
48+
<dependency>
49+
<groupId>org.junit.jupiter</groupId>
50+
<artifactId>junit-jupiter-api</artifactId>
51+
<version>${junit.version}</version>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.junit.jupiter</groupId>
55+
<artifactId>junit-jupiter-params</artifactId>
56+
<version>${junit.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.junit.jupiter</groupId>
60+
<artifactId>junit-jupiter-engine</artifactId>
61+
<version>${junit.version}</version>
62+
</dependency>
63+
<dependency>
64+
<groupId>org.junit.jupiter</groupId>
65+
<artifactId>junit-jupiter</artifactId>
66+
<version>${junit.version}</version>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.testcontainers</groupId>
70+
<artifactId>junit-jupiter</artifactId>
71+
<version>${testcontainers.version}</version>
72+
</dependency>
4673
</dependencies>
4774
</dependencyManagement>
4875

@@ -73,13 +100,15 @@
73100
<dependency>
74101
<groupId>org.springframework.boot</groupId>
75102
<artifactId>spring-boot-configuration-processor</artifactId>
103+
<version>${springboot.version}</version>
76104
<optional>true</optional>
77105
</dependency>
78106

79107
<!-- Test dependencies -->
80108
<dependency>
81109
<groupId>org.springframework.boot</groupId>
82110
<artifactId>spring-boot-starter-test</artifactId>
111+
<version>${springboot.version}</version>
83112
<scope>test</scope>
84113
</dependency>
85114
<dependency>

pom.xml

+165-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
<maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
2727
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
2828
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
29+
<maven-sources-plugin.version>3.2.1</maven-sources-plugin.version>
30+
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
31+
<jacoco-maven-plugin.coverage-ratio>80%</jacoco-maven-plugin.coverage-ratio>
2932
<maven.compiler.source>11</maven.compiler.source>
3033
<maven.compiler.target>11</maven.compiler.target>
3134
<maven.compiler.release>11</maven.compiler.release>
@@ -42,9 +45,9 @@
4245
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
4346
<failsafe.version>3.2.2</failsafe.version>
4447
<surefire.version>3.2.2</surefire.version>
45-
<junit-bom.version>5.8.2</junit-bom.version>
48+
<junit-bom.version>5.11.4</junit-bom.version>
4649
<snakeyaml.version>2.0</snakeyaml.version>
47-
<testcontainers.version>1.20.0</testcontainers.version>
50+
<testcontainers.version>1.20.5</testcontainers.version>
4851
<springboot.version>3.4.3</springboot.version>
4952
<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
5053
</properties>
@@ -95,7 +98,6 @@
9598
<groupId>org.mockito</groupId>
9699
<artifactId>mockito-core</artifactId>
97100
<version>3.11.2</version>
98-
<scope>test</scope>
99101
</dependency>
100102
<dependency>
101103
<groupId>io.projectreactor</groupId>
@@ -120,12 +122,129 @@
120122
<artifactId>kotlin-stdlib</artifactId>
121123
<version>2.1.0</version>
122124
</dependency>
125+
<dependency>
126+
<groupId>org.yaml</groupId>
127+
<artifactId>snakeyaml</artifactId>
128+
<version>${snakeyaml.version}</version>
129+
</dependency>
130+
<dependency>
131+
<groupId>org.testcontainers</groupId>
132+
<artifactId>testcontainers</artifactId>
133+
<version>${testcontainers.version}</version>
134+
</dependency>
135+
<dependency>
136+
<groupId>io.dapr</groupId>
137+
<artifactId>dapr-sdk</artifactId>
138+
<version>${dapr.sdk.version}</version>
139+
<scope>compile</scope>
140+
</dependency>
141+
<dependency>
142+
<groupId>org.junit.jupiter</groupId>
143+
<artifactId>junit-jupiter</artifactId>
144+
<version>${junit-bom.version}</version>
145+
</dependency>
146+
<dependency>
147+
<groupId>org.junit.jupiter</groupId>
148+
<artifactId>junit-jupiter-api</artifactId>
149+
<version>${junit-bom.version}</version>
150+
</dependency>
151+
<dependency>
152+
<groupId>org.junit.jupiter</groupId>
153+
<artifactId>junit-jupiter-engine</artifactId>
154+
<version>${junit-bom.version}</version>
155+
</dependency>
156+
<dependency>
157+
<groupId>org.junit.jupiter</groupId>
158+
<artifactId>junit-jupiter-params</artifactId>
159+
<version>${junit-bom.version}</version>
160+
</dependency>
161+
<dependency>
162+
<groupId>org.testcontainers</groupId>
163+
<artifactId>junit-jupiter</artifactId>
164+
<version>${testcontainers.version}</version>
165+
</dependency>
166+
<dependency>
167+
<groupId>org.testcontainers</groupId>
168+
<artifactId>kafka</artifactId>
169+
<version>${testcontainers.version}</version>
170+
</dependency>
171+
<dependency>
172+
<groupId>org.springframework.boot</groupId>
173+
<artifactId>spring-boot-dependencies</artifactId>
174+
<version>${springboot.version}</version>
175+
<type>pom</type>
176+
</dependency>
177+
<dependency>
178+
<groupId>org.testcontainers</groupId>
179+
<artifactId>postgresql</artifactId>
180+
<version>${testcontainers.version}</version>
181+
</dependency>
182+
<dependency>
183+
<groupId>org.testcontainers</groupId>
184+
<artifactId>rabbitmq</artifactId>
185+
<version>${testcontainers.version}</version>
186+
</dependency>
187+
<dependency>
188+
<groupId>io.rest-assured</groupId>
189+
<artifactId>rest-assured</artifactId>
190+
<version>5.5.1</version>
191+
</dependency>
192+
<dependency>
193+
<groupId>io.dapr.spring</groupId>
194+
<artifactId>dapr-spring-boot-starter</artifactId>
195+
<version>${dapr.sdk.alpha.version}</version>
196+
</dependency>
197+
<dependency>
198+
<groupId>io.dapr.spring</groupId>
199+
<artifactId>dapr-spring-boot-starter-test</artifactId>
200+
<version>${dapr.sdk.alpha.version}</version>
201+
</dependency>
202+
<dependency>
203+
<groupId>org.springframework.boot</groupId>
204+
<artifactId>spring-boot-starter-web</artifactId>
205+
<version>${springboot.version}</version>
206+
</dependency>
207+
<dependency>
208+
<groupId>org.springframework.boot</groupId>
209+
<artifactId>spring-boot-starter-actuator</artifactId>
210+
<version>${springboot.version}</version>
211+
</dependency>
212+
<dependency>
213+
<groupId>org.springframework.boot</groupId>
214+
<artifactId>spring-boot-starter-test</artifactId>
215+
<version>${springboot.version}</version>
216+
</dependency>
217+
<dependency>
218+
<groupId>org.springframework.data</groupId>
219+
<artifactId>spring-data-keyvalue</artifactId>
220+
<version>${springboot.version}</version>
221+
</dependency>
222+
<dependency>
223+
<groupId>org.springframework.data</groupId>
224+
<artifactId>spring-data-commons</artifactId>
225+
<version>${springboot.version}</version>
226+
</dependency>
227+
<dependency>
228+
<groupId>org.springframework.boot</groupId>
229+
<artifactId>spring-boot-testcontainers</artifactId>
230+
<version>${springboot.version}</version>
231+
</dependency>
123232
</dependencies>
124233
</dependencyManagement>
125234

126235
<build>
127236
<pluginManagement>
128237
<plugins>
238+
<plugin>
239+
<groupId>org.springframework.boot</groupId>
240+
<artifactId>spring-boot-maven-plugin</artifactId>
241+
<version>${springboot.version}</version>
242+
</plugin>
243+
<plugin>
244+
<groupId>org.apache.maven.plugins</groupId>
245+
<artifactId>maven-source-plugin</artifactId>
246+
<version>${maven-sources-plugin.version}</version>
247+
</plugin>
129248
<plugin>
130249
<groupId>org.apache.maven.plugins</groupId>
131250
<artifactId>maven-compiler-plugin</artifactId>
@@ -174,6 +293,49 @@
174293
<autoReleaseAfterClose>true</autoReleaseAfterClose>
175294
</configuration>
176295
</plugin>
296+
<plugin>
297+
<groupId>org.jacoco</groupId>
298+
<artifactId>jacoco-maven-plugin</artifactId>
299+
<version>${jacoco-maven-plugin.version}</version>
300+
<executions>
301+
<execution>
302+
<id>default-prepare-agent</id>
303+
<goals>
304+
<goal>prepare-agent</goal>
305+
</goals>
306+
</execution>
307+
<execution>
308+
<id>report</id>
309+
<phase>test</phase>
310+
<goals>
311+
<goal>report</goal>
312+
</goals>
313+
<configuration>
314+
<outputDirectory>target/jacoco-report/</outputDirectory>
315+
</configuration>
316+
</execution>
317+
<execution>
318+
<id>check</id>
319+
<goals>
320+
<goal>check</goal>
321+
</goals>
322+
<configuration>
323+
<rules>
324+
<rule>
325+
<element>BUNDLE</element>
326+
<limits>
327+
<limit>
328+
<counter>LINE</counter>
329+
<value>COVEREDRATIO</value>
330+
<minimum>${jacoco-maven-plugin.coverage-ratio}</minimum>
331+
</limit>
332+
</limits>
333+
</rule>
334+
</rules>
335+
</configuration>
336+
</execution>
337+
</executions>
338+
</plugin>
177339
</plugins>
178340
</pluginManagement>
179341
<plugins>

sdk-tests/pom.xml

+68
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<logback-core.version>1.5.16</logback-core.version>
3434
<wiremock.version>3.9.1</wiremock.version>
3535
<testcontainers-test.version>1.20.0</testcontainers-test.version>
36+
37+
<!-- The JaCoCo plugin was expecting coverage for this module, but since it's a test module
38+
and code coverage typically doesn't apply to tests, the coverage is set to 0. -->
39+
<jacoco-maven-plugin.coverage-ratio>0%</jacoco-maven-plugin.coverage-ratio>
40+
<junit-platform.version>1.11.4</junit-platform.version>
3641
</properties>
3742

3843
<dependencyManagement>
@@ -45,6 +50,16 @@
4550
<type>pom</type>
4651
<scope>import</scope>
4752
</dependency>
53+
<dependency>
54+
<groupId>org.junit.platform</groupId>
55+
<artifactId>junit-platform-commons</artifactId>
56+
<version>${junit-platform.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.junit.platform</groupId>
60+
<artifactId>junit-platform-engine</artifactId>
61+
<version>${junit-platform.version}</version>
62+
</dependency>
4863
</dependencies>
4964
</dependencyManagement>
5065

@@ -235,10 +250,63 @@
235250
<artifactId>jakarta.servlet-api</artifactId>
236251
<scope>compile</scope>
237252
</dependency>
253+
<dependency>
254+
<groupId>org.junit.platform</groupId>
255+
<artifactId>junit-platform-commons</artifactId>
256+
<scope>test</scope>
257+
</dependency>
258+
<dependency>
259+
<groupId>org.junit.platform</groupId>
260+
<artifactId>junit-platform-engine</artifactId>
261+
<scope>test</scope>
262+
</dependency>
238263
</dependencies>
239264

240265
<build>
241266
<plugins>
267+
<plugin>
268+
<groupId>org.jacoco</groupId>
269+
<artifactId>jacoco-maven-plugin</artifactId>
270+
<version>${jacoco-maven-plugin.version}</version>
271+
<executions>
272+
<execution>
273+
<id>default-prepare-agent</id>
274+
<goals>
275+
<goal>prepare-agent</goal>
276+
</goals>
277+
</execution>
278+
<execution>
279+
<id>report</id>
280+
<phase>test</phase>
281+
<goals>
282+
<goal>report</goal>
283+
</goals>
284+
<configuration>
285+
<outputDirectory>target/jacoco-report/</outputDirectory>
286+
</configuration>
287+
</execution>
288+
<execution>
289+
<id>check</id>
290+
<goals>
291+
<goal>check</goal>
292+
</goals>
293+
<configuration>
294+
<rules>
295+
<rule>
296+
<element>BUNDLE</element>
297+
<limits>
298+
<limit>
299+
<counter>LINE</counter>
300+
<value>COVEREDRATIO</value>
301+
<minimum>${jacoco-maven-plugin.coverage-ratio}</minimum>
302+
</limit>
303+
</limits>
304+
</rule>
305+
</rules>
306+
</configuration>
307+
</execution>
308+
</executions>
309+
</plugin>
242310
<plugin>
243311
<groupId>com.github.os72</groupId>
244312
<artifactId>protoc-jar-maven-plugin</artifactId>

0 commit comments

Comments
 (0)