LinuxCommandLibrary

ant

Java-based build automation tool

TLDR

Run default target

$ ant
copy
Run specific target
$ ant [build]
copy
Run with build file
$ ant -f [build.xml] [target]
copy
Run with property
$ ant -Dproperty=[value] [target]
copy
List available targets
$ ant -p
copy
Run quietly
$ ant -q [target]
copy

SYNOPSIS

ant [-f buildfile] [-D property=value] [options] [target]

DESCRIPTION

ant (Another Neat Tool) is a Java-based build tool using XML configuration files. It automates software build processes including compiling, testing, packaging, and deploying Java applications.
Build files (typically build.xml) define targets containing tasks. Ant executes tasks in dependency order, similar to make but using XML syntax and platform-independent operation.

PARAMETERS

-f file, -buildfile file

Build file (default: build.xml)
-D prop=val
Set property value
-p, -projecthelp
List available targets
-q, -quiet
Minimal output
-v, -verbose
Verbose output
-d, -debug
Debug output
-e, -emacs
Output without adornment
-k, -keep-going
Continue on error
-lib path
Additional classpath
-version
Show version

CAVEATS

Requires Java Runtime Environment. XML build files can become verbose for complex projects. Largely superseded by Maven and Gradle for modern Java projects.

HISTORY

Apache Ant was created by James Duncan Davidson as part of the Tomcat project, with the first standalone release in 2000. It was the dominant Java build tool until Maven gained popularity in the mid-2000s.

SEE ALSO

mvn(1), gradle(1), make(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community