Ant - the difference between the task and the goal

I am new to Ant and have difficulty understanding some of its basic things, such as taskand target.

Online documentation and books say that targetthis is the stage of the entire assembly process, and that taskis the smallest part of the work. However, it’s very difficult for me to understand what exactly is meant by this,

Can someone explain in detail with examples of examples targetand taskin Ant?

+4
source share
2 answers

Goals contain one or more tasks.

- , , " " " jar". ( ).

Ant ( ) - , " ", " ". (. Ant ), , .

Ant :

<target name="compile">
    <mkdir dir="build/classes"/>
    <javac srcdir="src" destdir="build/classes"/>
</target>

"" ( . - "doUsefulStuff" ). , , :

  • ( mkdir)

  • 1, javac

( - , - - ).

+7

, ant ( ), . , ant , ant [options] [target]. , , (build.xml).

ant ant Eclipse, , .

(, ) . , <target> description. , / build.xml. .

+1

Source: https://habr.com/ru/post/1537233/


All Articles