RT-Druid ant tasks

From ErikaWiki

(Difference between revisions)
Jump to: navigation, search
Line 35: Line 35:
the union of all input files specified by each nested element.  
the union of all input files specified by each nested element.  
The only requirement here is that resulting collection contains at least one input file.
The only requirement here is that resulting collection contains at least one input file.
 +
 +
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<project name="rtdruid" default="convert" basedir=".">
 +
<target name="convert">
 +
<!-- default values -->
 +
<property name="output_file" value="conf.oil"/>
 +
<rtdruid.Convert store="${output_file}">
 +
<fileset dir="conf_1">
 +
<include name="*.oil"/>
 +
<include name="*.ertd"/>
 +
</filset>
 +
<fileset dir="conf_2">
 +
<include name="*.rtd"/>
 +
</filset>
 +
<filelist dir="${conf.src}">
 +
<file name="base.oil"/>
 +
<file name="system.ertd"/>
 +
</filelist>
 +
</rtdruid.Convert>
 +
</target>
 +
</project>
 +
</nowiki>
== rtdruid.Oil.Configurator ==
== rtdruid.Oil.Configurator ==
Line 76: Line 100:
The only requirement here is that resulting collection contains at least one input file.
The only requirement here is that resulting collection contains at least one input file.
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<project name="rtdruid" default="compile" basedir=".">
 +
<target name="compile">
 +
<!-- default values -->
 +
<property name="in_conf_file" value="conf.oil"/>
 +
<property name="pref_file" value=""/>
 +
<property name="conf_output_dir" value="debug"/>
 +
 +
 +
<rtdruid.Oil.Configurator Inputfile="${in_conf_file}" Preferencefile="${pref_file}" Outputdir="${conf_output_dir}"/>
 +
<rtdruid.Oil.Configurator Preferencefile="${pref_file}" Outputdir="${conf_output_dir}"/>
 +
<fileset dir="conf_1">
 +
<include name="*.oil"/>
 +
<include name="*.ertd"/>
 +
</filset>
 +
<fileset dir="conf_2">
 +
<include name="*.rtd"/>
 +
</filset>
 +
</rtdruid.Oil.Configurator>
 +
</target>
 +
 +
</project>
 +
</nowiki>
== rtdruid.Oil.Example ==
== rtdruid.Oil.Example ==
-
Instantiates a single example
+
 
 +
This task Instantiates a single example.
 +
 
 +
{| border="1" style="color: black; background-color: #eeeeee;" width="85%"
 +
|+
 +
! style="color: black; background-color: #cccccc;" width="20%" | Parameter
 +
! style="color: black; background-color: #cccccc;" width="70%" | Description
 +
! style="color: black; background-color: #cccccc;" width="10%" | Required
 +
|-
 +
| ExampleID
 +
| Identifies the selected example.
 +
| Yes
 +
|-
 +
| OutputDirectory
 +
| The output folder. If not specified, results are saved in the current folder.
 +
| No
 +
|}
 +
 
 +
 
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<project name="rtdruid" default="an_examples" basedir=".">
 +
 +
<!-- Instantiates a single template -->
 +
<target name="an_example">
 +
<!-- .....-->
 +
<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
 +
</target>
 +
</project>
 +
</nowiki>
 +
 
== rtdruid.Oil.Examples ==
== rtdruid.Oil.Examples ==
 +
 +
This task instantiates all examples inside the specified folder.
 +
 +
{| border="1" style="color: black; background-color: #eeeeee;" width="85%"
 +
|+
 +
! style="color: black; background-color: #cccccc;" width="20%" | Parameter
 +
! style="color: black; background-color: #cccccc;" width="70%" | Description
 +
! style="color: black; background-color: #cccccc;" width="10%" | Required
 +
|-
 +
| AlsoConfigure
 +
| If set to <code>true</code>, RT-Druid will configure all instantiated templates.
 +
| Yes
 +
|-
 +
| OutputDirectory
 +
| The output folder. If not specified, results are saved in the current folder.
 +
| No
 +
|}
 +
 +
 +
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<project name="rtdruid" default="examples" basedir=".">
 +
<target name="examples">
 +
<!-- .....-->
 +
<rtdruid.Oil.Examples AlsoConfigure="true" OutputDirectory="${examples_output_dir}" />
 +
</target>
 +
</project>
 +
</nowiki>
 +
== rtdruid.templates.path.add ==
== rtdruid.templates.path.add ==
 +
 +
This task can be used to specify more paths where RT-Druid will look for new examples.
 +
 +
{| border="1" style="color: black; background-color: #eeeeee;" width="85%"
 +
|+
 +
! style="color: black; background-color: #cccccc;" width="20%" | Parameter
 +
! style="color: black; background-color: #cccccc;" width="70%" | Description
 +
! style="color: black; background-color: #cccccc;" width="10%" | Required
 +
|-
 +
| Path
 +
| A path of a folder in the filesystem.
 +
| Yes
 +
|}
 +
 +
  <nowiki>
  <nowiki>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
