Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split liquibase-core and liquibase-commercial jar files #3050

Merged
merged 23 commits into from Jul 20, 2022

Conversation

nvoxland
Copy link
Contributor

@nvoxland nvoxland commented Jul 8, 2022

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Rather than having liquibase-core contain both the functionality from this repository as well as the commercial code, keep "liquibase-core" as the base, open source library and create a new "liquibase-commercial" as the additional proprietary/commercial functionality.

The new liquibase-commercial.jar file will be available:

  • In maven central
  • As an additional asset on release pages
  • As an additional jar in the liquibase-artifacts.zip and liquibase-artifacts-<BRANCH_NAME>.zip build artifacts

For consistency, the liquibase-core.jar file will now be stored as liquibase-core.jar on the build and release assets pages rather than liquibase.jar like it previously was.

Impacts

CLI

The liquibase CLI distributions will continue to include both liquibase-core.jar and liquibase-commerical.jar in the internal/lib directory**, so there is no impact for CLI users,** regardless of what distribution is used (tar.gz file, zip file, or docker image). The existing liquibase launch scripts have been updated to use the correct jar files.

While we will not ship a CLI distribution without liquibase-commercial.jar, removing any non-open source code is simply a matter of deleting internal/lib/liquibase-commercial.jar

NOTE: The liquibase-core.jar file was previously called liquibase.jar and stored in the root of LIQUIBASE_HOME. So anyone working directly with the liquibase.jar file will need to update their usage to use internal/lib/liquibase-core.jar.

NOTE: If you upgrade over an existing LIQUIBASE_HOME installation, the old liquibase.jar file will continue to exist because there is no logic to clean up old files. It can be deleted at your leisure, and it will not be used by Liquibase if left.

Maven Plugin

The Liquibase-maven-plugin will now depend on both liquibase-core and liquibase-commercial instead of just liquibase-core. This means that anyone using the maven plugin as:

            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                ...

will continue to be able to use both free and paid functionality with no changes to their configuration.

Servlet / Spring / Ant Integrations

See "User Managed Dependencies" below

User Managed Dependencies

Any projects that were directly or indirectly referencing or using "liquibase-core" will no longer include the commercial functionality. To continue to use Liquibase Pro features, you need to have both liquibase-core.jar and liquibase-commercial.jar as part of your project.

If you are managing your project using a tools that follows Maven managed dependencies (Maven, Gradle, Ivy, etc.), the easiest approach is to change your dependency on liquibase-core to liquibase-commercial. Because liquibase-commercial defines liquibase-core as a dependency, you will automatically get both included in your project without having to manage multiple dependencies yourself.

If you are not directly referencing liquibase-core yourself, but it is comes along as a transitive dependency (like if you use spring-boot), add org.liquibase:liquibase-commercial as an additional dependency in your project.

@github-actions
Copy link

github-actions bot commented Jul 8, 2022

Unit Test Results

  4 608 files  ±0    4 608 suites  ±0   42m 4s ⏱️ + 3m 37s
  4 593 tests ±0    4 375 ✔️  - 4     218 💤 +4  0 ±0 
54 288 runs  ±0  49 276 ✔️  - 4  5 012 💤 +4  0 ±0 

Results for commit 68556e4. ± Comparison against base commit eb62560.

♻️ This comment has been updated with latest results.

@kataggart kataggart added the ReleaseMajor Fix needs to be part of an x.y release, not an x.y.z patch release label Jul 11, 2022
@kataggart kataggart added this to To Do in Conditioning++ via automation Jul 11, 2022
@nvoxland
Copy link
Contributor Author

Corresponding PRs:

@nvoxland
Copy link
Contributor Author

nvoxland commented Jul 11, 2022

Things to test:

  • In the build's liquibase-artifacts-*.zip artifacts:
    • Both liquibase-core.jar and liquibase-commercial.jar exist
  • The liquibase-core.jar:
    • Does not include a liquibase/pro directory
  • The liquibase-maven-plugin.jar's:
    • META-INF/maven/.../pom.xml file has both liquibase-core and liquibase-commercial as dependnecies
  • The liquibase-commercial-jar:
    • Has liquibase-core as a dependency
    • Has correct license and other metadata
    • Does not include any other dependencies
  • The liquibase.tar.gz:
    • Has no /liquibase.jar file
    • Has liquibase-core.jar and liquibase-commercial.jar in internal/lib
    • Has no additional or missing internal/lib jar files vs 4.13.0 besides liquibase-commercial.jar

@nvoxland nvoxland requested a review from suryaaki2 July 13, 2022 20:52
@nvoxland
Copy link
Contributor Author

I think this is all working now, including the "re-version" logic. I tested that with a test run of the action.

@FBurguer
Copy link

FBurguer commented Jul 15, 2022

TEST:

  1. MacOS Installer:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key: PASS
  • Pro Features unavailble with Pro Key and deleting liquibase-commercial.jar: PASS
  1. Windows Installer:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key: PASS
  • Pro Features unavailble with Pro Key and deleting liquibase-commercial.jar: PASS
  1. Ant Integration:
  • Pro Features access denied without Pro Key and with liquibase-commercial.jar included: PASS
  • Pro Features access with Pro Key and with liquibase-commercial.jar included: PASS
  • Pro Features unavailble with Pro Key but without liquibase-commercial.jar included: PASS
  • Upgrade from core to Pro with liquibase-commercial.jar included and Pro Key: PASS
  1. Servlet Integration:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key (not available at the moment but the code is accesable): PASS
  • Pro Features unavailble with Pro Key but without liquibase-commercial.jar included: PASS
  • Upgrade from core to Pro with liquibase-commercial.jar included and Pro Key(not available at the moment but the code is accesable): PASS
  1. .zip file:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key: PASS
  • Pro Features unavailble with Pro Key and deleting liquibase-commercial.jar: PASS
  1. .tar file:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key: PASS
  • Pro Features unavailble with Pro Key and deleting liquibase-commercial.jar: PASS
  1. Spring-boot/Spring integration:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key (not available at the moment but the code is accesable): PASS
  • Pro Features unavailble with Pro Key but without liquibase-commercial.jar included: PASS
  • Upgrade from core to Pro with liquibase-commercial.jar included and Pro Key(not available at the moment but the code is accesable): PASS
  1. Maven plug-in:
  • Pro Features access denied without Pro Key: PASS
  • Pro Features access with Pro Key: PASS
    (there is no way to exclude liquibase-commercial.jar at the momment)

@FBurguer
Copy link

FBurguer commented Jul 15, 2022

Post Release distributions tests pending:

  • Gradle Integration
  • liquibase.org/download
  • Hombrew
  • Choclatery
  • Docker

@nvoxland nvoxland added this to the NEXT milestone Jul 15, 2022
# Conflicts:
#	liquibase-cli/src/main/java/liquibase/integration/commandline/LiquibaseLauncher.java
#	liquibase-dist/pom.xml
@kataggart kataggart linked an issue Jul 20, 2022 that may be closed by this pull request
@nvoxland nvoxland merged commit bbbd3a8 into master Jul 20, 2022
Conditioning++ automation moved this from To Do to Done Jul 20, 2022
@nvoxland nvoxland deleted the github-action-DAT-10497 branch July 20, 2022 21:20
@kataggart
Copy link
Contributor

this PR makes me so happy
that is all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CodeDistro DocNeeded enabler marketingRequired ReleaseMajor Fix needs to be part of an x.y release, not an x.y.z patch release sprint2022-29
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Provide Liquibase jar without packaged dependencies and pro packages
7 participants