Social Icons

Pages

Sunday, 23 September 2012

Run a database upgrade script for your maven project.

If you build your project using maven but use ant to upgrade the database following will be a guideline to configure the environment if you get an error as ANT_HOME Not found.

Background description:
The first time you check out the project from the svn repository and build it the database scripts will get unpacked in a folder. In most large projects the folder name is database for correct location.

Whenever you wish to access the database upgrade script and run it from the command line you will have to use the following steps.

1.If ant is used to build the scripts then the first step to perform is to set the ANT_HOME.
I have to perform research as to if there are two project with their own ant instances how does it specifically work. But,however in order to set the ANT_HOME specify the path in the environment variables to point to the specific ant.bat file location.

For example :
DriveName:\ProjectName\database\target\sqlserver\bin -> this is the location of the ant.bat file.

If you set the ANT_HOME correctly you will not get the following error:
ANT_HOME not found.

2.After that open a fresh instance of the command prompt and then run the script again which should work great.


Problem solved. 


No comments:

Post a Comment

 

Contact Us

info@intellozene.com

Our Website:
www.intellozene.com