Installation/Custom/Apache Ant
|
|
Contents
Apache Ant
Apache Ant is a Java-based build tool used by Openbravo to automate most of its development / deployment tasks.
For the specific versions supported and the currently recommended version check the System Requirements.
Working ant installation to it can be called from command line and uses the Java version installed / configured in the earlier step.
Required configuration
The variable ANT_OPTS needs to be configured to specify at least 1GB of Java Heap for running ant tasks.
Example install using Ubuntu 18.04 LTS
Install ant package <source lang="bash">apt-get install ant</source>
Create config file to specify memory:
<source lang="bash">sudo su - echo 'export ANT_OPTS="-Xmx1024M"' > /etc/profile.d/ant.sh </source>
Example install of Apache Ant on Microsoft Windows
- Download and extract Apache Ant onto your system (for instance, C:\Apache-Ant).
- Add ANT_HOME environment variable:
- Right-click on My Computer.
- Select Properties. The System Properties window appears.
- Select the Advanced tab.
- Click on the Environment Variables button.
- Click the New button.
- In the Variable name field, type ANT_HOME.
- In the Variable value field, type the path of the Ant directory. This is usually C:\Apache-Ant.
- Click OK.
- Select the PATH environment variable.
- In the Variable value field type %ANT_HOME%\bin.
- Equally add the ANT_OPTS environment variable:
- Click the New button.
- In the Variable name field, type ANT_OPTS.
- In the Variable value field, type -Xmx1024M.
How to test the installation
In Command Prompt (cmd.exe) run all of the following commands and verify their output.
echo %ANT_OPTS%
ant -version
Both command should work without errors and the output should be the ant options you just defined above and the ant version you have installed.
If any of those previous steps did not work go back and fix it now. As it will otherwise lead to problem later on.