# Liquibase and ANT Project

**URL:** https://forum.liquibase.org/t/liquibase-and-ant-project/8093
**Category:** General Discussion
**Created:** [April 18, 2023, 4:58pm UTC](https://forum.liquibase.org/t/liquibase-and-ant-project/8093 "2023-04-18T16:58:10Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![liquibaseguy](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@liquibaseguy](https://forum.liquibase.org/u/liquibaseguy)
#### Post date: [April 18, 2023, 4:58pm UTC](https://forum.liquibase.org/t/liquibase-and-ant-project/8093/1 "2023-04-18T16:58:10Z")

</div>

Hi, I’ve read through a lot of articles about Liquibase but wanted a clear answer. I have a big Java project/MySQL DB that uses Ant as the build system. I want to deploy/install my application on different computers, hence I want to use Liquibase to keep track of my DB changes.

My question is, does each computer have to have Liquibase installed and then my application would have to provide the changelog and SQL script? Or do I add Liquibase into my Ant script and this would provide Liquibase when installing my package/installer onto other computers (without installing Liquibase on all computers)?

My guess is the latter where you don’t have to install Liquibase onto all computers because it is integrated into your installer/package? Is this the correct way to use Liquibase?

---

<div class="post-metadata">

### Author: ![PJatLiquibase](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@PJatLiquibase](https://forum.liquibase.org/u/PJatLiquibase)
#### Post date: [April 25, 2023, 5:50pm UTC](https://forum.liquibase.org/t/liquibase-and-ant-project/8093/2 "2023-04-25T17:50:38Z")

</div>

Hi @liquibaseguy,

You’re correct in your understanding that you don’t have to install Liquibase on each computer. There are a couple of ways you can approach this, and integrating Liquibase into your Ant build script is a popular one. By doing this, you can bundle Liquibase with your application and utilize it to manage your database changes during the deployment process.

Here’s how you can incorporate Liquibase into your Ant build script:

1. Add the Liquibase and database JDBC driver JAR files to your project’s lib folder or include them as dependencies using your preferred dependency management tool (e.g., Maven or Gradle).

2. Update your Ant build script to include the necessary tasks for running Liquibase commands, such as `update`, `rollback`, and others. You can find detailed information on how to use Liquibase with Ant in the official documentation: [Ant](https://docs.liquibase.com/tools-integrations/ant/home.html)

By integrating Liquibase into your Ant script, you can execute database migrations during the deployment process on different computers without the need for a separate Liquibase installation.

Another approach you can take is to use Liquibase as a library within your Java application. This way, you can programmatically execute Liquibase commands during the application startup or when required. This can be achieved by including Liquibase and the appropriate JDBC driver as dependencies and using the Liquibase Java API to run the necessary commands.

Regardless of the approach you choose, remember to include your changelog files and any necessary SQL scripts within your application’s resources, so they can be accessed by Liquibase during deployment.

I hope this helps you in implementing Liquibase with your Java project and Ant build system. If you have any further questions or need clarification, please don’t hesitate to ask.

Best regards,  
PJ
