Installation/Custom/Apache Ant

From InfiniteERP Wiki
Jump to: navigation, search

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.

Bulbgraph.png   {{{1}}}

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

  1. Download and extract Apache Ant onto your system (for instance, C:\Apache-Ant).
  2. Add ANT_HOME environment variable:
    1. Right-click on My Computer.
    2. Select Properties. The System Properties window appears.
    3. Select the Advanced tab.
    4. Click on the Environment Variables button.
    5. Click the New button.
    6. In the Variable name field, type ANT_HOME.
    7. In the Variable value field, type the path of the Ant directory. This is usually C:\Apache-Ant.
    8. Click OK.
    9. Select the PATH environment variable.
    10. In the Variable value field type %ANT_HOME%\bin.
  3. Equally add the ANT_OPTS environment variable:
    1. Click the New button.
    2. In the Variable name field, type ANT_OPTS.
    3. 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.

  1. echo %ANT_OPTS%
  2. 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.