diff --git a/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java b/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java index 77f369b75fa..ca3f22d45b9 100644 --- a/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/client/vue/core/domain/VueModulesFactory.java @@ -3,7 +3,6 @@ import static tech.jhipster.lite.module.domain.JHipsterModule.*; import static tech.jhipster.lite.module.domain.npm.JHLiteNpmVersionSource.COMMON; import static tech.jhipster.lite.module.domain.npm.JHLiteNpmVersionSource.VUE; -import static tech.jhipster.lite.module.domain.replacement.ReplacementCondition.notContainingReplacement; import java.util.function.Consumer; import tech.jhipster.lite.module.domain.Indentation; @@ -12,7 +11,6 @@ import tech.jhipster.lite.module.domain.file.JHipsterSource; import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties; import tech.jhipster.lite.module.domain.replacement.MandatoryReplacer; -import tech.jhipster.lite.module.domain.replacement.TextReplacer; import tech.jhipster.lite.shared.error.domain.Assert; public class VueModulesFactory { @@ -142,7 +140,7 @@ private Consumer patchTsConfig(JHipsterModuleProperties p .add(text("@tsconfig/recommended/tsconfig.json"), "@vue/tsconfig/tsconfig.dom.json") .add(tsConfigCompilerOption("sourceMap", true, properties.indentation())) .add(tsConfigCompilerOption("allowJs", true, properties.indentation())) - .add(new TextReplacer(notContainingReplacement(), "\"types\": ["), "\"types\": [\"vite/client\", ") + .add(text("\"types\": ["), "\"types\": [\"vite/client\", ") .and() .and(); //@formatter:on @@ -159,7 +157,7 @@ private Consumer patchVitestConfig(JHipsterModuleProperti .mandatoryReplacements() .in(path("vitest.config.ts")) .add(lineAfterRegex("from 'vitest/config';"), "import vue from '@vitejs/plugin-vue';") - .add(new TextReplacer(notContainingReplacement(), "plugins: ["), "plugins: [vue(), ") + .add(text("plugins: ["), "plugins: [vue(), ") .add(text("environment: 'node',"), "environment: 'jsdom',") .add(vitestCoverageExclusion(properties,"src/main/webapp/**/*.component.ts")) .add(vitestCoverageExclusion(properties,"src/main/webapp/app/router.ts")) diff --git a/src/main/java/tech/jhipster/lite/generator/server/springboot/locale_profile/domain/LocalProfileModuleFactory.java b/src/main/java/tech/jhipster/lite/generator/server/springboot/locale_profile/domain/LocalProfileModuleFactory.java index 23416dc3f93..816bc55881d 100644 --- a/src/main/java/tech/jhipster/lite/generator/server/springboot/locale_profile/domain/LocalProfileModuleFactory.java +++ b/src/main/java/tech/jhipster/lite/generator/server/springboot/locale_profile/domain/LocalProfileModuleFactory.java @@ -1,14 +1,12 @@ package tech.jhipster.lite.generator.server.springboot.locale_profile.domain; import static tech.jhipster.lite.module.domain.JHipsterModule.*; -import static tech.jhipster.lite.module.domain.replacement.ReplacementCondition.notContainingReplacement; import tech.jhipster.lite.module.domain.JHipsterModule; import tech.jhipster.lite.module.domain.buildproperties.PropertyKey; import tech.jhipster.lite.module.domain.buildproperties.PropertyValue; import tech.jhipster.lite.module.domain.mavenplugin.MavenPlugin; import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties; -import tech.jhipster.lite.module.domain.replacement.TextReplacer; import tech.jhipster.lite.shared.error.domain.Assert; public class LocalProfileModuleFactory { @@ -58,12 +56,12 @@ public JHipsterModule buildModule(JHipsterModuleProperties properties) { .and() .optionalReplacements() .in(path(".github/workflows/github-actions.yml")) - .add(new TextReplacer(notContainingReplacement(), "./mvnw clean verify"), "./mvnw clean verify -P'!local'") - .add(new TextReplacer(notContainingReplacement(), "./gradlew clean integrationTest --no-daemon"), "./gradlew clean integrationTest -Pprofile=local --no-daemon") + .add(text("./mvnw clean verify"), "./mvnw clean verify -P'!local'") + .add(text("./gradlew clean integrationTest --no-daemon"), "./gradlew clean integrationTest -Pprofile=local --no-daemon") .and() .in(path(".gitlab-ci.yml")) - .add(new TextReplacer(notContainingReplacement(), "./mvnw clean verify"), "./mvnw clean verify -P'!local'") - .add(new TextReplacer(notContainingReplacement(), "./gradlew clean integrationTest $GRADLE_CLI_OPTS"), "./gradlew clean integrationTest -Pprofile=local $GRADLE_CLI_OPTS") + .add(text("./mvnw clean verify"), "./mvnw clean verify -P'!local'") + .add(text("./gradlew clean integrationTest $GRADLE_CLI_OPTS"), "./gradlew clean integrationTest -Pprofile=local $GRADLE_CLI_OPTS") .and() .and() .build();