Open main menu

CDOT Wiki β

Changes

User:Minooz/RepoSyncProj/Ant

440 bytes added, 14:30, 14 October 2010
no edit summary
</project>
</source>
:A ''project '' has three attributes: '''name''': the name of the project. '''default''': the default target to use when no target is supplied. '''basedir''': the base directory from which all path calculations are done
: Each project defines one or more targets which are a set of task elements you want to execute
: When starting ant, you can select which target(s) you want to have executed
:A ''target '' has the following attributes: '''name''': the name of the target. '''depends''': a comma-separated list of names of targets. '''if''': the name of the property that must be set in order for this target to execute
:It should be noted, however, that Ant's depends attribute only specifies the order in which targets should be executed - it does not affect whether the target that specifies the dependency(s) gets executed if the dependent target(s) did not (need to) run.
</source>
 
:A project can have a set of properties
:A ''property'' has a name and a value; the name is case-sensitive. Properties may be used in the value of task attributes. This is done by placing the property name between "${" and "}" in the attribute value. Example:
::If "builddir" property with the value “c:/test",
::This could be used in an attribute like this: ${builddir}/classes
::This is resolved at run-time as c:/test/classes
==Tips==
:In Cygwin in the ''build'' folder. Just typing <code>ant</code>, will build the default target of the project. But typing <code>ant assign1.test</code> for example, will start from mentioned target.
1
edit