Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix maven liquibase execution #22737

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions generators/app/__snapshots__/generator.spec.mts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ exports[`generator - app with default config should match snapshot 1`] = `
"gradle-liquibase": "'GRADLE-LIQUIBASE-VERSION'",
"gradle-modernizer-plugin": "'GRADLE-MODERNIZER-PLUGIN-VERSION'",
"gradle-sonarqube": "'GRADLE-SONARQUBE-VERSION'",
"h2": "'H-2-VERSION'",
"hazelcast-hibernate53": "'HAZELCAST-HIBERNATE-53-VERSION'",
"hazelcast-spring": "'HAZELCAST-SPRING-VERSION'",
"hibernate": "'HIBERNATE-VERSION'",
Expand Down Expand Up @@ -875,6 +876,7 @@ exports[`generator - app with gateway should match snapshot 1`] = `
"gradle-liquibase": "'GRADLE-LIQUIBASE-VERSION'",
"gradle-modernizer-plugin": "'GRADLE-MODERNIZER-PLUGIN-VERSION'",
"gradle-sonarqube": "'GRADLE-SONARQUBE-VERSION'",
"h2": "'H-2-VERSION'",
"hazelcast-hibernate53": "'HAZELCAST-HIBERNATE-53-VERSION'",
"hazelcast-spring": "'HAZELCAST-SPRING-VERSION'",
"hibernate": "'HIBERNATE-VERSION'",
Expand Down Expand Up @@ -1412,6 +1414,7 @@ exports[`generator - app with microservice should match snapshot 1`] = `
"gradle-liquibase": "'GRADLE-LIQUIBASE-VERSION'",
"gradle-modernizer-plugin": "'GRADLE-MODERNIZER-PLUGIN-VERSION'",
"gradle-sonarqube": "'GRADLE-SONARQUBE-VERSION'",
"h2": "'H-2-VERSION'",
"hazelcast-hibernate53": "'HAZELCAST-HIBERNATE-53-VERSION'",
"hazelcast-spring": "'HAZELCAST-SPRING-VERSION'",
"hibernate": "'HIBERNATE-VERSION'",
Expand Down
2 changes: 2 additions & 0 deletions generators/liquibase/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export default class LiquibaseGenerator extends BaseApplicationGenerator {
properties: [
{ property: 'liquibase-plugin.hibernate-dialect' },
{ property: 'liquibase-plugin.driver' },
{ property: 'h2.version', value: application.javaDependencies.h2 },
{ inProfile: 'dev', property: 'liquibase-plugin.hibernate-dialect', value: applicationAny.devHibernateDialect },
{ inProfile: 'prod', property: 'liquibase-plugin.hibernate-dialect', value: applicationAny.prodHibernateDialect },
{ inProfile: 'dev', property: 'liquibase-plugin.driver', value: applicationAny.devJdbcDriver },
Expand Down Expand Up @@ -262,6 +263,7 @@ export default class LiquibaseGenerator extends BaseApplicationGenerator {
devDatabaseTypeH2Any: applicationAny.devDatabaseTypeH2Any,
driver: liquibasePluginJdbcDriver,
hibernateDialect: liquibasePluginHibernateDialect,
defaultSchemaName: application.liquibaseDefaultSchemaName,
// eslint-disable-next-line no-template-curly-in-string
url: '${liquibase-plugin.url}',
// eslint-disable-next-line no-template-curly-in-string
Expand Down
3 changes: 2 additions & 1 deletion generators/liquibase/support/maven-plugin.mts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function mavenPluginContent({
// prettier-ignore
return `
<configuration>
<changeLogFile>\${project.basedir}/${srcMainResources}config/liquibase/master.xml</changeLogFile>
<changeLogFile>config/liquibase/master.xml</changeLogFile>
<diffChangeLogFile>\${project.basedir}/${srcMainResources}config/liquibase/changelog/\${maven.build.timestamp}_changelog.xml</diffChangeLogFile>
<driver>${driver}</driver>
<url>${url}</url>
Expand Down Expand Up @@ -51,6 +51,7 @@ export default function mavenPluginContent({
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>\${h2.version}</version>
</dependency>`: ''}
</dependencies>`;
}
8 changes: 7 additions & 1 deletion generators/server/resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<blockhound-junit-platform.version>1.0.8.RELEASE</blockhound-junit-platform.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version>
<gatling.version>3.9.5</gatling.version>
<h2.version>2.1.214</h2.version>
<hazelcast-hibernate53.version>5.1.0</hazelcast-hibernate53.version>
<hazelcast-spring.version>5.3.1</hazelcast-spring.version>
<jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version>
Expand All @@ -24,7 +25,7 @@
<picocli.version>4.7.4</picocli.version>
<spring-pulsar.version>0.2.0</spring-pulsar.version>
<typesafe.version>1.4.2</typesafe.version>
<validation-api.version>3.0.2.Final</validation-api.version>
<validation-api.version>3.0.2</validation-api.version>

<!-- Plugin versions -->
<checkstyle.version>10.12.1</checkstyle.version>
Expand Down Expand Up @@ -88,6 +89,11 @@
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
Expand Down