From 19cf99db3748601f2fce83666a295276d9dec410 Mon Sep 17 00:00:00 2001 From: ap-liquibase Date: Wed, 8 Jun 2022 16:10:08 -0400 Subject: [PATCH 01/19] DAT-10497 change liquibase-pro to liquibase-commercial in relevant places --- .github/workflows/build.yml | 12 +- liquibase-dist/pom.xml | 321 +++++++++--------- .../src/main/assembly/assembly-bin-pro.xml | 21 ++ .../src/main/assembly/assembly-bin.xml | 123 +------ .../src/main/assembly/components.xml | 114 +++++++ 5 files changed, 306 insertions(+), 285 deletions(-) create mode 100644 liquibase-dist/src/main/assembly/assembly-bin-pro.xml create mode 100644 liquibase-dist/src/main/assembly/components.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 712d91c8c21..19da71ea8ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,22 +320,22 @@ jobs: env: GPG_PASSWORD: ${{ secrets.GPG_PASSPHRASE }} - - name: Download liquibase-pro + - name: Download liquibase-commercial uses: liquibase/action-download-artifact@v2-liquibase with: github_token: ${{ secrets.BOT_TOKEN }} workflow: build.yml workflow_conclusion: success branch: "${{ needs.setup.outputs.proBranchName }}" - name: liquibase-pro-modules - path: download/liquibase-pro + name: liquibase-commercial-modules + path: download/liquibase-commercial repo: liquibase/liquibase-pro - name: Install Built Modules run: | (find . -name *-SNAPSHOT.jar -exec mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile={} \;) (find . -name *-SNAPSHOT-sources.jar -exec mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dclassifier=sources -Dfile={} \;) - mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=download/liquibase-pro/liquibase-pro-0-SNAPSHOT.jar + mvn -B org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=download/liquibase-commercial/liquibase-commercial-0-SNAPSHOT.jar - name: Build & Sign Artifacts env: @@ -355,7 +355,7 @@ jobs: echo "Saving windows key" echo "$INSTALL4J_WINDOWS_KEY" | base64 -d > liquibase-dist/target/keys/datical_windows.pfx - mvn -B -pl liquibase-dist -P liquibase-pro source:jar package + mvn -B -pl liquibase-dist -P liquibase-commercial source:jar package ## extract tar content for other artifacts mkdir -p liquibase-dist/target/liquibase-0-SNAPSHOT @@ -474,7 +474,7 @@ jobs: } if (failedCheckingUs) { - console.log("Rerun liquibase-pro that was waiting on us"); + console.log("Rerun liquibase-commercial that was waiting on us"); //octokit removed the retryWorkflow function github.request("POST "+currentBranchInfo.runRerunUrl); diff --git a/liquibase-dist/pom.xml b/liquibase-dist/pom.xml index 878f72762b7..fb68c291ecf 100644 --- a/liquibase-dist/pom.xml +++ b/liquibase-dist/pom.xml @@ -1,80 +1,74 @@ - - 4.0.0 + + 4.0.0 + + org.liquibase + liquibase + 0-SNAPSHOT + + liquibase-dist + jar + + Liquibase is a tool for managing and executing database changes. + + + github + https://maven.pkg.github.com/liquibase - - org.liquibase - liquibase - 0-SNAPSHOT - + 2.1.212 + 2.5.2 + 42.3.4 + 10.2.0.jre8 + 8.0.21 + 3.0.4 + 21.5.0.0 + 3.36.0.3 + 11.5.7.0 + 4.0.6.java8 - liquibase-dist - jar + src/main/assembly/assembly-bin.xml + - Liquibase is a tool for managing and executing database changes. + + + ${project.groupId} + liquibase-core + ${project.version} + + + ${project.groupId} + liquibase-cli + ${project.version} + - - github - https://maven.pkg.github.com/liquibase - - 2.1.212 - 2.5.2 - 42.3.4 - 10.2.0.jre8 - 8.0.21 - 3.0.4 - 21.5.0.0 - 3.36.0.3 - 11.5.7.0 - 4.0.6.java8 - - - - - ${project.groupId} - liquibase-core - ${project.version} - - - ${project.groupId} - liquibase-cli - ${project.version} - - - ${project.groupId} - liquibase-snowflake - ${project.version} - - - com.h2database - h2 - ${h2.version} + + com.h2database + h2 + ${h2.version} true - + - + org.hsqldb hsqldb ${hsqldb.version} true - + - + org.postgresql postgresql ${postgresql.version} true - + - + com.microsoft.sqlserver mssql-jdbc ${mssql.version} true - + @@ -83,190 +77,192 @@ - + org.mariadb.jdbc mariadb-java-client ${mariadb.version} true - + - + com.oracle.database.jdbc ojdbc8 ${oracle.version} true - + - + org.xerial sqlite-jdbc ${sqlite.version} true - + - + com.ibm.db2 jcc ${db2.version} true - + - + org.firebirdsql.jdbc jaybird ${firebird.version} true - + - + javax.resource connector-api 1.5 - + - + javax.xml.bind jaxb-api 2.3.1 - - + + org.glassfish.jaxb jaxb-core 2.3.0.1 true - - + + org.glassfish.jaxb jaxb-runtime 2.3.6 true - - - + + - + liquibase-${project.version} - - + + ${project.basedir}/src/main/archive ${project.build.directory}/archive true - - + + - - + + + org.liquibase.ext + liquibase-sdk-maven-plugin + 0.9 + + + org.apache.maven.plugins maven-source-plugin 3.2.1 - - + + true - - + + - + org.apache.maven.plugins maven-shade-plugin 3.3.0 - - + + com.github.marcosemiao.maven.plugins.shade.resource maven-shade-merge-manifest-transformer 0.0.2 - - - - - + + + + + ${project.groupId}:liquibase-core ${project.groupId}:liquibase-cli - ${project.groupId}:liquibase-snowflake - com.datical.lb:liquibase-pro - - - - + + + + *:* - + META-INF/maven/** - - - + + + false true false false - + liquibase.integration.commandline.LiquibaseLauncher - - + + META-INF/maven/org.liquibase/liquibase-core/pom.xml ${basedir}/src/main/maven/release.pom.xml - - + + liquibase.build.properties - - - - - + + + + + package - + shade - - - - + + + + - + maven-assembly-plugin 3.3.0 - + liquibase-${project.version} false false - - src/main/assembly/assembly-bin.xml - - - - + + ${assemblyConfigFile} + + + + make-assembly package - + single - - - - - - - + + + + + + maven-install-plugin - + liquibase-core ${project.build.directory}/liquibase-${project.version}.jar ${project.build.directory}/liquibase-${project.version}-sources.jar ${project.build.directory}/flattened-pom/release.pom.xml - - - + + + custom-install install - + install-file - - - - + + + + @@ -287,27 +283,30 @@ - - + + - - - liquibase-pro + + + liquibase-commercial - - + + ../../liquibase-pro/pom.xml - - + + - - + + src/main/assembly/assembly-bin-pro.xml + + + + com.datical.lb - liquibase-pro + liquibase-commercial ${project.version} - - - - - + + + + diff --git a/liquibase-dist/src/main/assembly/assembly-bin-pro.xml b/liquibase-dist/src/main/assembly/assembly-bin-pro.xml new file mode 100644 index 00000000000..29633b28a8d --- /dev/null +++ b/liquibase-dist/src/main/assembly/assembly-bin-pro.xml @@ -0,0 +1,21 @@ + + liquibase-bin + + tar.gz + + false + + src/main/assembly/components.xml + + + + ${artifact.artifactId}${dashClassifier?}.${artifact.extension} + internal/lib + + + com.datical.lb:liquibase-commercial:jar: + + + + + diff --git a/liquibase-dist/src/main/assembly/assembly-bin.xml b/liquibase-dist/src/main/assembly/assembly-bin.xml index 56211455aa2..e5b65d27716 100644 --- a/liquibase-dist/src/main/assembly/assembly-bin.xml +++ b/liquibase-dist/src/main/assembly/assembly-bin.xml @@ -1,124 +1,11 @@ - liquibase-bin tar.gz false - - - ${project.build.directory}/archive - ${file.separator} - unix - - liquibase - - 0755 - - - ${project.build.directory}/archive - - ${file.separator} - dos - - *.bat - - - - ${project.build.directory}/archive - ${file.separator} - unix - - liquibase - *.bat - - - - ${project.build.directory}/site/apidocs - javadoc - - **/* - - - - ${project.basedir}/../liquibase-core/target/classes/liquibase/examples - examples - - **/* - - - **/start-h2* - - - - ${project.basedir}/../liquibase-core/target/classes/liquibase/examples - examples - - **/start-h2 - - unix - 0755 - - - ${project.basedir}/../liquibase-core/target/classes/liquibase/examples - examples - - **/start-h2.bat - - dos - - - - - ${project.build.directory}/liquibase-0-SNAPSHOT.jar - liquibase.jar - 0644 - - - - ../LICENSE.txt - ${file.separator} - - - ../ABOUT.txt - ${file.separator} - - - ../changelog.txt - ${file.separator} - - - - - ${artifact.artifactId}${dashClassifier?}.${artifact.extension} - internal/lib - - org.yaml:snakeyaml:jar: - javax.xml.bind:jaxb-api:jar: - org.glassfish.jaxb:jaxb-runtime:jar: - org.glassfish.jaxb:jaxb-core:jar: - info.picocli:picocli:jar: - - com.h2database:h2:jar: - org.hsqldb:hsqldb:jar: - org.postgresql:postgresql:jar - org.mariadb.jdbc:mariadb-java-client:jar - com.oracle.database.jdbc:ojdbc8:jar - com.microsoft.sqlserver:mssql-jdbc:jar - org.xerial:sqlite-jdbc:jar: - com.ibm.db2:jcc:jar: - org.firebirdsql.jdbc:jaybird: - javax.resource:connector-api: - - - - - - - - - + + src/main/assembly/components.xml + + \ No newline at end of file diff --git a/liquibase-dist/src/main/assembly/components.xml b/liquibase-dist/src/main/assembly/components.xml new file mode 100644 index 00000000000..7dc28b5f389 --- /dev/null +++ b/liquibase-dist/src/main/assembly/components.xml @@ -0,0 +1,114 @@ + + + + ${project.build.directory}/archive + ${file.separator} + unix + + liquibase + + 0755 + + + ${project.build.directory}/archive + + ${file.separator} + dos + + *.bat + + + + ${project.build.directory}/archive + ${file.separator} + unix + + liquibase + *.bat + + + + ${project.build.directory}/site/apidocs + javadoc + + **/* + + + + ${project.basedir}/../liquibase-core/target/classes/liquibase/examples + examples + + **/* + + + **/start-h2* + + + + ${project.basedir}/../liquibase-core/target/classes/liquibase/examples + examples + + **/start-h2 + + unix + 0755 + + + ${project.basedir}/../liquibase-core/target/classes/liquibase/examples + examples + + **/start-h2.bat + + dos + + + + + ${project.build.directory}/liquibase-0-SNAPSHOT.jar + liquibase.jar + 0644 + + + + ../LICENSE.txt + ${file.separator} + + + ../ABOUT.txt + ${file.separator} + + + ../changelog.txt + ${file.separator} + + + + + ${artifact.artifactId}${dashClassifier?}.${artifact.extension} + internal/lib + + org.yaml:snakeyaml:jar: + javax.xml.bind:jaxb-api:jar: + org.glassfish.jaxb:jaxb-runtime:jar: + org.glassfish.jaxb:jaxb-core:jar: + info.picocli:picocli:jar: + com.h2database:h2:jar: + org.hsqldb:hsqldb:jar: + org.postgresql:postgresql:jar + org.mariadb.jdbc:mariadb-java-client:jar + com.oracle.database.jdbc:ojdbc8:jar + com.microsoft.sqlserver:mssql-jdbc:jar + org.xerial:sqlite-jdbc:jar: + com.ibm.db2:jcc:jar: + org.firebirdsql.jdbc:jaybird: + + + + + + + From b689b5c763c74546a2bc32011ffcfd9992c607e2 Mon Sep 17 00:00:00 2001 From: ap-liquibase Date: Wed, 8 Jun 2022 17:17:55 -0400 Subject: [PATCH 02/19] DAT-10497 add liquibase-commercial as a dependency to lb oss release pom --- liquibase-dist/src/main/maven/release.pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/liquibase-dist/src/main/maven/release.pom.xml b/liquibase-dist/src/main/maven/release.pom.xml index de3f5905a7b..af05ad38234 100644 --- a/liquibase-dist/src/main/maven/release.pom.xml +++ b/liquibase-dist/src/main/maven/release.pom.xml @@ -43,5 +43,11 @@ compile true + + + com.datical.lb + liquibase-commercial + 0-SNAPSHOT + From 77fa075e801796cf1d38c42fdd7d1cb7510ac7ad Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Thu, 7 Jul 2022 16:51:25 -0500 Subject: [PATCH 03/19] Working on commercial vs. core jar split --- .../commandline/LiquibaseCommandLine.java | 8 +++++--- liquibase-dist/pom.xml | 16 ++++++++++----- ...components.xml => assembly-bin-common.xml} | 20 +++++++++++++++++++ .../src/main/assembly/assembly-bin-pro.xml | 4 ++-- .../src/main/assembly/assembly-bin.xml | 2 +- liquibase-dist/src/main/maven/release.pom.xml | 6 ------ .../main/maven/liquibase-deployment-pom.xslt | 12 +++++++++++ 7 files changed, 51 insertions(+), 17 deletions(-) rename liquibase-dist/src/main/assembly/{components.xml => assembly-bin-common.xml} (73%) diff --git a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java index 2cfe6f1311d..f7074e97602 100644 --- a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java +++ b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java @@ -1195,9 +1195,11 @@ private LibraryInfo getLibraryInfo(File pathEntryFile) throws IOException { libraryInfo.file = pathEntryFile; final Manifest manifest = jarFile.getManifest(); - libraryInfo.name = getValue(manifest, "Bundle-Name", "Implementation-Title", "Specification-Title"); - libraryInfo.version = getValue(manifest, "Bundle-Version", "Implementation-Version", "Specification-Version"); - libraryInfo.vendor = getValue(manifest, "Bundle-Vendor", "Implementation-Vendor", "Specification-Vendor"); + if (manifest != null) { + libraryInfo.name = getValue(manifest, "Bundle-Name", "Implementation-Title", "Specification-Title"); + libraryInfo.version = getValue(manifest, "Bundle-Version", "Implementation-Version", "Specification-Version"); + libraryInfo.vendor = getValue(manifest, "Bundle-Vendor", "Implementation-Vendor", "Specification-Vendor"); + } if (libraryInfo.name == null) { libraryInfo.name = pathEntryFile.getName().replace(".jar", ""); diff --git a/liquibase-dist/pom.xml b/liquibase-dist/pom.xml index 4f40b9f111e..73dceb90164 100644 --- a/liquibase-dist/pom.xml +++ b/liquibase-dist/pom.xml @@ -8,9 +8,9 @@ liquibase-dist jar - - Liquibase is a tool for managing and executing database changes. - + + Liquibase is a tool for managing and executing database changes. + github https://maven.pkg.github.com/liquibase @@ -40,7 +40,11 @@ liquibase-cli ${project.version} - + + ${project.groupId} + liquibase-snowflake + ${project.version} + com.h2database h2 @@ -184,6 +188,8 @@ ${project.groupId}:liquibase-core ${project.groupId}:liquibase-cli + ${project.groupId}:liquibase-snowflake + org.liquibase:liquibase-commercial @@ -317,7 +323,7 @@ - com.datical.lb + org.liquibase liquibase-commercial ${project.version} diff --git a/liquibase-dist/src/main/assembly/components.xml b/liquibase-dist/src/main/assembly/assembly-bin-common.xml similarity index 73% rename from liquibase-dist/src/main/assembly/components.xml rename to liquibase-dist/src/main/assembly/assembly-bin-common.xml index 7dc28b5f389..3d6fda2ea00 100644 --- a/liquibase-dist/src/main/assembly/components.xml +++ b/liquibase-dist/src/main/assembly/assembly-bin-common.xml @@ -90,7 +90,10 @@ ${artifact.artifactId}${dashClassifier?}.${artifact.extension} internal/lib + true + runtime + com.opencsv:opencsv: org.yaml:snakeyaml:jar: javax.xml.bind:jaxb-api:jar: org.glassfish.jaxb:jaxb-runtime:jar: @@ -105,10 +108,27 @@ org.xerial:sqlite-jdbc:jar: com.ibm.db2:jcc:jar: org.firebirdsql.jdbc:jaybird: + net.snowflake:snowflake-jdbc: + + javax.resource:connector-api: + + + + org.antlr:antlr4-runtime:jar: + org.checkerframework:checker-qual:jar: + commons-beanutils:commons-beanutils:jar: + org.glassfish.jaxb:txw2:jar: + org.eclipse.angus:angus-activation:jar: + com.sun.istack:istack-commons-runtime:jar: + jakarta.activation:jakarta.activation-api:jar: + jakarta.xml.bind:jakarta.xml.bind-api:jar: + com.sun.activation:jakarta.activation:jar: + javax.activation:javax.activation-api:jar: + diff --git a/liquibase-dist/src/main/assembly/assembly-bin-pro.xml b/liquibase-dist/src/main/assembly/assembly-bin-pro.xml index 29633b28a8d..e874aecc004 100644 --- a/liquibase-dist/src/main/assembly/assembly-bin-pro.xml +++ b/liquibase-dist/src/main/assembly/assembly-bin-pro.xml @@ -5,7 +5,7 @@ false - src/main/assembly/components.xml + src/main/assembly/assembly-bin-common.xml @@ -13,7 +13,7 @@ internal/lib - com.datical.lb:liquibase-commercial:jar: + org.liquibase:liquibase-commercial:jar: diff --git a/liquibase-dist/src/main/assembly/assembly-bin.xml b/liquibase-dist/src/main/assembly/assembly-bin.xml index e5b65d27716..4bb56ee28b1 100644 --- a/liquibase-dist/src/main/assembly/assembly-bin.xml +++ b/liquibase-dist/src/main/assembly/assembly-bin.xml @@ -6,6 +6,6 @@ false - src/main/assembly/components.xml + src/main/assembly/assembly-bin-common.xml \ No newline at end of file diff --git a/liquibase-dist/src/main/maven/release.pom.xml b/liquibase-dist/src/main/maven/release.pom.xml index 4aec364e4c2..152dc905f6c 100644 --- a/liquibase-dist/src/main/maven/release.pom.xml +++ b/liquibase-dist/src/main/maven/release.pom.xml @@ -56,11 +56,5 @@ - - - com.datical.lb - liquibase-commercial - 0-SNAPSHOT - diff --git a/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt b/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt index ae28b294422..0555dc7b03a 100644 --- a/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt +++ b/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt @@ -15,6 +15,18 @@ + + + + + + org.liquibase + liquibase-commercial + 0-SNAPSHOT + runtime + + + - - + + - - org.liquibase - liquibase-commercial - 0-SNAPSHOT - runtime - - + + + + + + + - org.codehaus.mojo - xml-maven-plugin - 1.0.2 - - - transform-deploy-pom - process-resources - - transform - - - - - true - - - ${project.build.directory}/flattened-pom - release.pom.xml - ${project.build.directory} - ${project.basedir}/src/main/maven/liquibase-deployment-pom.xslt - - - - - - - maven-install-plugin + org.apache.maven.plugins + maven-shade-plugin + 3.3.0 - ${project.artifactId} - ${project.build.directory}/${project.artifactId}-${project.version}.jar - ${project.build.directory}/${project.artifactId}-${project.version}-sources.jar - ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar - ${project.build.directory}/release.pom.xml + + + ${project.groupId}:liquibase-maven-plugin + + + + + *:* + + META-INF/maven/**/pom.xml + + + + false + false + false + false + + + + META-INF/maven/org.liquibase/liquibase-maven-plugin/pom.xml + ${basedir}/src/main/maven/release.pom.xml + + - custom-install - install + package - install-file + shade diff --git a/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt b/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt deleted file mode 100644 index 2b32dcf993b..00000000000 --- a/liquibase-maven-plugin/src/main/maven/liquibase-deployment-pom.xslt +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Liquibase Maven Plugin - - - - diff --git a/liquibase-maven-plugin/src/main/maven/release.pom.xml b/liquibase-maven-plugin/src/main/maven/release.pom.xml new file mode 100644 index 00000000000..66af84f45fc --- /dev/null +++ b/liquibase-maven-plugin/src/main/maven/release.pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + org.liquibase + liquibase-maven-plugin + 0-SNAPSHOT + maven-plugin + Liquibase Maven Plugin + A Maven plugin wraps up some of the functionality of Liquibase + http://www.liquibase.org/liquibase-maven-plugin + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + + + + + nvoxland + Nathan Voxland + nathan.voxland@liquibase.org + + architect + developer + + -6 + + + + scm:git:git@github.com:liquibase/liquibase.git/liquibase-maven-plugin + scm:git:git@github.com:liquibase/liquibase.git/liquibase-maven-plugin + scm:git:git@github.com:liquibase/liquibase.git/liquibase-maven-plugin + + + + org.liquibase + liquibase-core + 0-SNAPSHOT + runtime + + + org.liquibase + liquibase-commercial + 0-SNAPSHOT + runtime + + + From d54afbfc14f6035d53cd17468039199699945b15 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Mon, 11 Jul 2022 10:46:52 -0500 Subject: [PATCH 06/19] Working on commercial vs. core jar split --- .github/util/re-version.sh | 4 ++-- .../commandline/LiquibaseCommandLine.java | 2 +- .../commandline/LiquibaseLauncher.java | 6 +++--- .../core/xml/LiquibaseEntityResolver.java | 2 +- .../resources/liquibase/examples/start-h2.bat | 2 +- liquibase-dist/src/main/archive/README.txt | 1 - liquibase-dist/src/main/archive/liquibase | 3 ++- liquibase-dist/src/main/archive/liquibase.bat | 2 +- .../src/main/assembly/assembly-bin-common.xml | 17 ++++++++++++----- liquibase-integration-tests/setup/build.xml | 6 +++--- .../setup/oracle/build.xml | 6 +++--- .../src/test/resources/commandline/README.txt | 9 --------- .../commandline/liquibase.h2.properties | 8 -------- .../commandline/liquibase.mariadb.properties | 8 -------- .../commandline/liquibase.mssql.properties | 7 ------- .../commandline/liquibase.mysql.properties | 8 -------- .../commandline/liquibase.oracle.properties | 7 ------- .../commandline/liquibase.postgres.properties | 8 -------- 18 files changed, 29 insertions(+), 77 deletions(-) delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/README.txt delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.h2.properties delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.mariadb.properties delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.mssql.properties delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.mysql.properties delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.oracle.properties delete mode 100644 liquibase-integration-tests/src/test/resources/commandline/liquibase.postgres.properties diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index e0ce494adba..768183d3304 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -132,12 +132,12 @@ done ##### update zip/tar files -cp $outdir/liquibase-$version.jar $workdir/liquibase.jar ##save versioned jar as unversioned to include in zip/tar +cp $outdir/liquibase-core-$version.jar $workdir/internal/lib/liquibase-core.jar ##save versioned jar as unversioned to include in zip/tar ## Extract tar.gz and rebuild it back into the tar.gz and zip mkdir $workdir/tgz-repackage (cd $workdir/tgz-repackage && tar -xzf $workdir/liquibase-0-SNAPSHOT.tar.gz) -cp $workdir/liquibase.jar $workdir/tgz-repackage/liquibase.jar +cp $workdir/liquibase-core.jar $workdir/tgz-repackage/internal/lib/liquibase-core.jar find $workdir/tgz-repackage -name "*.txt" -exec sed -i -e "s/0-SNAPSHOT/$version/" {} \; (cd $workdir/tgz-repackage && tar -czf $outdir/liquibase-$version.tar.gz *) (cd $workdir/tgz-repackage && zip -qr $outdir/liquibase-$version.zip *) diff --git a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java index f7074e97602..fabe9375e3f 100644 --- a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java +++ b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseCommandLine.java @@ -1142,7 +1142,7 @@ public String[] getVersion() throws Exception { continue; } final File file = new File(url.toURI()); - if (file.getName().equals("liquibase.jar")) { + if (file.getName().equals("liquibase-core.jar")) { continue; } if (file.exists() && file.getName().toLowerCase().endsWith(".jar")) { diff --git a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncher.java b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncher.java index ac56d997914..2c551e10757 100644 --- a/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncher.java +++ b/liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncher.java @@ -32,7 +32,7 @@ public static void main(final String[] args) throws Exception { File liquibaseHome = new File(liquibaseHomeEnv); List urls = new ArrayList<>(); - urls.add(new File(liquibaseHome, "liquibase.jar").toURI().toURL()); + urls.add(new File(liquibaseHome, "internal/lib/liquibase-core.jar").toURI().toURL()); //make sure liquibase-core.jar is first in the list File[] libDirs = new File[]{ new File("./liquibase_libs"), @@ -54,7 +54,7 @@ public static void main(final String[] args) throws Exception { } for (File lib : files) { - if (lib.getName().toLowerCase(Locale.US).endsWith(".jar")) { + if (lib.getName().toLowerCase(Locale.US).endsWith(".jar") && !lib.getName().toLowerCase(Locale.US).equals("liquibase-core.jar")) { try { urls.add(lib.toURI().toURL()); debug("Added " + lib.getAbsolutePath() + " to classpath"); @@ -82,7 +82,7 @@ public static void main(final String[] args) throws Exception { //loading with the regular system classloader includes liquibase.jar in the parent. //That causes the parent classloader to load LiqiuabaseCommandLine which makes it not able to access files in the child classloader - //The system classloader's parent is the boot classloader, which keeps the only classloader with liquibase.jar the same as the rest of the classes it needs to access. + //The system classloader's parent is the boot classloader, which keeps the only classloader with liquibase-core.jar the same as the rest of the classes it needs to access. final URLClassLoader classloader = new URLClassLoader(urls.toArray(new URL[0]), ClassLoader.getSystemClassLoader().getParent()); Thread.currentThread().setContextClassLoader(classloader); diff --git a/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java b/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java index 8419bfa0d6f..15be9d01e07 100644 --- a/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java +++ b/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java @@ -72,7 +72,7 @@ public InputSource resolveEntity(String name, String publicId, String baseURI, S /** * ResourceAccessor to use if the standard one does not have the XSD files in it. - * Returns a ClassLoaderResourceAccessor that checks the system classloader which should include the liquibase.jar. + * Returns a ClassLoaderResourceAccessor that checks the system classloader which should include the liquibase-core.jar. */ protected ResourceAccessor getFallbackResourceAccessor() { if (fallbackResourceAccessor == null) { diff --git a/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat b/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat index ce3cb5aa5b1..6431ee22f5e 100644 --- a/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat +++ b/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat @@ -6,7 +6,7 @@ setlocal enabledelayedexpansion rem %~dp0 is expanded pathname of the current script under NT rem %~p0 is the directory of the current script -if exist %~p0\..\liquibase.jar SET LIQUIBASE_HOME=%~p0.. +if exist %~p0\..\GETTING_STARTED.txt SET LIQUIBASE_HOME=%~p0.. if "%LIQUIBASE_HOME%"=="" ( FOR /F "tokens=* USEBACKQ" %%g IN (`where liquibase.bat`) do (SET "LIQUIBASE_HOME=%%~dpg") diff --git a/liquibase-dist/src/main/archive/README.txt b/liquibase-dist/src/main/archive/README.txt index cba0197cec1..be9e9f1be7e 100644 --- a/liquibase-dist/src/main/archive/README.txt +++ b/liquibase-dist/src/main/archive/README.txt @@ -34,7 +34,6 @@ Files are: * liquibase/LICENSE.txt * liquibase/liquibase.sh * liquibase/liquibase.bat - * liquibase/liquibase.jar * liquibase/README.txt * liquibase/GETTING_STARTED.txt * liquibase/examples/start-h2 diff --git a/liquibase-dist/src/main/archive/liquibase b/liquibase-dist/src/main/archive/liquibase index b1e10e39021..24be12bf9c5 100644 --- a/liquibase-dist/src/main/archive/liquibase +++ b/liquibase-dist/src/main/archive/liquibase @@ -37,6 +37,7 @@ if [ -z "${JAVA_HOME}" ]; then if [ -z "${JAVA_PATH}" ]; then echo "Cannot find java in your path. Install java or use the JAVA_HOME environment variable" + exit 1 fi else #Use path in JAVA_HOME @@ -47,4 +48,4 @@ fi JAVA_OPTS="${JAVA_OPTS-}" export LIQUIBASE_HOME -"${JAVA_PATH}" $JAVA_OPTS -jar "$LIQUIBASE_HOME/liquibase.jar" ${1+"$@"} +"${JAVA_PATH}" $JAVA_OPTS -jar "$LIQUIBASE_HOME/internal/lib/liquibase-core.jar" ${1+"$@"} diff --git a/liquibase-dist/src/main/archive/liquibase.bat b/liquibase-dist/src/main/archive/liquibase.bat index 4ad3e373c64..4a5c44790c9 100644 --- a/liquibase-dist/src/main/archive/liquibase.bat +++ b/liquibase-dist/src/main/archive/liquibase.bat @@ -25,4 +25,4 @@ IF NOT DEFINED JAVA_OPTS set JAVA_OPTS= set JAVA_PATH=java if NOT "%JAVA_HOME%" == "" set JAVA_PATH=%JAVA_HOME%\bin\java -"%JAVA_PATH%" %JAVA_OPTS% -jar "%LIQUIBASE_HOME%\liquibase.jar" %* +"%JAVA_PATH%" %JAVA_OPTS% -jar "%LIQUIBASE_HOME%\internal\lib\liquibase-core.jar" %* diff --git a/liquibase-dist/src/main/assembly/assembly-bin-common.xml b/liquibase-dist/src/main/assembly/assembly-bin-common.xml index 3d6fda2ea00..482d0a401e2 100644 --- a/liquibase-dist/src/main/assembly/assembly-bin-common.xml +++ b/liquibase-dist/src/main/assembly/assembly-bin-common.xml @@ -67,11 +67,11 @@ - - ${project.build.directory}/liquibase-0-SNAPSHOT.jar - liquibase.jar - 0644 - + + ${project.build.directory}/liquibase-0-SNAPSHOT.jar + internal/lib/liquibase-core.jar + 0644 + ../LICENSE.txt @@ -93,6 +93,7 @@ true runtime + org.liquibase:liquibase-commercial: com.opencsv:opencsv: org.yaml:snakeyaml:jar: javax.xml.bind:jaxb-api:jar: @@ -128,6 +129,12 @@ jakarta.xml.bind:jakarta.xml.bind-api:jar: com.sun.activation:jakarta.activation:jar: javax.activation:javax.activation-api:jar: + org.liquibase:liquibase-snowflake:jar: + net.java.truelicense:*:jar: + com.github.jsqlparser:jsqlparser:jar: + commons-codec:commons-codec:jar: + com.fasterxml.jackson.core:*:jar: + com.fasterxml.jackson.module:*:jar: diff --git a/liquibase-integration-tests/setup/build.xml b/liquibase-integration-tests/setup/build.xml index c0d9af7373d..a4771f93dba 100644 --- a/liquibase-integration-tests/setup/build.xml +++ b/liquibase-integration-tests/setup/build.xml @@ -7,9 +7,9 @@ - - - + + + diff --git a/liquibase-integration-tests/setup/oracle/build.xml b/liquibase-integration-tests/setup/oracle/build.xml index aea82c91357..3c93a02e998 100644 --- a/liquibase-integration-tests/setup/oracle/build.xml +++ b/liquibase-integration-tests/setup/oracle/build.xml @@ -20,9 +20,9 @@ - - - + + + diff --git a/liquibase-integration-tests/src/test/resources/commandline/README.txt b/liquibase-integration-tests/src/test/resources/commandline/README.txt deleted file mode 100644 index 894f1961b9d..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/README.txt +++ /dev/null @@ -1,9 +0,0 @@ -This folder exists to easily test the built liquibase jar. - -Simply copy the liquibase.jar and liquibase.bat scripts to this directory and run them. - -There are pre-existing liquibase.properties file for different databases. - -For example: - -liquibase --defaultsFile=liquibase.h2.properties update \ No newline at end of file diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.h2.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.h2.properties deleted file mode 100644 index e5d227a38eb..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.h2.properties +++ /dev/null @@ -1,8 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes;../../../../../liquibase-integration-tests/target/test-classes/packaged-changelog.jar -changeLogFile=changelogs/h2/complete/root.changelog.xml -username=liquibase -password= -url=jdbc:h2:mem:liquibase -driver=org.h2.Driver -logLevel=SEVERE -contexts=test diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mariadb.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.mariadb.properties deleted file mode 100644 index 7585879fa2c..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mariadb.properties +++ /dev/null @@ -1,8 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes;../../../../../liquibase-integration-tests/target/test-classes/packaged-changelog.jar -#changeLogFile=changelogs/mysql/complete/root.changelog.xml -username=liquibase -password=liquibase -url=jdbc:mariadb://localhost/liquibase -driver=org.mariadb.jdbc.Driver -logLevel=DEBUG -contexts=test \ No newline at end of file diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mssql.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.mssql.properties deleted file mode 100644 index 3cce24e7ef3..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mssql.properties +++ /dev/null @@ -1,7 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes -changeLogFile=changelogs/mssql/complete/root.changelog.xml -username=liquibase -password=liquibase -url=jdbc:sqlserver://localhost;instanceName=SQL2005;databaseName=liquibase -driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -logLevel=INFO diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mysql.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.mysql.properties deleted file mode 100644 index a34a532da71..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.mysql.properties +++ /dev/null @@ -1,8 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes;../../../../../liquibase-integration-tests/target/test-classes/packaged-changelog.jar -#changeLogFile=changelogs/mysql/complete/root.changelog.xml -username=liquibase -password=liquibase -url=jdbc:mysql://localhost/liquibase -driver=com.mysql.cj.jdbc.Driver -logLevel=DEBUG -contexts=test diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.oracle.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.oracle.properties deleted file mode 100644 index 5e81c41b3db..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.oracle.properties +++ /dev/null @@ -1,7 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes;../../../../../liquibase-integration-tests/target/test-classes/packaged-changelog.jar -changeLogFile=changelogs/oracle/complete/root.changelog.xml -username=liquibase -password=liquibase -url=jdbc:oracle:thin:@192.168.1.5:1521/XE -driver=oracle.jdbc.OracleDriver -logLevel=INFO diff --git a/liquibase-integration-tests/src/test/resources/commandline/liquibase.postgres.properties b/liquibase-integration-tests/src/test/resources/commandline/liquibase.postgres.properties deleted file mode 100644 index fc5732d8823..00000000000 --- a/liquibase-integration-tests/src/test/resources/commandline/liquibase.postgres.properties +++ /dev/null @@ -1,8 +0,0 @@ -classpath: ..;../../../../../liquibase-core/target/test-classes;../../../../../liquibase-integration-tests/target/test-classes/packaged-changelog.jar -changeLogFile=changelogs/mysql/complete/root.changelog.xml -#username=liquibase -password=liquibase -url=jdbc:postgresql://localhost/liquibase -driver=org.postgresql.Driver -logLevel=DEBUG -contexts=test From 306e9570983dcb83312aee59d811af0309cca9dc Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Mon, 11 Jul 2022 11:12:04 -0500 Subject: [PATCH 07/19] Working on commercial vs. core jar split --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26848393b9b..4b613e3869b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -396,7 +396,7 @@ jobs: cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT.jar artifacts-named/liquibase-cdi-${{ needs.setup.outputs.thisBranchFileName }}.jar cp liquibase-extension-testing/target/liquibase-extension-testing-0-SNAPSHOT.jar artifacts-named/liquibase-extension-testing-${{ needs.setup.outputs.thisBranchFileName }}.jar cp liquibase-extension-testing/target/liquibase-extension-testing-0-SNAPSHOT-deps.jar artifacts-named/liquibase-extension-testing-${{ needs.setup.outputs.thisBranchFileName }}-deps.jar - cp download/liquibase-commercial/liquibase-commercial-0-SNAPSHOT-deps.jar artifacts-named/liquibase-commercial-${{ needs.setup.outputs.thisBranchFileName }}.jar + cp download/liquibase-commercial/liquibase-commercial-0-SNAPSHOT.jar artifacts-named/liquibase-commercial-${{ needs.setup.outputs.thisBranchFileName }}.jar - name: Archive Packages uses: actions/upload-artifact@v3 From f835ce86a6e21c933bea584bccf98f89f0563498 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Mon, 11 Jul 2022 12:29:41 -0500 Subject: [PATCH 08/19] Working on commercial vs. core jar split --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b613e3869b..b6a42630852 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -372,8 +372,8 @@ jobs: mkdir -p artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.tar.gz artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.zip artifacts - cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts - cp liquibase-dist/target/liquibase-0-SNAPSHOT-sources.jar artifacts + cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts/liquibase-core-0-SNAPSHOT.jar + cp liquibase-dist/target/liquibase-0-SNAPSHOT-sources.jar artifacts/liquibase-0-SNAPSHOT-sources.jar cp liquibase-dist/target/liquibase-*-installer-* artifacts cp liquibase-maven-plugin/target/liquibase-maven-plugin-0-SNAPSHOT.jar artifacts @@ -384,14 +384,16 @@ jobs: cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT-sources.jar artifacts cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT-javadoc.jar artifacts - cp target/liquibase-0-SNAPSHOT-javadoc.jar artifacts + cp target/liquibase-0-SNAPSHOT-javadoc.jar artifacts/liquibase-core-0-SNAPSHOT-javadoc.jar + + cp download/liquibase-commercial/liquibase-commercial-0-SNAPSHOT.jar artifacts .github/util/sign-artifacts.sh artifacts ##prepare branch-named convenience artifacts directories mkdir artifacts-named cp liquibase-dist/target/liquibase-0-SNAPSHOT.tar.gz artifacts-named/liquibase-${{ needs.setup.outputs.thisBranchFileName }}.tar.gz - cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts-named/liquibase-${{ needs.setup.outputs.thisBranchFileName }}.jar + cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts-named/liquibase-core-${{ needs.setup.outputs.thisBranchFileName }}.jar cp liquibase-maven-plugin/target/liquibase-maven-plugin-0-SNAPSHOT.jar artifacts-named/liquibase-maven-plugin-${{ needs.setup.outputs.thisBranchFileName }}.jar cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT.jar artifacts-named/liquibase-cdi-${{ needs.setup.outputs.thisBranchFileName }}.jar cp liquibase-extension-testing/target/liquibase-extension-testing-0-SNAPSHOT.jar artifacts-named/liquibase-extension-testing-${{ needs.setup.outputs.thisBranchFileName }}.jar From a5cb08881e928b56de9319f746d187dbba18c4f9 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Mon, 11 Jul 2022 15:26:00 -0500 Subject: [PATCH 09/19] Working on commercial vs. core jar split --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b6a42630852..4c65c43f521 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -373,7 +373,7 @@ jobs: cp liquibase-dist/target/liquibase-0-SNAPSHOT.tar.gz artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.zip artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts/liquibase-core-0-SNAPSHOT.jar - cp liquibase-dist/target/liquibase-0-SNAPSHOT-sources.jar artifacts/liquibase-0-SNAPSHOT-sources.jar + cp liquibase-dist/target/liquibase-0-SNAPSHOT-sources.jar artifacts/liquibase-core-0-SNAPSHOT-sources.jar cp liquibase-dist/target/liquibase-*-installer-* artifacts cp liquibase-maven-plugin/target/liquibase-maven-plugin-0-SNAPSHOT.jar artifacts From 445ea96db9632038832d587f53d95baeb05a1888 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Tue, 12 Jul 2022 16:20:07 -0500 Subject: [PATCH 10/19] Updating release logic for new liquibase-core/liquibase-commerical jars --- .github/util/re-version.sh | 6 ++++-- .github/workflows/create-release.yml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index 768183d3304..a49551f34c8 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -43,7 +43,7 @@ mkdir -p $outdir (cd $scriptDir && javac ManifestReversion.java) #### Update jars -declare -a jars=("liquibase-0-SNAPSHOT.jar" "liquibase-0-SNAPSHOT-sources.jar" "liquibase-cdi-0-SNAPSHOT.jar" "liquibase-cdi-0-SNAPSHOT-sources.jar" "liquibase-maven-plugin-0-SNAPSHOT.jar" "liquibase-maven-plugin-0-SNAPSHOT-sources.jar") +declare -a jars=("liquibase-core-0-SNAPSHOT.jar" "liquibase-core-0-SNAPSHOT-sources.jar" "liquibase-commercial-0-SNAPSHOT.jar" "liquibase-cdi-0-SNAPSHOT.jar" "liquibase-cdi-0-SNAPSHOT-sources.jar" "liquibase-maven-plugin-0-SNAPSHOT.jar" "liquibase-maven-plugin-0-SNAPSHOT-sources.jar") for jar in "${jars[@]}" do @@ -58,7 +58,7 @@ do rm -rf $workdir/META-INF ## Fix up liquibase.build.properties - if [ $jar == "liquibase-0-SNAPSHOT.jar" ]; then + if [[ $jar == "liquibase-core-0-SNAPSHOT.jar" || $jar == "liquibase-commercial-0-SNAPSHOT.jar" ]]; then unzip -q $workdir/$jar liquibase.build.properties -d $workdir sed -i -e "s/build.version=.*/build.version=$version/" $workdir/liquibase.build.properties (cd $workdir && jar -uf $jar liquibase.build.properties) @@ -133,11 +133,13 @@ done ##### update zip/tar files cp $outdir/liquibase-core-$version.jar $workdir/internal/lib/liquibase-core.jar ##save versioned jar as unversioned to include in zip/tar +cp $outdir/liquibase-commercial-$version.jar $workdir/internal/lib/liquibase-commercial.jar ##save versioned jar as unversioned to include in zip/tar ## Extract tar.gz and rebuild it back into the tar.gz and zip mkdir $workdir/tgz-repackage (cd $workdir/tgz-repackage && tar -xzf $workdir/liquibase-0-SNAPSHOT.tar.gz) cp $workdir/liquibase-core.jar $workdir/tgz-repackage/internal/lib/liquibase-core.jar +cp $workdir/liquibase-commercial.jar $workdir/tgz-repackage/internal/lib/liquibase-commercial.jar find $workdir/tgz-repackage -name "*.txt" -exec sed -i -e "s/0-SNAPSHOT/$version/" {} \; (cd $workdir/tgz-repackage && tar -czf $outdir/liquibase-$version.tar.gz *) (cd $workdir/tgz-repackage && zip -qr $outdir/liquibase-$version.zip *) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fc2ac85a069..8700553e7e5 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -73,7 +73,8 @@ jobs: .github/util/sign-artifacts.sh re-version/out mkdir re-version/final - mv re-version/out/liquibase-${{ needs.setup.outputs.version }}.jar re-version/final + mv re-version/out/liquibase-core-${{ needs.setup.outputs.version }}.jar re-version/final + mv re-version/out/liquibase-commercial-${{ needs.setup.outputs.version }}.jar re-version/final mv re-version/out/liquibase-${{ needs.setup.outputs.version }}.tar.gz re-version/final mv re-version/out/liquibase-${{ needs.setup.outputs.version }}.zip re-version/final From b3826b70d7246f52990a4ae8f2bfaae152be7adc Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 13 Jul 2022 00:55:22 -0500 Subject: [PATCH 11/19] Updating release logic for new liquibase-core/liquibase-commerical jars --- .github/workflows/build.yml | 12 +++++++++- .github/workflows/release-published.yml | 32 ++++++++++++++++++------- 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c65c43f521..a069fd914b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -372,8 +372,11 @@ jobs: mkdir -p artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.tar.gz artifacts cp liquibase-dist/target/liquibase-0-SNAPSHOT.zip artifacts + cp liquibase-dist/target/liquibase-0-SNAPSHOT.jar artifacts/liquibase-core-0-SNAPSHOT.jar cp liquibase-dist/target/liquibase-0-SNAPSHOT-sources.jar artifacts/liquibase-core-0-SNAPSHOT-sources.jar + cp target/liquibase-0-SNAPSHOT-javadoc.jar artifacts/liquibase-core-0-SNAPSHOT-javadoc.jar + cp liquibase-dist/target/liquibase-*-installer-* artifacts cp liquibase-maven-plugin/target/liquibase-maven-plugin-0-SNAPSHOT.jar artifacts @@ -383,10 +386,17 @@ jobs: cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT.jar artifacts cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT-sources.jar artifacts cp liquibase-cdi/target/liquibase-cdi-0-SNAPSHOT-javadoc.jar artifacts + + + echo "Source code not available for liquibase-commercial" > /tmp/readme.source.txt + (cd /tmp && jar cf liquibase-commercial-0-SNAPSHOT-sources.jar readme.source.txt) - cp target/liquibase-0-SNAPSHOT-javadoc.jar artifacts/liquibase-core-0-SNAPSHOT-javadoc.jar + echo "Javadocs not available for liquibase-commercial" > /tmp/readme.javadocs.txt + (cd /tmp && jar cf liquibase-commercial-0-SNAPSHOT-javadoc.jar readme.javadocs.txt) cp download/liquibase-commercial/liquibase-commercial-0-SNAPSHOT.jar artifacts + cp /tmp/liquibase-commercial-0-SNAPSHOT-sources.jar artifacts + cp /tmp/liquibase-commercial-0-SNAPSHOT-javadoc.jar artifacts .github/util/sign-artifacts.sh artifacts diff --git a/.github/workflows/release-published.yml b/.github/workflows/release-published.yml index 29624390e0b..2f43af60a3c 100644 --- a/.github/workflows/release-published.yml +++ b/.github/workflows/release-published.yml @@ -73,9 +73,9 @@ jobs: unzip liquibase-additional-*.zip ##extracts and sign poms - unzip -j liquibase-${version}.jar META-INF/maven/org.liquibase/liquibase-core/pom.xml - mv pom.xml liquibase-${version}.pom - gpg --batch --pinentry-mode=loopback --passphrase "$GPG_PASSWORD" -ab liquibase-${version}.pom + unzip -j liquibase-core-${version}.jar META-INF/maven/org.liquibase/liquibase-core/pom.xml + mv pom.xml liquibase-core-${version}.pom + gpg --batch --pinentry-mode=loopback --passphrase "$GPG_PASSWORD" -ab liquibase-core-${version}.pom unzip -j liquibase-maven-plugin-${version}.jar META-INF/maven/org.liquibase/liquibase-maven-plugin/pom.xml mv pom.xml liquibase-maven-plugin-${version}.pom @@ -87,15 +87,31 @@ jobs: sed -i -e "s//Liquibase CDI Plugin<\/name>/" liquibase-cdi-${version}.pom ## name didn't end up in pom. Hack it in for now gpg --batch --pinentry-mode=loopback --passphrase "$GPG_PASSWORD" -ab liquibase-cdi-${version}.pom + unzip -j liquibase-commercial-${version}.jar META-INF/maven/org.liquibase/liquibase-commercial/pom.xml + mv pom.xml liquibase-commercial-${version}.pom + gpg --batch --pinentry-mode=loopback --passphrase "$GPG_PASSWORD" -ab liquibase-commercial-${version}.pom + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \ -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ -DrepositoryId=sonatype-nexus-staging \ - -DpomFile=liquibase-${version}.pom \ + -DpomFile=liquibase-core-${version}.pom \ -DgeneratePom=false \ - -Dfile=liquibase-${version}.jar \ - -Dsources=liquibase-${version}-sources.jar \ - -Djavadoc=liquibase-${version}-javadoc.jar \ - -Dfiles=liquibase-${version}.jar.asc,liquibase-${version}-sources.jar.asc,liquibase-${version}-javadoc.jar.asc,liquibase-${version}.pom.asc \ + -Dfile=liquibase-core-${version}.jar \ + -Dsources=liquibase-core-${version}-sources.jar \ + -Djavadoc=liquibase-core-${version}-javadoc.jar \ + -Dfiles=liquibase-core-${version}.jar.asc,liquibase-core-${version}-sources.jar.asc,liquibase-core-${version}-javadoc.jar.asc,liquibase-core-${version}.pom.asc \ + -Dtypes=jar.asc,jar.asc,jar.asc,pom.asc \ + -Dclassifiers=,sources,javadoc, + + mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \ + -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ + -DrepositoryId=sonatype-nexus-staging \ + -DpomFile=liquibase-commercial-${version}.pom \ + -DgeneratePom=false \ + -Dfile=liquibase-commercial-${version}.jar \ + -Dsources=liquibase-commercial-${version}-sources.jar \ + -Djavadoc=liquibase-commercial-${version}-javadoc.jar \ + -Dfiles=liquibase-commercial-${version}.jar.asc,liquibase-commercial-${version}-sources.jar.asc,liquibase-commercial-${version}-javadoc.jar.asc,liquibase-commercial-${version}.pom.asc \ -Dtypes=jar.asc,jar.asc,jar.asc,pom.asc \ -Dclassifiers=,sources,javadoc, From 0cba1f430b0cac5da57ff686b3980ffc4c78a07c Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 13 Jul 2022 10:16:25 -0500 Subject: [PATCH 12/19] Updating release logic for new liquibase-core/liquibase-commerical jars --- .github/util/re-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index a49551f34c8..3f8e1c277e8 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -79,7 +79,7 @@ do done #### Update javadoc jars -declare -a javadocJars=("liquibase-0-SNAPSHOT-javadoc.jar" "liquibase-cdi-0-SNAPSHOT-javadoc.jar" "liquibase-maven-plugin-0-SNAPSHOT-javadoc.jar") +declare -a javadocJars=("liquibase-core-0-SNAPSHOT-javadoc.jar" "liquibase-cdi-0-SNAPSHOT-javadoc.jar" "liquibase-maven-plugin-0-SNAPSHOT-javadoc.jar") for jar in "${javadocJars[@]}" do From 1c44a24e0a9cb35a0ae6d259b44ff52c30ed5d9a Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 13 Jul 2022 10:57:16 -0500 Subject: [PATCH 13/19] Updating release logic for new liquibase-core/liquibase-commerical jars --- .github/util/re-version.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index 3f8e1c277e8..02261b3830f 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -51,9 +51,9 @@ do unzip -q $workdir/$jar META-INF/* -d $workdir java -cp $scriptDir ManifestReversion $workdir/META-INF/MANIFEST.MF $version - find $workdir/META-INF -name pom.xml -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/" {} \; - find $workdir/META-INF -name pom.properties -exec sed -i -e "s/0-SNAPSHOT/$version/" {} \; - find $workdir/META-INF -name plugin*.xml -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/" {} \; + find $workdir/META-INF -name pom.xml -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/g" {} \; + find $workdir/META-INF -name pom.properties -exec sed -i -e "s/0-SNAPSHOT/$version/g" {} \; + find $workdir/META-INF -name plugin*.xml -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/g" {} \; (cd $workdir && jar -uMf $jar META-INF) rm -rf $workdir/META-INF @@ -86,8 +86,8 @@ do mkdir $workdir/rebuild unzip -q $workdir/$jar -d $workdir/rebuild - find $workdir/rebuild -name "*.html" -exec sed -i -e "s/0-SNAPSHOT/$version/" {} \; - find $workdir/rebuild -name "*.xml" -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/" {} \; + find $workdir/rebuild -name "*.html" -exec sed -i -e "s/0-SNAPSHOT/$version/g" {} \; + find $workdir/rebuild -name "*.xml" -exec sed -i -e "s/0-SNAPSHOT<\/version>/$version<\/version>/g" {} \; (cd $workdir/rebuild && jar -uf ../$jar *) rm -rf $workdir/rebuild From 57b9e5ac1d58453a52384701507acd4bb5b7bdda Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 13 Jul 2022 13:31:36 -0500 Subject: [PATCH 14/19] Merged master into branch --- .github/util/re-version.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index 02261b3830f..b6de5902362 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -132,6 +132,7 @@ done ##### update zip/tar files +mkdir -p $workdir/internal/lib cp $outdir/liquibase-core-$version.jar $workdir/internal/lib/liquibase-core.jar ##save versioned jar as unversioned to include in zip/tar cp $outdir/liquibase-commercial-$version.jar $workdir/internal/lib/liquibase-commercial.jar ##save versioned jar as unversioned to include in zip/tar From eeeb69aa768fe6f9430f911ab0c8e43e608f186e Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Wed, 13 Jul 2022 13:36:45 -0500 Subject: [PATCH 15/19] Updating release logic for new liquibase-core/liquibase-commerical jars --- .github/util/re-version.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/util/re-version.sh b/.github/util/re-version.sh index b6de5902362..16bcaecee6f 100755 --- a/.github/util/re-version.sh +++ b/.github/util/re-version.sh @@ -139,8 +139,8 @@ cp $outdir/liquibase-commercial-$version.jar $workdir/internal/lib/liquibase-com ## Extract tar.gz and rebuild it back into the tar.gz and zip mkdir $workdir/tgz-repackage (cd $workdir/tgz-repackage && tar -xzf $workdir/liquibase-0-SNAPSHOT.tar.gz) -cp $workdir/liquibase-core.jar $workdir/tgz-repackage/internal/lib/liquibase-core.jar -cp $workdir/liquibase-commercial.jar $workdir/tgz-repackage/internal/lib/liquibase-commercial.jar +cp $workdir/internal/lib/liquibase-core.jar $workdir/tgz-repackage/internal/lib/liquibase-core.jar +cp $workdir/internal/lib/liquibase-commercial.jar $workdir/tgz-repackage/internal/lib/liquibase-commercial.jar find $workdir/tgz-repackage -name "*.txt" -exec sed -i -e "s/0-SNAPSHOT/$version/" {} \; (cd $workdir/tgz-repackage && tar -czf $outdir/liquibase-$version.tar.gz *) (cd $workdir/tgz-repackage && zip -qr $outdir/liquibase-$version.zip *) From ecb0f83f8e8d8b899226cc321e5149b1869c678b Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Thu, 14 Jul 2022 15:25:05 -0500 Subject: [PATCH 16/19] Working on commercial vs. core jar split --- .../src/main/resources/liquibase/examples/start-h2.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat b/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat index 6431ee22f5e..6bbfb97c28b 100644 --- a/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat +++ b/liquibase-core/src/main/resources/liquibase/examples/start-h2.bat @@ -6,7 +6,7 @@ setlocal enabledelayedexpansion rem %~dp0 is expanded pathname of the current script under NT rem %~p0 is the directory of the current script -if exist %~p0\..\GETTING_STARTED.txt SET LIQUIBASE_HOME=%~p0.. +if exist %~p0\..\liquibase.bat SET LIQUIBASE_HOME=%~p0.. if "%LIQUIBASE_HOME%"=="" ( FOR /F "tokens=* USEBACKQ" %%g IN (`where liquibase.bat`) do (SET "LIQUIBASE_HOME=%%~dpg") From f4669ad6ddb69c4ce4da25e84d149b47d985771b Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Fri, 15 Jul 2022 13:38:11 -0500 Subject: [PATCH 17/19] Updated "XSD not found" error message to include missing extensions --- .../liquibase/parser/core/xml/LiquibaseEntityResolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java b/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java index 98d7ec6e72d..5c1de3f7d1d 100644 --- a/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java +++ b/liquibase-core/src/main/java/liquibase/parser/core/xml/LiquibaseEntityResolver.java @@ -56,9 +56,9 @@ public InputSource resolveEntity(String name, String publicId, String baseURI, S if (streams.isEmpty()) { if (GlobalConfiguration.SECURE_PARSING.getCurrentValue()) { - String errorMessage = "Unable to resolve xml entity " + systemId + " locally: " + + String errorMessage = "Unable to resolve xml entity " + systemId + ". " + GlobalConfiguration.SECURE_PARSING.getKey() + " is set to 'true' which does not allow remote lookups. " + - "Set it to 'false' to allow remote lookups of xsd files."; + "Check for spelling or capitalization errors and missing extensions such as liquibase-commercial in your XSD definition. Or, set it to 'false' to allow remote lookups of xsd files."; throw new XSDLookUpException(errorMessage); } else { log.fine("Unable to resolve XML entity locally. Will load from network."); From 94df4b499ee89522bdac9f2bece02f0506aa2737 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Sat, 16 Jul 2022 14:26:00 -0500 Subject: [PATCH 18/19] Updated "XSD not found" error message to include missing extensions --- .../liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy b/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy index a89b324e0d9..40c3880c710 100644 --- a/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy +++ b/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy @@ -80,7 +80,7 @@ class XMLChangeLogSAXParserTest extends Specification { then: def e = thrown(ChangeLogParseException) - e.message.contains("Unable to resolve xml entity file:///invalid.txt locally: liquibase.secureParsing is set to 'true' which does not allow remote lookups. Set it to 'false' to allow remote lookups of xsd files") + e.message == "Unable to resolve xml entity file:///invalid.txt. liquibase.secureParsing is set to 'true' which does not allow remote lookups. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial in your XSD definition. Or, set it to 'false' to allow remote lookups of xsd files." } def "allows liquibase.secureParsing=false to disable secure parsing"() { From 1a9a00528336e0deba2f613a7c1826dddfb0b957 Mon Sep 17 00:00:00 2001 From: Nathan Voxland Date: Sat, 16 Jul 2022 15:40:21 -0500 Subject: [PATCH 19/19] Updated "XSD not found" error message to include missing extensions --- .../liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy b/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy index 40c3880c710..eee93b902fd 100644 --- a/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy +++ b/liquibase-core/src/test/groovy/liquibase/parser/core/xml/XMLChangeLogSAXParserTest.groovy @@ -80,7 +80,7 @@ class XMLChangeLogSAXParserTest extends Specification { then: def e = thrown(ChangeLogParseException) - e.message == "Unable to resolve xml entity file:///invalid.txt. liquibase.secureParsing is set to 'true' which does not allow remote lookups. Check for spelling or capitalization errors and missing extensions such as liquibase-commercial in your XSD definition. Or, set it to 'false' to allow remote lookups of xsd files." + e.message.contains("Unable to resolve xml entity file:///invalid.txt. liquibase.secureParsing is set to 'true'") } def "allows liquibase.secureParsing=false to disable secure parsing"() {