Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Is the Gradle plug-in advised?

$
0
0
As I'm new to Liquibase, it might be my ignorance, but I wonder whether the Liquibase plug-in is being advised. I have a hard time making it work for me. I would like to generate a change log based on an existing database schema and a set of Spring/Hibernate classes. I came past many unclear error messages, but now I'm stuck on this:

  1. INFO 11/4/16 8:44 PM: liquibase-hibernate: Reading hibernate configuration hibernate:spring:nu.yona.server.subscriptions.entities?dialect=org.hibernate.dialect.HSQLDialect
  2. INFO 11/4/16 8:44 PM: liquibase-hibernate: Found package nu.yona.server.subscriptions.entities
  3. INFO 11/4/16 8:44 PM: liquibase-hibernate: Found dialect org.hibernate.dialect.HSQLDialect
  4. Unexpected error running Liquibase: Unable to resolve persistence unit root URL

  5. SEVERE 11/4/16 8:44 PM: liquibase: Unable to resolve persistence unit root URL
  6. liquibase.exception.DatabaseException: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL
Given the amount of unclear messages and the little information I could find on the internet, I started to wonder whether I'm trying something that nobody uses.

My question is actually twofold: should I move on with the Liquibase Gradle plug-in? If so, any idea what could cause the above issue?

For your infomation: this is the Gradle file that I use:
  1. description = 'Database initializer'

  2. buildscript {
  3. repositories {
  4. mavenCentral()
  5. }
  6. dependencies {
  7. classpath("org.springframework.boot:spring-boot-gradle-plugin:$project.ext.springBootVersion")
  8. classpath("io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE")
  9. classpath('se.transmode.gradle:gradle-docker:1.2')
  10. classpath 'net.researchgate:gradle-release:2.3.4'
  11. classpath 'org.liquibase:liquibase-gradle-plugin:1.2.1'
  12. classpath("org.hsqldb:hsqldb:2.3.3")
  13. classpath("org.liquibase.ext:liquibase-hibernate4:3.6")
  14. classpath("org.springframework.boot:spring-boot-starter-data-jpa:1.4.1.RELEASE")
  15. classpath("org.springframework.batch:spring-batch-core:3.0.7.RELEASE")
  16. }
  17. }

  18. apply plugin: 'java'
  19. apply plugin: 'idea'
  20. apply plugin: 'spring-boot'
  21. apply plugin: 'io.spring.dependency-management'
  22. apply plugin: 'docker'
  23. apply plugin: 'net.researchgate.release'
  24. apply plugin: 'liquibase'

  25. jar {
  26. baseName = 'DatabaseInitializer'
  27. }

  28. release {
  29. failOnCommitNeeded = true
  30. tagTemplate = 'adminservice-${version}'
  31. git {
  32. requireBranch = 'yd-40-changes-for-building|master'
  33. }
  34. }

  35. dependencies {
  36. compile project(":core")
  37. compile("org.springframework.boot:spring-boot-starter-data-jpa:1.4.1.RELEASE")
  38. compile("org.springframework.batch:spring-batch-core:3.0.7.RELEASE")
  39. }

  40. group = 'yonadev'

  41. task buildDocker(type: Docker, dependsOn: bootRepackage) {
  42. tag = "${project.group}/yonahsqldb"
  43. push = true
  44. applicationName = jar.baseName
  45. dockerfile = file('src/main/docker/Dockerfile')
  46. doFirst {
  47. copy {
  48. from bootRepackage
  49. into stageDir
  50. rename "${jar.baseName}-${jar.version}-${bootRepackage.classifier}", "${jar.baseName}"
  51. }
  52. copy {
  53. from 'data'
  54. into "$stageDir/data"
  55. }
  56. }
  57. }

  58. bootRun {
  59. enableAssertions=true

  60. systemProperties = [
  61. 'spring.datasource.url': "jdbc:hsqldb:file:../YonaDB",
  62. 'spring.batch.initializer.enabled': "true",
  63. 'spring.jpa.hibernate.ddl-auto': "update"
  64. ]
  65. }

  66. bootRepackage {
  67.         classifier = "full"
  68. }

  69. liquibase {
  70. activities {
  71. main {
  72. changeLogFile 'changelog.groovy'
  73. url 'jdbc:hsqldb:hsql://yonadbserver/xdb'
  74. referenceUrl 'hibernate:spring:nu.yona.server.subscriptions.entities?dialect=org.hibernate.dialect.HSQLDialect'
  75. username 'sa'
  76. password ''
  77. changeLogParameters([ myToken: 'myvalue',
  78. second: 'secondValue'])
  79. }
  80. }

  81. // runList = project.ext.runList
  82. runList = 'main'
  83. }


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>