Skip to content

Commit 6a17751

Browse files
authored
JAVA-39187: create parent-pom-2 and move sb2 modules (#1081)
1 parent 7b73245 commit 6a17751

File tree

6 files changed

+97
-38
lines changed

6 files changed

+97
-38
lines changed

kotlin-openapi/pom.xml

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,28 @@
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5-
<groupId>com.baeldung</groupId>
65
<artifactId>kotlin-openapi</artifactId>
76
<name>kotlin-openapi</name>
87
<version>0.0.1-SNAPSHOT</version>
98

9+
<parent>
10+
<groupId>com.baeldung</groupId>
11+
<artifactId>parent-boot-2</artifactId>
12+
<version>1.0.0-SNAPSHOT</version>
13+
<relativePath>../parent-boot-2</relativePath>
14+
</parent>
1015

1116
<dependencies>
1217
<dependency>
1318
<groupId>org.springframework.boot</groupId>
1419
<artifactId>spring-boot-starter-web</artifactId>
1520
<version>${spring-boot.version}</version>
1621
</dependency>
17-
<dependency>
18-
<groupId>com.fasterxml.jackson.module</groupId>
19-
<artifactId>jackson-module-kotlin</artifactId>
20-
<version>${jackson-module-kotlin.version}</version>
21-
</dependency>
22+
<!-- <dependency>-->
23+
<!-- <groupId>com.fasterxml.jackson.module</groupId>-->
24+
<!-- <artifactId>jackson-module-kotlin</artifactId>-->
25+
<!-- <version>${jackson-module-kotlin.version}</version>-->
26+
<!-- </dependency>-->
2227
<dependency>
2328
<groupId>org.jetbrains.kotlin</groupId>
2429
<artifactId>kotlin-reflect</artifactId>
@@ -29,11 +34,6 @@
2934
<artifactId>kotlin-stdlib</artifactId>
3035
<version>${kotlin.version}</version>
3136
</dependency>
32-
<dependency>
33-
<groupId>javax.validation</groupId>
34-
<artifactId>validation-api</artifactId>
35-
<version>${validation-api.version}</version>
36-
</dependency>
3737
<dependency>
3838
<groupId>org.springdoc</groupId>
3939
<artifactId>springdoc-openapi-data-rest</artifactId>
@@ -49,24 +49,6 @@
4949
<artifactId>springdoc-openapi-kotlin</artifactId>
5050
<version>${spring-doc.version}</version>
5151
</dependency>
52-
<dependency>
53-
<groupId>com.squareup.moshi</groupId>
54-
<artifactId>moshi-kotlin</artifactId>
55-
<version>${moshi.version}</version>
56-
<scope>test</scope>
57-
</dependency>
58-
<dependency>
59-
<groupId>com.squareup.moshi</groupId>
60-
<artifactId>moshi-adapters</artifactId>
61-
<version>${moshi.version}</version>
62-
<scope>test</scope>
63-
</dependency>
64-
<dependency>
65-
<groupId>com.squareup.okhttp3</groupId>
66-
<artifactId>okhttp</artifactId>
67-
<version>${okhttp.version}</version>
68-
<scope>test</scope>
69-
</dependency>
7052
<dependency>
7153
<groupId>org.springframework.boot</groupId>
7254
<artifactId>spring-boot-test</artifactId>
@@ -151,13 +133,8 @@
151133

152134
<properties>
153135
<kotlin.version>1.9.24</kotlin.version>
154-
<spring-boot.version>2.7.18</spring-boot.version>
155136
<openapi-generator-maven-plugin.version>7.6.0</openapi-generator-maven-plugin.version>
156137
<spring-doc.version>1.8.0</spring-doc.version>
157-
<jackson-module-kotlin.version>2.17.1</jackson-module-kotlin.version>
158-
<okhttp.version>4.9.3</okhttp.version>
159-
<moshi.version>1.13.0</moshi.version>
160-
<validation-api.version>2.0.1.Final</validation-api.version>
161138
</properties>
162139

163140
</project>

kotlin-openapi/src/main/kotlin/com/baeldung/openapi/KotlinGradleOpenapiApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ class KotlinGradleOpenapiApplication
88

99
fun main(args: Array<String>) {
1010
runApplication<KotlinGradleOpenapiApplication>(*args)
11-
}
11+
}

kotlin-self-executable-jar/kotlin-spring-executable/pom.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@
136136
</build>
137137

138138
<properties>
139-
<spring-boot.version>2.6.6</spring-boot.version>
140-
<kotlin.version>1.8.0</kotlin.version>
141-
<java.version>11</java.version>
139+
<kotlin.version>1.8.22</kotlin.version> <!-- Updating to latest Kotlin version breaks test -->
142140
</properties>
143141

144142
</project>

kotlin-self-executable-jar/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
<version>1.0-SNAPSHOT</version>
77
<packaging>pom</packaging>
88

9+
<parent>
10+
<groupId>com.baeldung</groupId>
11+
<artifactId>parent-boot-2</artifactId>
12+
<version>1.0.0-SNAPSHOT</version>
13+
<relativePath>../parent-boot-2</relativePath>
14+
</parent>
15+
916
<modules>
1017
<module>kotlin-executable-jar</module>
1118
<module>kotlin-spring-executable</module>

parent-boot-2/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Parent Boot 2
2+
3+
This is a parent module for all projects using Spring Boot 2.

parent-boot-2/pom.xml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<groupId>com.baeldung</groupId>
8+
<artifactId>parent-boot-2</artifactId>
9+
<name>parent-boot-2</name>
10+
<version>1.0.0-SNAPSHOT</version>
11+
<packaging>pom</packaging>
12+
<description>Parent for all Spring Boot 2 modules</description>
13+
14+
<dependencyManagement>
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.springframework.boot</groupId>
18+
<artifactId>spring-boot-dependencies</artifactId>
19+
<version>${spring-boot.version}</version>
20+
<type>pom</type>
21+
<scope>import</scope>
22+
</dependency>
23+
</dependencies>
24+
</dependencyManagement>
25+
<dependencies>
26+
<dependency>
27+
<groupId>io.rest-assured</groupId>
28+
<artifactId>rest-assured</artifactId>
29+
<version>${rest-assured.version}</version>
30+
</dependency>
31+
<dependency>
32+
<groupId>org.springframework.boot</groupId>
33+
<artifactId>spring-boot-starter-test</artifactId>
34+
<scope>test</scope>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<pluginManagement>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-maven-plugin</artifactId>
44+
<version>${spring-boot.version}</version>
45+
<configuration>
46+
<mainClass>${start-class}</mainClass>
47+
<!-- this is necessary as we're not using the Boot parent -->
48+
</configuration>
49+
</plugin>
50+
</plugins>
51+
</pluginManagement>
52+
</build>
53+
54+
<profiles>
55+
<profile>
56+
<id>thin-jar</id>
57+
<build>
58+
<plugins>
59+
<plugin>
60+
<groupId>org.springframework.boot</groupId>
61+
<artifactId>spring-boot-maven-plugin</artifactId>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
</profile>
66+
</profiles>
67+
68+
<properties>
69+
<rest-assured.version>3.3.0</rest-assured.version>
70+
<java.version>17</java.version>
71+
<spring-boot.version>2.7.18</spring-boot.version>
72+
</properties>
73+
74+
</project>

0 commit comments

Comments
 (0)