Skip to content

Commit 806e4d1

Browse files
authored
Merge pull request #31615 from gsmet/liquibase-4.9.1
Upgrade to Liquibase 4.19.1
2 parents 8e7ca48 + cf6bf24 commit 806e4d1

File tree

3 files changed

+57
-25
lines changed

3 files changed

+57
-25
lines changed

bom/application/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
<jboss-logmanager.version>1.1.1</jboss-logmanager.version>
168168
<flyway.version>9.15.1</flyway.version>
169169
<yasson.version>3.0.2</yasson.version>
170-
<liquibase.version>4.19.0</liquibase.version>
170+
<liquibase.version>4.19.1</liquibase.version>
171171
<snakeyaml.version>1.33</snakeyaml.version>
172172
<osgi.version>6.0.0</osgi.version>
173173
<mongo-client.version>4.9.0</mongo-client.version>
@@ -5690,6 +5690,12 @@
56905690
<groupId>org.liquibase.ext</groupId>
56915691
<artifactId>liquibase-mongodb</artifactId>
56925692
<version>${liquibase.version}</version>
5693+
<exclusions>
5694+
<exclusion>
5695+
<groupId>org.codehaus.groovy</groupId>
5696+
<artifactId>groovy-all</artifactId>
5697+
</exclusion>
5698+
</exclusions>
56935699
</dependency>
56945700
<dependency>
56955701
<groupId>org.yaml</groupId>

extensions/liquibase-mongodb/deployment/src/main/java/io/quarkus/liquibase/mongodb/deployment/LiquibaseMongodbProcessor.java

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@ void nativeImageConfiguration(
9797
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem(
9898
liquibase.sqlgenerator.core.LockDatabaseChangeLogGenerator.class.getName()));
9999

100-
reflective.produce(new ReflectiveClassBuildItem(false, true, false,
100+
reflective.produce(ReflectiveClassBuildItem.builder(
101101
liquibase.change.AbstractSQLChange.class.getName(),
102-
liquibase.database.jvm.JdbcConnection.class.getName()));
102+
liquibase.database.jvm.JdbcConnection.class.getName())
103+
.methods().build());
103104

104-
reflective.produce(new ReflectiveClassBuildItem(true, true, true,
105+
reflective.produce(ReflectiveClassBuildItem.builder(
105106
liquibase.parser.ChangeLogParserConfiguration.class.getName(),
106107
liquibase.hub.HubServiceFactory.class.getName(),
107108
liquibase.logging.core.DefaultLoggerConfiguration.class.getName(),
@@ -121,10 +122,13 @@ void nativeImageConfiguration(
121122
liquibase.sql.visitor.AppendSqlVisitor.class.getName(),
122123
liquibase.sql.visitor.RegExpReplaceSqlVisitor.class.getName(),
123124
liquibase.ext.mongodb.database.MongoClientDriver.class.getName(),
124-
liquibase.resource.PathHandlerFactory.class.getName()));
125+
liquibase.resource.PathHandlerFactory.class.getName(),
126+
liquibase.logging.mdc.MdcManagerFactory.class.getName())
127+
.constructors().methods().fields().build());
125128

126-
reflective.produce(new ReflectiveClassBuildItem(false, false, true,
127-
liquibase.change.ConstraintsConfig.class.getName()));
129+
reflective.produce(ReflectiveClassBuildItem.builder(
130+
liquibase.change.ConstraintsConfig.class.getName())
131+
.fields().build());
128132

129133
// register classes marked with @DatabaseChangeProperty for reflection
130134
Set<String> classesMarkedWithDatabaseChangeProperty = new HashSet<>();
@@ -137,7 +141,8 @@ void nativeImageConfiguration(
137141
}
138142
}
139143
reflective.produce(
140-
new ReflectiveClassBuildItem(true, true, true, classesMarkedWithDatabaseChangeProperty.toArray(new String[0])));
144+
ReflectiveClassBuildItem.builder(classesMarkedWithDatabaseChangeProperty.toArray(new String[0]))
145+
.constructors().methods().fields().build());
141146

142147
resource.produce(
143148
new NativeImageResourceBuildItem(getChangeLogs(liquibaseBuildConfig).toArray(new String[0])));
@@ -164,7 +169,8 @@ void nativeImageConfiguration(
164169
liquibase.snapshot.SnapshotGenerator.class,
165170
liquibase.sqlgenerator.SqlGenerator.class,
166171
liquibase.structure.DatabaseObject.class,
167-
liquibase.hub.HubService.class)
172+
liquibase.hub.HubService.class,
173+
liquibase.logging.mdc.MdcManager.class)
168174
.forEach(t -> addService(services, reflective, t, false));
169175

170176
// Register Precondition services, and the implementation class for reflection while also registering fields for reflection
@@ -184,6 +190,11 @@ void nativeImageConfiguration(
184190
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.12.xsd",
185191
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.13.xsd",
186192
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.14.xsd",
193+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.15.xsd",
194+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.16.xsd",
195+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd",
196+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.18.xsd",
197+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.19.xsd",
187198
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd",
188199
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd",
189200
"liquibase.build.properties"));
@@ -205,8 +216,9 @@ private void addService(BuildProducer<ServiceProviderBuildItem> services,
205216
}
206217
services.produce(new ServiceProviderBuildItem(serviceClass.getName(), implementations.toArray(new String[0])));
207218

208-
reflective.produce(new ReflectiveClassBuildItem(true, true, shouldRegisterFieldForReflection,
209-
implementations.toArray(new String[0])));
219+
reflective.produce(ReflectiveClassBuildItem.builder(
220+
implementations.toArray(new String[0]))
221+
.constructors().methods().fields(shouldRegisterFieldForReflection).build());
210222
} catch (IOException ex) {
211223
throw new IllegalStateException(ex);
212224
}

