Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Add support for Liquibase #1118

Closed
joshlong opened this issue Sep 30, 2021 · 3 comments
Closed

Add support for Liquibase #1118

joshlong opened this issue Sep 30, 2021 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@joshlong
Copy link
Contributor

I'm working with @mraible on getting JHipster applications to work. One of the major obstacles we encountered was Liquibase. There was some work to get configuration into the Liquibase repository itself done more than 9 months ago. But it's been sitting on a branch and anyway it only gets us mostly across the finish line, not all the way. So, I propose we just add support for it now and then delete it when we don't need it. Here's the Spring Native hints version of all the configurations I've seen


@NativeHint(
	trigger = LiquibaseConfiguration.class,
	resources = {
		@ResourceHint(
			patterns = {
				"liquibase.build.properties",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.7.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.9.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.10.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.0.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.2.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.4.xsd",
				"www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-3.9.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-3.10.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-4.0.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-4.1.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-4.2.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-4.3.xsd",
				"www.liquibase.org/xml/ns/pro/liquibase-pro-4.4.xsd"
			},
			isBundle = false
		),
		@ResourceHint(patterns = {"com.sun.org.apache.xerces.internal.impl.xpath.regex.message", "liquibase/i18n/liquibase-core"}, isBundle = true)
	},
	types = @TypeHint(
		typeNames = {
			"com.sun.org.apache.xerces.internal.impl.dv.xs.ExtendedSchemaDVFactoryImpl",
			"com.sun.org.apache.xerces.internal.impl.dv.xs.SchemaDVFactoryImpl",
			"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl",
			"com.sun.xml.internal.stream.events.XMLEventFactoryImpl",
			"liquibase.AbstractExtensibleObject",
			"liquibase.change.AbstractChange",
			"liquibase.change.AbstractSQLChange",
			"liquibase.change.ChangeFactory",
			"liquibase.change.ColumnConfig",
			"liquibase.change.ConstraintsConfig",
			"liquibase.change.core.AbstractModifyDataChange",
			"liquibase.change.core.AddAutoIncrementChange",
			"liquibase.change.core.AddColumnChange",
			"liquibase.change.core.AddDefaultValueChange",
			"liquibase.change.core.AddForeignKeyConstraintChange",
			"liquibase.change.core.AddLookupTableChange",
			"liquibase.change.core.AddNotNullConstraintChange",
			"liquibase.change.core.AddPrimaryKeyChange",
			"liquibase.change.core.AddUniqueConstraintChange",
			"liquibase.change.core.AlterSequenceChange",
			"liquibase.change.core.CreateIndexChange",
			"liquibase.change.core.CreateProcedureChange",
			"liquibase.change.core.CreateSequenceChange",
			"liquibase.change.core.CreateTableChange",
			"liquibase.change.core.CreateViewChange",
			"liquibase.change.core.DeleteDataChange",
			"liquibase.change.core.DropAllForeignKeyConstraintsChange",
			"liquibase.change.core.DropColumnChange",
			"liquibase.change.core.DropDefaultValueChange",
			"liquibase.change.core.DropForeignKeyConstraintChange",
			"liquibase.change.core.DropIndexChange",
			"liquibase.change.core.DropNotNullConstraintChange",
			"liquibase.change.core.DropPrimaryKeyChange",
			"liquibase.change.core.DropProcedureChange",
			"liquibase.change.core.DropSequenceChange",
			"liquibase.change.core.DropTableChange",
			"liquibase.change.core.DropUniqueConstraintChange",
			"liquibase.change.core.DropViewChange",
			"liquibase.change.core.EmptyChange",
			"liquibase.change.core.ExecuteShellCommandChange",
			"liquibase.change.core.InsertDataChange",
			"liquibase.change.core.LoadDataChange",
			"liquibase.change.core.LoadUpdateDataChange",
			"liquibase.change.core.MergeColumnChange",
			"liquibase.change.core.ModifyDataTypeChange",
			"liquibase.change.core.OutputChange",
			"liquibase.change.core.RawSQLChange",
			"liquibase.change.core.RenameColumnChange",
			"liquibase.change.core.RenameSequenceChange",
			"liquibase.change.core.RenameTableChange",
			"liquibase.change.core.RenameViewChange",
			"liquibase.change.core.SQLFileChange",
			"liquibase.change.core.SetColumnRemarksChange",
			"liquibase.change.core.SetTableRemarksChange",
			"liquibase.change.core.StopChange",
			"liquibase.change.core.TagDatabaseChange",
			"liquibase.change.core.UpdateDataChange",
			"liquibase.change.custom.CustomChangeWrapper",
			"liquibase.changelog.StandardChangeLogHistoryService",
			"liquibase.configuration.GlobalConfiguration",
			"liquibase.configuration.HubConfiguration",
			"liquibase.database.core.H2Database",
			"liquibase.database.core.MariaDBDatabase",
			"liquibase.database.core.MSSQLDatabase",
			"liquibase.database.core.MySQLDatabase",
			"liquibase.database.core.OracleDatabase",
			"liquibase.database.core.PostgresDatabase",
			"liquibase.database.jvm.JdbcConnection",
			"liquibase.datatype.core.BigIntType",
			"liquibase.datatype.core.BlobType",
			"liquibase.datatype.core.BooleanType",
			"liquibase.datatype.core.CharType",
			"liquibase.datatype.core.ClobType",
			"liquibase.datatype.core.CurrencyType",
			"liquibase.datatype.core.DatabaseFunctionType",
			"liquibase.datatype.core.DateTimeType",
			"liquibase.datatype.core.DateType",
			"liquibase.datatype.core.DecimalType",
			"liquibase.datatype.core.DoubleType",
			"liquibase.datatype.core.FloatType",
			"liquibase.datatype.core.IntType",
			"liquibase.datatype.core.MediumIntType",
			"liquibase.datatype.core.NCharType",
			"liquibase.datatype.core.NumberType",
			"liquibase.datatype.core.NVarcharType",
			"liquibase.datatype.core.SmallIntType",
			"liquibase.datatype.core.TimestampType",
			"liquibase.datatype.core.TimeType",
			"liquibase.datatype.core.TinyIntType",
			"liquibase.datatype.core.UnknownType",
			"liquibase.datatype.core.UUIDType",
			"liquibase.datatype.core.VarcharType",
			"liquibase.datatype.core.XMLType",
			"liquibase.executor.ExecutorService",
			"liquibase.executor.jvm.JdbcExecutor",
			"liquibase.hub.HubServiceFactory",
			"liquibase.license.LicenseServiceFactory",
			"liquibase.lockservice.StandardLockService",
			"liquibase.logging.core.LogServiceFactory",
			"liquibase.parser.ChangeLogParserCofiguration",
			"liquibase.plugin.AbstractPlugin",
			"liquibase.serializer.AbstractLiquibaseSerializable",
			"liquibase.sql.visitor.AppendSqlVisitor",
			"liquibase.sql.visitor.PrependSqlVisitor",
			"liquibase.sql.visitor.RegExpReplaceSqlVisitor",
			"liquibase.sql.visitor.ReplaceSqlVisitor",
			"liquibase.changelog.RanChangeSet",
			"com.zaxxer.hikari.HikariConfig",
			"java.util.concurrent.CopyOnWriteArrayList",
			"java.sql.Statement[]",
			"com.zaxxer.hikari.HikariDataSource",
			"liquibase.configuration.LiquibaseConfiguration",
			"com.zaxxer.hikari.util.ConcurrentBag.IConcurrentBagEntry[]",
			"liquibase.change.core.LoadDataColumnConfig"},
		access = AccessBits.ALL
	),
	options = "--enable-url-protocols=http"
)
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 30, 2021
@joshlong
Copy link
Contributor Author

joshlong commented Sep 30, 2021

Here's an example of a Spring Native app with Liquibase that successfully compiles/runs with these hints in place, for reference

@snicoll snicoll changed the title Please support Liquibase with these custom hints Add support for Liquibase Oct 1, 2021
@sdeleuze
Copy link
Contributor

sdeleuze commented Oct 1, 2021

Thanks for your help on this, closing this one as duplicate of #620, where I will add a mention to the config you crafted here.

@sdeleuze sdeleuze closed this as completed Oct 1, 2021
@sdeleuze sdeleuze added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 1, 2021
@eiswind
Copy link

eiswind commented Oct 2, 2021

Nice work. In my case I had to add "liquibase.change.AddColumnConfig" to the reflection list to make it work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: duplicate A duplicate of another issue
Development

No branches or pull requests

4 participants