• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/7

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

7 Cards in this Set

  • Front
  • Back

Why do we need ANT?

ANT is platform independent, as a result the same build.xml can be deployed on Windows or Unix machines without modficiations.

What is a target?

A target is a task or a unit of work in ant. ANT builds contain a series of targets to be executed. They are defined by a <target> element.

What is the syntax for compiling java classes? How do you compile java classes in ant?

the javac element can set a java class up for compilation. Its srcdir and destdir indicate where the source java file is and where the resulting class file should go. A <classpath> subelement can point to where there may be any dependencies for the jar through its <fileset> element.

How do you JAR a Java project in ANT?

The <jar> element is used to create a jar file. It has a number of attributes to accomplish this.


the basedir sets the base directory to be jared.


destdir sets where the jar will be saved


include sets the files to include in the jar


exclude sets any files to be excluded.



Wild card characters can be used for the include and exclude tags.

What does "depends" do in ANT?

The depends attribute in a target element tells the target to not execute until another target has completed.

Explain inheritance in ANT?

The following tasks involve inheritance: <antcall> and <ant>. The ant task is used to invoke a target located in another build file. This allows a project to be scalable through child modules controlled through a master build file.



the inheritAll set to true property/attribtue of an <ant> element can tell the child build target to inherit all the properties of the master.

How do you use an IF statement in ANT?

IF logic is not native, so it needs to be added using a third party jar, like source forge's ANT-contrib.jar. You declare the namespace for the jar then you can use the namespace with the logic elements where needed in the project.



<project name="define-ac">


<taskdef resource="net/sf/antcontrib/antcontrib.properties">


<uri = "http://antcontrib.sf.net>


.


.


</project>



<ac:if>


<condition>


<ac:then>


do something


</ac:then>


</ac:if>