Я хочу использовать Liquibase для своих миграций, но всякий раз, когда я пытаюсь запустить какой-либо задач Liquibase, говорится
Код: Выделить всё
Liquibase-core was not found not found in the liquibaseRuntime configuration!Код: Выделить всё
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.liquibase.gradle' version '2.2.0'
}
group = 'com.ywa'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '21'
targetCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'io.jsonwebtoken:jjwt-orgjson:0.11.5'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
implementation 'io.jsonwebtoken:jjwt-impl:0.11.5'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.postgresql:postgresql'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
implementation 'org.postgresql:postgresql'
implementation 'org.liquibase:liquibase-core:4.20.0'
}
//tasks.named('test') {
// useJUnitPlatform()
//} (commented the tests to be able to be able to run at least the "gradle clean" and "gradle build" tasks
Также, если это необходимо, вот мои файлы liquibase.properties и application.properties, а также изображение того, как выглядит проект:
Код: Выделить всё
liquibase.propertiesКод: Выделить всё
changeLogFile=classpath:db/changelog/db.changelog-master.yaml
url=jdbc:postgresql://localhost:5431/dml-local-db
username=user
password=password
driver=org.postgresql.Driver
Код: Выделить всё
application.propertiesКод: Выделить всё
#--Local host for devs--
spring.datasource.url= jdbc:postgresql://localhost:5431/dml-local-db
spring.datasource.username= user
spring.datasource.password= password
spring.liquibase.enabled= true
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation= true
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=validate
# App Properties
dml.app.jwtSecret= mysecret
dml.app.jwtExpirationMs= 3600000
dml.app.jwtRefreshExpirationMs= 86400000
## For test
#dml.app.jwtExpirationMs= 60000
#dml.app.jwtRefreshExpirationMs= 120000

Подробнее здесь: https://stackoverflow.com/questions/777 ... ith-gradle