Professional Java Tools for Extreme Programming: Ant, XDoclet, JUnit, Cactus, and Maven (Programmer to Programmer)

File Library Tasks

Ants file library tasks enable you to bundles classes and other files into library files such as JARs and WARs.

Jar Task

The jar task creates a Java type Java Application Resource (JAR) file:

<jar jarfile="[jar]" basedir="[directory]"/>

Parameters

Nested Parameters

War Task

The war task creates a Java type Web Application Resource (WAR) file.

<war warfile="[file name]" webxml="[file name]"> <fileset dir="[path]"/> <lib dir="[path]"> </lib> <classes dir="[path]"/> </war>

Parameters

Nested Parameters

Zip Task

The zip task creates a compressed file library of the Zip type.

<zip zipfile="[file]" basedir="[path]" />

Parameters

Nested Parameters

Unjar, Unzip, and Unwar Tasks

The unzip task expands file libraries of the Zip type, including WARs and JARs:

<unzip src="[file]" dest="[directory]"/>

Parameters

Категории