extensions/liquibase/deployment/src/main/java/io/quarkus/liquibase/deployment/LiquibaseProcessor.java

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,16 @@ void nativeImageConfiguration(
118118
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem(
119119
liquibase.sqlgenerator.core.LockDatabaseChangeLogGenerator.class.getName()));
120120

121-
reflective.produce(new ReflectiveClassBuildItem(false, true, false,
122-
liquibase.change.AbstractSQLChange.class.getName(),
123-
liquibase.database.jvm.JdbcConnection.class.getName()));
121+
reflective.produce(ReflectiveClassBuildItem
122+
.builder(liquibase.change.AbstractSQLChange.class, liquibase.database.jvm.JdbcConnection.class).methods()
123+
.build());
124124

125-
reflective.produce(new ReflectiveClassBuildItem(true, false, false, "liquibase.command.LiquibaseCommandFactory",
126-
liquibase.command.CommandFactory.class.getName()));
125+
reflective.produce(ReflectiveClassBuildItem
126+
.builder("liquibase.command.LiquibaseCommandFactory",
127+
liquibase.command.CommandFactory.class.getName())
128+
.constructors().build());
127129

128-
reflective.produce(new ReflectiveClassBuildItem(true, true, true,
130+
reflective.produce(ReflectiveClassBuildItem.builder(
129131
liquibase.parser.ChangeLogParserConfiguration.class.getName(),
130132
liquibase.hub.HubServiceFactory.class.getName(),
131133
liquibase.logging.core.DefaultLoggerConfiguration.class.getName(),
@@ -142,10 +144,13 @@ void nativeImageConfiguration(
142144
liquibase.sql.visitor.ReplaceSqlVisitor.class.getName(),
143145
liquibase.sql.visitor.AppendSqlVisitor.class.getName(),
144146
liquibase.sql.visitor.RegExpReplaceSqlVisitor.class.getName(),
145-
liquibase.resource.PathHandlerFactory.class.getName()));
147+
liquibase.resource.PathHandlerFactory.class.getName(),
148+
liquibase.logging.mdc.MdcManagerFactory.class.getName())
149+
.constructors().methods().fields().build());
146150

147-
reflective.produce(new ReflectiveClassBuildItem(false, false, true,
148-
liquibase.change.ConstraintsConfig.class.getName()));
151+
reflective.produce(ReflectiveClassBuildItem.builder(
152+
liquibase.change.ConstraintsConfig.class.getName())
153+
.fields().build());
149154

150155
// register classes marked with @DatabaseChangeProperty for reflection
151156
Set<String> classesMarkedWithDatabaseChangeProperty = new HashSet<>();
@@ -158,7 +163,8 @@ void nativeImageConfiguration(
158163
}
159164
}
160165
reflective.produce(
161-
new ReflectiveClassBuildItem(true, true, true, classesMarkedWithDatabaseChangeProperty.toArray(new String[0])));
166+
ReflectiveClassBuildItem.builder(classesMarkedWithDatabaseChangeProperty.toArray(new String[0]))
167+
.constructors().methods().fields().build());
162168

163169
Collection<String> dataSourceNames = jdbcDataSourceBuildItems.stream()
164170
.map(JdbcDataSourceBuildItem::getName)
@@ -189,17 +195,20 @@ void nativeImageConfiguration(
189195
liquibase.snapshot.SnapshotGenerator.class,
190196
liquibase.sqlgenerator.SqlGenerator.class,
191197
liquibase.structure.DatabaseObject.class,
192-
liquibase.hub.HubService.class)
198+
liquibase.hub.HubService.class,
199+
liquibase.logging.mdc.MdcManager.class)
193200
.forEach(t -> consumeService(t, (serviceClass, implementations) -> {
194201
services.produce(
195202
new ServiceProviderBuildItem(serviceClass.getName(), implementations.toArray(new String[0])));
196-
reflective.produce(new ReflectiveClassBuildItem(true, true, false, implementations.toArray(new String[0])));
203+
reflective.produce(ReflectiveClassBuildItem.builder(implementations.toArray(new String[0]))
204+
.constructors().methods().build());
197205
}));
198206

199207
// Register Precondition services, and the implementation class for reflection while also registering fields for reflection
200208
consumeService(liquibase.precondition.Precondition.class, (serviceClass, implementations) -> {
201209
services.produce(new ServiceProviderBuildItem(serviceClass.getName(), implementations.toArray(new String[0])));
202-
reflective.produce(new ReflectiveClassBuildItem(true, true, true, implementations.toArray(new String[0])));
210+
reflective.produce(ReflectiveClassBuildItem.builder(implementations.toArray(new String[0]))
211+
.constructors().methods().fields().build());
203212
});
204213

205214
// CommandStep implementations are needed
@@ -208,7 +217,7 @@ void nativeImageConfiguration(
208217
.filter(not("liquibase.command.core.StartH2CommandStep"::equals))
209218
.toArray(String[]::new);
210219
services.produce(new ServiceProviderBuildItem(serviceClass.getName(), filteredImpls));
211-
reflective.produce(new ReflectiveClassBuildItem(true, false, false, filteredImpls));
220+
reflective.produce(ReflectiveClassBuildItem.builder(filteredImpls).constructors().build());
212221
for (String implementation : filteredImpls) {
213222
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem(implementation));
214223
}
@@ -224,6 +233,11 @@ void nativeImageConfiguration(
224233
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.12.xsd",
225234
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.13.xsd",
226235
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.14.xsd",
236+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.15.xsd",
237+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.16.xsd",
238+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.17.xsd",
239+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.18.xsd",
240+
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.19.xsd",
227241
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd",
228242
"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd",
229243
"liquibase.build.properties"));

0 commit comments

Comments
 (0)