Skip to content

Commit 7181661

Browse files
committed
adjusts
1 parent a858cd6 commit 7181661

File tree

2 files changed

+52
-62
lines changed

2 files changed

+52
-62
lines changed

generators/spring-cache/__snapshots__/generator.spec.ts.snap

Lines changed: 48 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ exports[`generator - spring-cache caffeine-gradle should match source calls 1`]
4646
},
4747
{
4848
"dependencies": [
49+
{
50+
"artifactId": "spring-boot-starter-cache",
51+
"groupId": "org.springframework.boot",
52+
},
4953
{
5054
"artifactId": "cache-api",
5155
"groupId": "javax.cache",
@@ -76,11 +80,6 @@ exports[`generator - spring-cache caffeine-gradle should match source calls 1`]
7680
},
7781
],
7882
],
79-
"addSpringBootModule": [
80-
[
81-
"spring-boot-starter-cache",
82-
],
83-
],
8483
"ignoreSonarRule": [
8584
{
8685
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -118,6 +117,10 @@ exports[`generator - spring-cache caffeine-maven should match source calls 1`] =
118117
},
119118
{
120119
"dependencies": [
120+
{
121+
"artifactId": "spring-boot-starter-cache",
122+
"groupId": "org.springframework.boot",
123+
},
121124
{
122125
"artifactId": "cache-api",
123126
"groupId": "javax.cache",
@@ -148,11 +151,6 @@ exports[`generator - spring-cache caffeine-maven should match source calls 1`] =
148151
},
149152
],
150153
],
151-
"addSpringBootModule": [
152-
[
153-
"spring-boot-starter-cache",
154-
],
155-
],
156154
"ignoreSonarRule": [
157155
{
158156
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -198,6 +196,10 @@ exports[`generator - spring-cache ehcache-gradle should match source calls 1`] =
198196
},
199197
{
200198
"dependencies": [
199+
{
200+
"artifactId": "spring-boot-starter-cache",
201+
"groupId": "org.springframework.boot",
202+
},
201203
{
202204
"artifactId": "cache-api",
203205
"groupId": "javax.cache",
@@ -220,11 +222,6 @@ exports[`generator - spring-cache ehcache-gradle should match source calls 1`] =
220222
},
221223
],
222224
],
223-
"addSpringBootModule": [
224-
[
225-
"spring-boot-starter-cache",
226-
],
227-
],
228225
"ignoreSonarRule": [
229226
{
230227
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -262,6 +259,10 @@ exports[`generator - spring-cache ehcache-maven should match source calls 1`] =
262259
},
263260
{
264261
"dependencies": [
262+
{
263+
"artifactId": "spring-boot-starter-cache",
264+
"groupId": "org.springframework.boot",
265+
},
265266
{
266267
"artifactId": "cache-api",
267268
"groupId": "javax.cache",
@@ -284,11 +285,6 @@ exports[`generator - spring-cache ehcache-maven should match source calls 1`] =
284285
},
285286
],
286287
],
287-
"addSpringBootModule": [
288-
[
289-
"spring-boot-starter-cache",
290-
],
291-
],
292288
"ignoreSonarRule": [
293289
{
294290
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -354,6 +350,10 @@ exports[`generator - spring-cache hazelcast-gradle should match source calls 1`]
354350
},
355351
{
356352
"dependencies": [
353+
{
354+
"artifactId": "spring-boot-starter-cache",
355+
"groupId": "org.springframework.boot",
356+
},
357357
{
358358
"artifactId": "cache-api",
359359
"groupId": "javax.cache",
@@ -377,11 +377,6 @@ exports[`generator - spring-cache hazelcast-gradle should match source calls 1`]
377377
},
378378
],
379379
],
380-
"addSpringBootModule": [
381-
[
382-
"spring-boot-starter-cache",
383-
],
384-
],
385380
"ignoreSonarRule": [
386381
{
387382
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -419,6 +414,10 @@ exports[`generator - spring-cache hazelcast-maven should match source calls 1`]
419414
},
420415
{
421416
"dependencies": [
417+
{
418+
"artifactId": "spring-boot-starter-cache",
419+
"groupId": "org.springframework.boot",
420+
},
422421
{
423422
"artifactId": "cache-api",
424423
"groupId": "javax.cache",
@@ -442,11 +441,6 @@ exports[`generator - spring-cache hazelcast-maven should match source calls 1`]
442441
},
443442
],
444443
],
445-
"addSpringBootModule": [
446-
[
447-
"spring-boot-starter-cache",
448-
],
449-
],
450444
"ignoreSonarRule": [
451445
{
452446
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -492,6 +486,10 @@ exports[`generator - spring-cache infinispan-gradle should match source calls 1`
492486
},
493487
{
494488
"dependencies": [
489+
{
490+
"artifactId": "spring-boot-starter-cache",
491+
"groupId": "org.springframework.boot",
492+
},
495493
{
496494
"artifactId": "cache-api",
497495
"groupId": "javax.cache",
@@ -528,11 +526,6 @@ exports[`generator - spring-cache infinispan-gradle should match source calls 1`
528526
},
529527
],
530528
],
531-
"addSpringBootModule": [
532-
[
533-
"spring-boot-starter-cache",
534-
],
535-
],
536529
"ignoreSonarRule": [
537530
{
538531
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -570,6 +563,10 @@ exports[`generator - spring-cache infinispan-maven should match source calls 1`]
570563
},
571564
{
572565
"dependencies": [
566+
{
567+
"artifactId": "spring-boot-starter-cache",
568+
"groupId": "org.springframework.boot",
569+
},
573570
{
574571
"artifactId": "cache-api",
575572
"groupId": "javax.cache",
@@ -606,11 +603,6 @@ exports[`generator - spring-cache infinispan-maven should match source calls 1`]
606603
},
607604
],
608605
],
609-
"addSpringBootModule": [
610-
[
611-
"spring-boot-starter-cache",
612-
],
613-
],
614606
"ignoreSonarRule": [
615607
{
616608
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -656,6 +648,10 @@ exports[`generator - spring-cache memcached-gradle should match source calls 1`]
656648
},
657649
{
658650
"dependencies": [
651+
{
652+
"artifactId": "spring-boot-starter-cache",
653+
"groupId": "org.springframework.boot",
654+
},
659655
{
660656
"artifactId": "cache-api",
661657
"groupId": "javax.cache",
@@ -688,11 +684,6 @@ exports[`generator - spring-cache memcached-gradle should match source calls 1`]
688684
},
689685
],
690686
],
691-
"addSpringBootModule": [
692-
[
693-
"spring-boot-starter-cache",
694-
],
695-
],
696687
"ignoreSonarRule": [
697688
{
698689
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -730,6 +721,10 @@ exports[`generator - spring-cache memcached-maven should match source calls 1`]
730721
},
731722
{
732723
"dependencies": [
724+
{
725+
"artifactId": "spring-boot-starter-cache",
726+
"groupId": "org.springframework.boot",
727+
},
733728
{
734729
"artifactId": "cache-api",
735730
"groupId": "javax.cache",
@@ -762,11 +757,6 @@ exports[`generator - spring-cache memcached-maven should match source calls 1`]
762757
},
763758
],
764759
],
765-
"addSpringBootModule": [
766-
[
767-
"spring-boot-starter-cache",
768-
],
769-
],
770760
"ignoreSonarRule": [
771761
{
772762
"comment": "Rule https://rules.sonarsource.com/java/RSPEC-1192, there is no easy way to avoid this issue",
@@ -821,6 +811,10 @@ exports[`generator - spring-cache redis-gradle should match source calls 1`] = `
821811
},
822812
{
823813
"dependencies": [
814+
{
815+
"artifactId": "spring-boot-starter-cache",
816+
"groupId": "org.springframework.boot",
817+
},
824818
{
825819
"artifactId": "junit-jupiter",
826820
"groupId": "org.testcontainers",
@@ -849,11 +843,6 @@ exports[`generator - spring-cache redis-gradle should match source calls 1`] = `
849843
},
850844
],
851845
],
852-
"addSpringBootModule": [
853-
[
854-
"spring-boot-starter-cache",
855-
],
856-
],
857846
"addTestSpringFactory": [
858847
{
859848
"key": "org.springframework.test.context.ContextCustomizerFactory",
@@ -906,6 +895,10 @@ exports[`generator - spring-cache redis-maven should match source calls 1`] = `
906895
},
907896
{
908897
"dependencies": [
898+
{
899+
"artifactId": "spring-boot-starter-cache",
900+
"groupId": "org.springframework.boot",
901+
},
909902
{
910903
"artifactId": "junit-jupiter",
911904
"groupId": "org.testcontainers",
@@ -934,11 +927,6 @@ exports[`generator - spring-cache redis-maven should match source calls 1`] = `
934927
},
935928
],
936929
],
937-
"addSpringBootModule": [
938-
[
939-
"spring-boot-starter-cache",
940-
],
941-
],
942930
"addTestSpringFactory": [
943931
{
944932
"key": "org.springframework.test.context.ContextCustomizerFactory",

generators/spring-cache/generator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,15 @@ export default class SpringCacheGenerator extends BaseApplicationGenerator<
170170
}
171171
const { javaDependencies, cacheProvider, enableHibernateCache } = application;
172172

173-
source.addSpringBootModule?.(['spring-boot-starter-cache']);
174173
const definition = getCacheProviderMavenDefinition(cacheProvider!, javaDependencies);
175174
source.addJavaDefinitions?.(
176175
{ gradleFile: 'buildSrc/src/main/groovy/jhipster.spring-cache-conventions.gradle' },
177176
{
178177
...definition.base,
179-
dependencies: [...definition.base.dependencies],
178+
dependencies: [
179+
{ groupId: 'org.springframework.boot', artifactId: 'spring-boot-starter-cache' },
180+
...definition.base.dependencies,
181+
],
180182
},
181183
{
182184
condition: Boolean(enableHibernateCache && definition.hibernateCache),

0 commit comments

Comments
 (0)