diff --git a/proposal/myrmidon/src/xdocs/buildfile.xml b/proposal/myrmidon/src/xdocs/buildfile.xml new file mode 100644 index 000000000..785d6de02 --- /dev/null +++ b/proposal/myrmidon/src/xdocs/buildfile.xml @@ -0,0 +1,258 @@ + + + +Adam Murdoch +User Guide + + + + +
+ +

+The project file format is very similar to that of Ant 1. The root element of +the project file must be a <project> element. It can +take the following attributes: +

+ + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault Value
nameThe project name.The base-name of the project file, with the extension removed.
basedirThe base directory for the project. The base directory is used + to resolve all relative file names used in the project file. + The directory containing the project file.
defaultThe name of the default target.main
versionThe project file version that the project is written for.None, must be 2.0
+ +

+A <project> element can contain the following elements, +in the order given below: +

+ + + + + +

Project references allow the project to import, or reference, other projects. +A <projectref> element takes the following attributes:

+ + + + + + + + + + + + + +
AttributeDescriptionDefault Value
nameThe name to use to identify the referenced project.Required
locationThe path to the project file to reference.Required
+ +

+The targets of a referenced project can be used in the depends list +of a target in the referencing project, using the following syntax: +project-name->target-name. Here is a simple example:

+ + + + + + + + .. do some stuff .. + + +]]> + +
+ + + +

Library imports allow the project to import the tasks and data-types from an +antlib. An <import> element takes the following attributes:

+ + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault Value
libraryThe name of the library to import. The ext directory + of the Myrmidon distribution is searched for a library file with + the given name, and an atl extension.Required
typeThe type of definition to import. Values include task, + and data-type.None
nameThe name of the type to import.None
+ +

+If the type and name attributes are not provided, +the entire contents of the antlib are imported. +

+ +

The following example import the <my-task> task from +the my-tasks antlib.

+ + + + + + + + + +]]> + +
+ + + +

Implicit tasks are run before any of the project's targets are run. Any task +can be used, including <property> and data-type instances. +Implicit tasks can be used to initialise the project. For example:

+ + + + + + + + Set classpath to ${classpath} + + + .. do some stuff .. + + + +]]> + +
+ + + +

Targets have the same format as in Ant 1.x, though some of the behaviour +is different. A <target> element takes the following +attributes:

+ + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionDefault Value
nameThe name of the target.Required
dependsA comma-separated list of targets that this target depends on. + This list can contain targets from referenced projects.None
ifOnly execute this target if the specified property is set, and not + equal to false.None
unlessDo not execute this target if the specified property is set, and not + equal to false.None
+ +
+ +
+ +
+ +

+The following table lists some of the current set of tasks. You can find +example usages of these tasks in the sample project file +src/make/sample.ant. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TaskDescription
failCauses the build to fail.
ifConditionally executes a set of tasks.
load-propertiesLoads a set of properties from a file.
logWrites a log message.
propertySets a property.
try-catchRuns a set of tasks, with a provided error and clean-up handler.
converter-defRegister a type converter. These are used when configuring a task + or data-type from attributes.
type-defRegister a task or data-type.
importRegister the contents of an antlib.
+ +
+ + +
diff --git a/proposal/myrmidon/src/xdocs/user.xml b/proposal/myrmidon/src/xdocs/user.xml index 8950a2829..168f285e0 100644 --- a/proposal/myrmidon/src/xdocs/user.xml +++ b/proposal/myrmidon/src/xdocs/user.xml @@ -112,252 +112,6 @@ the command-line options that are available. -
- -

-The project file format is very similar to that of Ant 1. The root element of -the project file must be a <project> element. It can -take the following attributes: -

- - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionDefault Value
nameThe project name.The base-name of the project file, with the extension removed.
basedirThe base directory for the project. The base directory is used - to resolve all relative file names used in the project file. - The directory containing the project file.
defaultThe name of the default target.main
versionThe project file version that the project is written for.None, must be 2.0
- -

-A <project> element can contain the following elements, -in the order given below: -

- - - - - -

Project references allow the project to import, or reference, other projects. -A <projectref> element takes the following attributes:

- - - - - - - - - - - - - -
AttributeDescriptionDefault Value
nameThe name to use to identify the referenced project.Required
locationThe path to the project file to reference.Required
- -

-The targets of a referenced project can be used in the depends list -of a target in the referencing project, using the following syntax: -project-name->target-name. Here is a simple example:

- - - - - - - - .. do some stuff .. - - -]]> - -
- - - -

Library imports allow the project to import the tasks and data-types from an -antlib. An <import> element takes the following attributes:

- - - - - - - - - - - - - - - - - - -
AttributeDescriptionDefault Value
libraryThe name of the library to import. The ext directory - of the Myrmidon distribution is searched for a library file with - the given name, and an atl extension.Required
typeThe type of definition to import. Values include task, - and data-type.None
nameThe name of the type to import.None
- -

-If the type and name attributes are not provided, -the entire contents of the antlib are imported. -

- -

The following example import the <my-task> task from -the my-tasks antlib.

- - - - - - - - - -]]> - -
- - - -

Implicit tasks are run before any of the project's targets are run. Any task -can be used, including <property> and data-type instances. -Implicit tasks can be used to initialise the project. For example:

- - - - - - - - Set classpath to ${classpath} - - - .. do some stuff .. - - - -]]> - -
- - - -

Targets have the same format as in Ant 1.x, though some of the behaviour -is different. A <target> element takes the following -attributes:

- - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionDefault Value
nameThe name of the target.Required
dependsA comma-separated list of targets that this target depends on. - This list can contain targets from referenced projects.None
ifOnly execute this target if the specified property is set, and not - equal to false.None
unlessDo not execute this target if the specified property is set, and not - equal to false.None
- -
- -
- -
- -

-The following table lists some of the current set of tasks. You can find -example usages of these tasks in the sample project file -src/make/sample.ant. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TaskDescription
failCauses the build to fail.
ifConditionally executes a set of tasks.
load-propertiesLoads a set of properties from a file.
logWrites a log message.
propertySets a property.
try-catchRuns a set of tasks, with a provided error and clean-up handler.
converter-defRegister a type converter. These are used when configuring a task - or data-type from attributes.
type-defRegister a task or data-type.
importRegister the contents of an antlib.
- -