-
<project name="rtdruid" default="an_examples" basedir=".">
+
<project name="rtdruid" default="an_example" basedir=".">
<!-- Instantiates a single template -->
<!-- Instantiates a single template -->
<target name="an_example">
<target name="an_example">
<rtdruid.add.template.path path="c:/Evidence/Erika/ee/examples"/>
<rtdruid.add.template.path path="c:/Evidence/Erika/ee/examples"/>
 +
<rtdruid.add.template.path path="${basedir}/../ee/examples"/>
<!-- default values -->
<!-- default values -->

Revision as of 09:21, 29 March 2012

Contents

rtdruid.Convert

This task takes one or more input files, merge them and produces a new single RT-Druid file. If the output file does not support all informations contained in input files, they are discard (and lost).

Input files are provided by nested elements.

Parameter Description Required
Store The output file name Yes
Nested Element Description Required
FileList One or more input files. No
FileSet One or more input files. No

It is possible to specify a many FileList and FileSet elements as needed and the resulting collection of input files is the union of all input files specified by each nested element. The only requirement here is that resulting collection contains at least one input file.


<?xml version="1.0" encoding="UTF-8"?> <project name="rtdruid" default="convert" basedir="."> <target name="convert"> <!-- default values --> <property name="output_file" value="conf.oil"/> <rtdruid.Convert store="${output_file}"> <fileset dir="conf_1"> <include name="*.oil"/> <include name="*.ertd"/> </filset> <fileset dir="conf_2"> <include name="*.rtd"/> </filset> <filelist dir="${conf.src}"> <file name="base.oil"/> <file name="system.ertd"/> </filelist> </rtdruid.Convert> </target> </project>

rtdruid.Oil.Configurator

This task takes one or more input files, merge them and produces the Erika Enterprise configuration files. All generated files are saved in the specified output folder.


Parameter Description Required
Preferencefile The path of RT-Druid preferences file. No
Inputfile The input file. This parameter is useful if you need to specify a single input file. Additional input files can be specify using one or more nested elements to specify. No
Outputdir The output folder. If not specified, results are saved in the current folder. No
Nested Element Description Required
FileSet One or more input files. No

It is possible to specify a many FileSet elements as needed and the resulting collection of input files is the union of all input files specified by each nested element and the . The only requirement here is that resulting collection contains at least one input file.

<?xml version="1.0" encoding="UTF-8"?> <project name="rtdruid" default="compile" basedir="."> <target name="compile"> <!-- default values --> <property name="in_conf_file" value="conf.oil"/> <property name="pref_file" value=""/> <property name="conf_output_dir" value="debug"/> <rtdruid.Oil.Configurator Inputfile="${in_conf_file}" Preferencefile="${pref_file}" Outputdir="${conf_output_dir}"/> <rtdruid.Oil.Configurator Preferencefile="${pref_file}" Outputdir="${conf_output_dir}"/> <fileset dir="conf_1"> <include name="*.oil"/> <include name="*.ertd"/> </filset> <fileset dir="conf_2"> <include name="*.rtd"/> </filset> </rtdruid.Oil.Configurator> </target> </project>

rtdruid.Oil.Example

This task Instantiates a single example.

Parameter Description Required
ExampleID Identifies the selected example. Yes
OutputDirectory The output folder. If not specified, results are saved in the current folder. No


<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="an_examples" basedir=".">
	
	<!-- Instantiates a single template -->
	<target name="an_example">
<!-- .....-->
		<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
	</target>
</project>

rtdruid.Oil.Examples

This task instantiates all examples inside the specified folder.

Parameter Description Required
AlsoConfigure If set to true, RT-Druid will configure all instantiated templates. Yes
OutputDirectory The output folder. If not specified, results are saved in the current folder. No


<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="examples" basedir=".">
	<target name="examples">
<!-- .....-->
		<rtdruid.Oil.Examples AlsoConfigure="true" OutputDirectory="${examples_output_dir}" />
	</target>
</project>


rtdruid.templates.path.add

This task can be used to specify more paths where RT-Druid will look for new examples.

Parameter Description Required
Path A path of a folder in the filesystem. Yes


<?xml version="1.0" encoding="UTF-8"?>
<project name="rtdruid" default="an_example" basedir=".">
	
	<!-- Instantiates a single template -->
	<target name="an_example">
		<rtdruid.add.template.path path="c:/Evidence/Erika/ee/examples"/>
		<rtdruid.add.template.path path="${basedir}/../ee/examples"/>

		<!-- default values -->
		<property name="example_output_dir" value="output"/>
		
		<!-- exec -->
		<rtdruid.Oil.Example ExampleID="${example_id}" OutputDirectory="${examples_output_dir}" />
	</target>
</project>

Personal tools