Skip to content

Commit b20118b

Browse files
MelleDmacjohnny
authored andcommitted
java-springcloud: No dependency management if parent overridden (#3301)
* If a separate parent pom is specified, there should be no depdendency management #3230 * Add Bean Validation framework * Fix test and depedencies * Format pom
1 parent a48df10 commit b20118b

File tree

2 files changed

+22
-0
lines changed
  • modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud
  • samples/client/petstore/spring-cloud

2 files changed

+22
-0
lines changed

modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud/pom.mustache

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<sourceDirectory>src/main/java</sourceDirectory>
3030
</build>
3131

32+
{{^parentOverridden}}
3233
<dependencyManagement>
3334
<dependencies>
3435
<dependency>
@@ -41,11 +42,14 @@
4142
</dependencies>
4243
</dependencyManagement>
4344

45+
{{/parentOverridden}}
4446
<dependencies>
4547
<dependency>
4648
<groupId>io.swagger</groupId>
4749
<artifactId>swagger-annotations</artifactId>
50+
{{^parentOverridden}}
4851
<version>${swagger-core-version}</version>
52+
{{/parentOverridden}}
4953
</dependency>
5054
<!-- @Nullable annotation -->
5155
<dependency>
@@ -84,13 +88,17 @@
8488
<dependency>
8589
<groupId>com.github.joschi.jackson</groupId>
8690
<artifactId>jackson-datatype-threetenbp</artifactId>
91+
{{^parentOverridden}}
8792
<version>2.6.4</version>
93+
{{/parentOverridden}}
8894
</dependency>
8995
{{/threetenbp}}
9096
<dependency>
9197
<groupId>org.openapitools</groupId>
9298
<artifactId>jackson-databind-nullable</artifactId>
99+
{{^parentOverridden}}
93100
<version>0.1.0</version>
101+
{{/parentOverridden}}
94102
</dependency>
95103
<dependency>
96104
<groupId>org.springframework.boot</groupId>
@@ -104,5 +112,14 @@
104112
<artifactId>spring-boot-starter-hateoas</artifactId>
105113
</dependency>
106114
{{/hateoas}}
115+
{{#useBeanValidation}}
116+
<dependency>
117+
<groupId>org.hibernate.validator</groupId>
118+
<artifactId>hibernate-validator</artifactId>
119+
{{^parentOverridden}}
120+
<version>6.0.16.Final</version>
121+
{{/parentOverridden}}
122+
</dependency>
123+
{{/useBeanValidation}}
107124
</dependencies>
108125
</project>

samples/client/petstore/spring-cloud/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,10 @@
6666
<artifactId>spring-boot-starter-test</artifactId>
6767
<scope>test</scope>
6868
</dependency>
69+
<dependency>
70+
<groupId>org.hibernate.validator</groupId>
71+
<artifactId>hibernate-validator</artifactId>
72+
<version>6.0.16.Final</version>
73+
</dependency>
6974
</dependencies>
7075
</project>

0 commit comments

Comments
 (0)