### nested.xml example file Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/import.html Defines a setUp target that sets a property and an echo target that depends on setUp. Used by both import and include examples. ```xml prop has the value ${prop} ``` -------------------------------- ### Import example build output Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/import.html Output when running the import example. The setUp target from the importing file runs, so the echo target prints 'in importing'. ```text setUp: nested.echo: [echo] prop has the value in importing test: ``` -------------------------------- ### setup(Commandline cmd, Native2Ascii args) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.html Sets up the initial command line. Only the -encoding argument and nested arg elements get handled here. ```APIDOC ## setup(Commandline cmd, Native2Ascii args) ### Description Sets up the initial command line. Only the -encoding argument and nested arg elements get handled here. ### Method setup ### Signature protected void setup(Commandline cmd, Native2Ascii args) throws BuildException ### Parameters - **cmd** (Commandline) - Required - Command line to add to - **args** (Native2Ascii) - Required - provides the user-setting and access to Ant's logging system. ### Throws - **BuildException** - if there was a problem. ``` -------------------------------- ### Include example build output Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/import.html Output when running the include example. The nested setUp target runs, so the echo target prints 'in nested'. There is no target named 'echo' on the including build file. ```text nested.setUp: nested.echo: [echo] prop has the value in nested test: ``` -------------------------------- ### Include example build file Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/import.html Uses to include the nested file. The included targets are only available in the prefixed form, and their depends attributes are rewritten to use prefixed names, so the nested setUp target is used. ```xml ``` -------------------------------- ### Basic example: download index page Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/get.html Downloads the index page of http://ant.apache.org/ and stores it in the file help/index.html. ```xml ``` -------------------------------- ### Start Ant via task with Launcher Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/running.html Example of starting Ant from within an Ant build using the task with the Launcher class. It forks a new JVM, sets a timeout, and passes buildfile and property arguments. ```xml ``` -------------------------------- ### start() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.html Starts handling of the streams. ```APIDOC ## start() ### Description Start handling of the streams. ### Method void start() ### Return Type void ``` -------------------------------- ### start() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/PumpStreamHandler.html Start the Threads. ```APIDOC ## start() ### Description Start the Threads. ### Method start ### Signature `public void start()` ``` -------------------------------- ### mirrors.txt content for example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Types/resources.html Example content of mirrors.txt, a file listing alternative mirror URLs, used with the example. ```text mirrors.txt: http://best.mirror.example.org/ http://second.best.mirror.example.org/mirror/of/best/ https://yet.another.mirror/ http://the.original.site/ ``` -------------------------------- ### setup(Commandline cmd, Native2Ascii args) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/native2ascii/SunNative2Ascii.html Sets up the initial command line for the native2ascii adapter. ```APIDOC ## Method: setup ### Description Sets up the initial command line for the native2ascii adapter. ### Method protected void setup(Commandline cmd, Native2Ascii args) ### Parameters - **cmd** (Commandline) - The command line to configure. - **args** (Native2Ascii) - The Native2Ascii task arguments. ### Returns void ### Example ```java adapter.setup(cmd, args); ``` ``` -------------------------------- ### EchoProperties prefix attribute example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/EchoProperties.html Sets the prefix attribute so only properties starting with 'ant.' are recorded. For example, 'ant.home' is recorded but 'ant-example' is not. ```xml ``` -------------------------------- ### setup(cmd, args) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/native2ascii/DefaultNative2Ascii.html Adds relevant command line switches to the command line based on the Native2Ascii task arguments. ```APIDOC ## Method: setup(cmd, args) ### Description Sets up the initial command line. ### Signature protected void setup(Commandline cmd, Native2Ascii args) ### Parameters - **cmd** (Commandline) - The command line to set up. - **args** (Native2Ascii) - The task arguments. ``` -------------------------------- ### VssGet example: recursive get by label with login Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/vss.html Performs a recursive get of the VSS project $/source/aProject at label Release1, writing files to C:\mysrc\myproject with writable=true. Uses login me,mypassword. The localPath attribute is spelled with a capital P in the example, matching the source. ```xml ``` -------------------------------- ### Install custom ProjectHelper with typedef and projecthelper Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/projecthelper.html Install a custom ProjectHelper implementation at runtime. Assumes MyProjectHelper extends ProjectHelper. The helper is added after all already registered helpers but before the default ProjectHelper2. ```xml ``` -------------------------------- ### start(String[] args, Properties additionalUserProperties, ClassLoader coreLoader) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/Main.html Static method to create a Main instance and run the build with given arguments, properties, and classloader. ```APIDOC ## start(String[] args, Properties additionalUserProperties, ClassLoader coreLoader) ### Description Creates a new instance of this class using the arguments specified, gives it any extra user properties which have been specified, and then runs the build using the classloader provided. ### Method Static method ### Signature `public static void start(String[] args, Properties additionalUserProperties, ClassLoader coreLoader)` ### Parameters - **args** (String[]) - Required - Command line arguments. - **additionalUserProperties** (Properties) - Required - Extra user properties to be used. - **coreLoader** (ClassLoader) - Required - Classloader to use for the build. ### Returns None ``` -------------------------------- ### Mapper to rename property keys Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Types/propertyset.html Shows how to use a nested mapper to change property key names. The example collects properties starting with 'foo' and renames them to start with 'bar'. ```xml ``` -------------------------------- ### start Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/Main.html Creates a new instance of this class using the arguments specified, gives it any extra user properties which have been specified, and then runs the build using the classloader provided. ```APIDOC ## start ### Description Creates a new instance of this class using the arguments specified, gives it any extra user properties which have been specified, and then runs the build using the classloader provided. ### Method Static method ### Signature `public static void start(java.lang.String[] args, java.util.Properties additionalUserProperties, java.lang.ClassLoader coreLoader)` ### Parameters - **args** (String[]) - Required - Command line arguments. Must not be null. - **additionalUserProperties** (Properties) - Optional - Any extra properties to use in this build. May be null, which is the equivalent to passing in an empty set of properties. - **coreLoader** (ClassLoader) - Optional - Classloader used for core classes. May be null in which case the system classloader is used. ``` -------------------------------- ### setupJUnitDelegate() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.html Sets up the delegate that will run the tests. ```APIDOC ## setupJUnitDelegate() ### Description Sets up the delegate that will actually run the tests. Will be invoked implicitly once the delegate is needed. ### Method setupJUnitDelegate ### Since Ant 1.7.1 ``` -------------------------------- ### NetWare ant.ncf example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/platform.html Example ant.ncf file for Novell NetWare that sets CLASSPATH, ANT_OPTS, and ANT_HOME, then invokes runant.pl. Assumes Ant is installed in 'sys:/apache-ant/'. ANT_OPTS must include -envCWD=ANT_HOME because NetWare has no current working directory. ```ncf envset CLASSPATH=SYS:/apache-ant/bootstrap/lib/ant.jar envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/lib/optional/junit.jar envset CLASSPATH=$CLASSPATH;SYS:/apache-ant/bootstrap/lib/optional.jar setenv ANT_OPTS=-envCWD=sys:/apache-ant envset ANT_OPTS=-envCWD=sys:/apache-ant setenv ANT_HOME=sys:/apache-ant/dist/lib envset ANT_HOME=sys:/apache-ant/dist/lib perl sys:/apache-ant/dist/bin/runant.pl ``` -------------------------------- ### setupCommandLineForVMS(Execute exe, String[] command) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/ExecuteJava.html Static helper to set up the command line for VMS platform. ```APIDOC ## setupCommandLineForVMS(Execute exe, String[] command) ### Description On VMS platform, we need to create a special java options file containing the arguments and classpath for the java command. ### Method setupCommandLineForVMS ### Signature `public static void setupCommandLineForVMS(Execute exe, String[] command)` ### Parameters - **exe** (Execute) - Required - The Execute object. - **command** (String[]) - Required - The command arguments. ### Returns void ``` -------------------------------- ### Ant task documentation HTML template Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/tutorial-tasks-filesets-properties.html Use as a starting template for documenting a custom Ant task. It includes the standard sections: description, parameters table, nested elements, and examples. The example section reminds to escape '<' as '<' in code samples. ```html Taskname Task

Taskname

Description

Describe the task.

Parameters

do this html row for each attribute (including inherited attributes)
Attribute Description Required
classname the Java class to execute. Either jar or classname

Parameters specified as nested elements

Describe each nested element (including inherited)

your nested element

description

since Ant 1.6.

Examples

    A code sample; don't forget to escape the < of the tags with <
What should that example do? ``` -------------------------------- ### main Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/Main.html Command line entry point. This method kicks off the building of a project object and executes a build using either a given target or the default target. ```APIDOC ## main ### Description Command line entry point. This method kicks off the building of a project object and executes a build using either a given target or the default target. ### Method Static method ### Signature `public static void main(java.lang.String[] args)` ### Parameters - **args** (String[]) - Required - Command line arguments. Must not be null. ``` -------------------------------- ### Create a startable JAR file Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/tutorial-HelloWorldWithAnt.html Commands to create a startable JAR file: create a manifest containing the start class, create the target directory, and archive the classes. Ensure no blanks around the '>' sign in the echo command. ```bat echo Main-Class: oata.HelloWorld>myManifest md build\jar jar cfm build\jar\HelloWorld.jar myManifest -C build\classes . java -jar build\jar\HelloWorld.jar ``` -------------------------------- ### VssCheckout example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/vss.html Does a recursive checkout of the project $/test to the directory D:\build. ```xml ``` -------------------------------- ### static getValue(byte[] bytes, int offset) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/zip/ZipEightByteInteger.html Helper method to get the value as a BigInteger from eight bytes starting at given array offset. ```APIDOC ## Static Method: getValue(byte[] bytes, int offset) ### Description Helper method to get the value as a BigInteger from eight bytes starting at given array offset. ### Parameters - **bytes** (byte[]) - Required - The byte array to convert. - **offset** (int) - Required - The offset to start. ### Returns - **java.math.BigInteger** - Value as a BigInteger. ### Example ```java byte[] bytes = new byte[16]; BigInteger value = ZipEightByteInteger.getValue(bytes, 4); ``` ``` -------------------------------- ### protected Commandline setupGCJCommand() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/compilers/Gcj.html Set up the gcj commandline. This method is protected and intended for internal use by the adapter. ```APIDOC ## protected Commandline setupGCJCommand() ### Description Set up the gcj commandline. This method is protected and intended for internal use by the adapter. ### Method setupGCJCommand ### Signature `protected Commandline setupGCJCommand()` ### Parameters None ### Returns - **Commandline** - the configured gcj command line. ``` -------------------------------- ### getValue(byte[] bytes, int offset) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/zip/ZipLong.html Static helper method to get the value as a Java long from four bytes starting at the given array offset. ```APIDOC ## Method: getValue(byte[] bytes, int offset) ### Description Static helper method to get the value as a Java long from four bytes starting at the given array offset. ### Parameters - **bytes** (byte[]) - Required - The byte array to convert. - **offset** (int) - Required - The offset into the array where the four bytes start. ### Returns - **long** - The value as a Java long. ``` -------------------------------- ### getValue(byte[] bytes, int offset) (static) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/zip/ZipShort.html Helper method to get the value as a Java int from two bytes starting at the given array offset. ```APIDOC ## Method: getValue(byte[] bytes, int offset) (static) ### Description Helper method to get the value as a Java int from two bytes starting at the given array offset. ### Signature `public static int getValue(byte[] bytes, int offset)` ### Parameters - **bytes** (byte[]) - The byte array to read from. - **offset** (int) - The offset to start reading. ### Returns - **int** - The value as a Java int. ``` -------------------------------- ### init() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.html Initializes the task, including known hosts and default port. ```APIDOC ## init() ### Description Initialize the task. This initializes the known hosts and sets the default port. ### Method init ### Throws - **BuildException** - on error ``` -------------------------------- ### static getLongValue(byte[] bytes, int offset) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/zip/ZipEightByteInteger.html Helper method to get the value as a Java long from eight bytes starting at given array offset. ```APIDOC ## Static Method: getLongValue(byte[] bytes, int offset) ### Description Helper method to get the value as a Java long from eight bytes starting at given array offset. ### Parameters - **bytes** (byte[]) - Required - The byte array to convert. - **offset** (int) - Required - The offset to start. ### Returns - **long** - Value as a long. ### Example ```java byte[] bytes = new byte[16]; long value = ZipEightByteInteger.getLongValue(bytes, 4); ``` ``` -------------------------------- ### startElement(String uri, String tag, String qname, Attributes attrs) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/helper/ProjectHelper2.RootHandler.html Handles the start of a project element. ```APIDOC ## Method: startElement(String uri, String tag, String qname, Attributes attrs) ### Description Handles the start of a project element. ### Parameters - **uri** (String) - Required - The namespace URI. - **tag** (String) - Required - The local name. - **qname** (String) - Required - The qualified name. - **attrs** (org.xml.sax.Attributes) - Required - The attributes of the element. ### Usage Example ```java handler.startElement(uri, tag, qname, attrs); ``` ``` -------------------------------- ### Script task examples in five languages Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/script.html Shows how to use the ``` -------------------------------- ### Create directory with ${dist}/lib Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/mkdir.html Creates the directory ${dist}/lib. Parent directories are created as needed. ```xml ``` -------------------------------- ### init() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/Project.html Initialises the project by setting default task definitions and loading system properties. ```APIDOC ## init() ### Description Initialises the project. This involves setting the default task definitions and loading the system properties. ### Method Signature `public void init() throws BuildException` ### Parameters None. ### Returns void ### Throws - `BuildException` - if the default task list cannot be loaded. ``` -------------------------------- ### Translate JSP files with resource bundle Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/translate.html Translates JSP files from English to Japanese using a resource bundle encoded in Japanese. The example sets the destination directory, start and end tokens, bundle name, and various encoding attributes. The forceoverwrite attribute is set to "yes" to overwrite existing files. ```xml ``` -------------------------------- ### Get() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/Get.html Constructor for the Get task class. Creates a new instance of the Get task. ```APIDOC ## Get() ### Description Constructor for the Get task class. Creates a new instance of the Get task. ### Method Constructor ### Signature `public Get()` ### Parameters None ### Returns A new instance of the Get task. ### Usage Example ```java Get getTask = new Get(); ``` ``` -------------------------------- ### Import example build file Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/import.html Uses to import the nested file. The imported targets are available by their normal name and the prefixed name. The depends attribute of the imported target remains unchanged, so the setUp target in the importing file overrides the nested one. ```xml ``` -------------------------------- ### String getInitialSiteCommand() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/net/FTPTask.html Returns the initial site command. ```APIDOC ## String getInitialSiteCommand() ### Description Gets the initial site command to be executed on the FTP server. ### Method getInitialSiteCommand ### Parameters None ### Returns - **String** - The initial site command. ``` -------------------------------- ### start() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/util/Watchdog.html Starts the watchdog timer. Once started, the watchdog will trigger if the timeout expires before stop() is called. ```APIDOC ## start() ### Description Starts the watchdog timer. The watchdog will trigger if the timeout expires before stop() is called. ### Method `public void start()` ### Parameters None. ### Returns void ### Usage ```java watchdog.start(); ``` ``` -------------------------------- ### VssCheckin example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/vss.html Checks in the file(s) named test* in the project $/test using the local directory D:\build. ```xml ``` -------------------------------- ### Simple telnet example with userid and password Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/telnet.html Connects to a server using userid and password, assuming prompts 'ogin:' and 'assword:'. Sends 'ls' after reading '/home/bob' and waits for the prompt again. ```xml /home/bob ls ``` -------------------------------- ### setupJavacCommandlineSwitches(Commandline cmd) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.html Gets the command line arguments for the switches. ```APIDOC ## setupJavacCommandlineSwitches(Commandline cmd) ### Description Gets the command line arguments for the switches. ### Method Signature `protected Commandline setupJavacCommandlineSwitches(Commandline cmd)` ### Parameters - **cmd** (Commandline) - Required - The command line to which switches are added. ### Return Type Commandline - The command line with switches. ``` -------------------------------- ### Example archive file listing Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/zip.html Example output listing files that might end up in the archive from the preceding zipfileset example. ```text docs/user-guide/html/index.html docs/ChangeLog.txt docs/examples/index.html ``` -------------------------------- ### get(Project project) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/property/LocalProperties.html Gets a LocalProperties for the given project. ```APIDOC ## get(Project project) ### Description Gets a LocalProperties for the given project. ### Method get ### Parameters - **project** (Project) - Required - The project. ### Returns LocalProperties - The LocalProperties instance. ``` -------------------------------- ### runCommand(Commandline toExecute) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/AbstractCvsTask.html Sets up the environment for toExecute and then runs it. ```APIDOC ## runCommand(Commandline toExecute) ### Description Sets up the environment for toExecute and then runs it. ### Method protected void ### Parameters - **toExecute** (Commandline) - Required - The command line to execute. ### Returns void ``` -------------------------------- ### CommandlineJava() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/types/CommandlineJava.html Constructor uses the VM we are running on now. ```APIDOC ## CommandlineJava() ### Description Constructor uses the VM we are running on now. ### Constructor `CommandlineJava()` ### Parameters None. ### Returns A new instance of CommandlineJava. ``` -------------------------------- ### setStart(int start) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/types/optional/image/Arc.html Sets the start angle of the arc. ```APIDOC ## setStart(int start) ### Description Sets the start angle of the arc. ### Method public void setStart(int start) ### Parameters - **start** (int) - Required - The start angle of the arc. ### Returns void ### Example ```java arc.setStart(45); ``` ``` -------------------------------- ### setStart(int start) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/types/optional/image/Arc.html Sets the start angle of the arc. ```APIDOC ## setStart(int start) ### Description Set the start of the arc. ### Method `void setStart(int start)` ### Parameters - **start** (int) - Required - The start angle of the arc. ``` -------------------------------- ### main(String[] args) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.html Entry point for standalone (forked) mode. ```APIDOC ## main ### Description Entry point for standalone (forked) mode. Parameters: testcaseclassname plus parameters in the format key=value, none of which is required. ### Method `public static void main(java.lang.String[] args) throws java.io.IOException` ### Parameters - **args** (String[]) - Required - The command line arguments. ### Returns void ### Throws - **java.io.IOException** - On error. ### Command Line Parameters | key | description | default value | | --- | --- | --- | | haltOnError | halt test on errors? | false | | haltOnFailure | halt test on failures? | false | | formatter | A JUnitResultFormatter given as classname,filename. If filename is omitted, System.out is assumed. | none | | showoutput | send output to System.err/.out as well as to the formatters? | false | | logtestlistenerevents | log TestListener events to System.out. | false | | methods | Comma-separated list of names of individual test methods to execute. | null | ``` -------------------------------- ### setStart(Date start) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.html Sets the date at which the changelog should start. ```APIDOC ## setStart(Date start) ### Description Sets the date at which the changelog should start. ### Method void ### Parameters - **start** (Date) - Required - The start date. ### Returns void ``` -------------------------------- ### SOSGet task example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/sos.html Performs a recursive GetProject on $/SourceRoot/project1 using tmp as the working directory. Connects to a SourceOffsite server at 192.168.10.6:8888 with build/build as credentials. The SourceSafe database is at d:\vss\srcsafe.ini. ```xml ``` -------------------------------- ### Scale PNGs and store in dest directory Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/image.html Same as the previous example but stores the resulting thumbnails in the dest directory instead of the source directory. ```xml ``` -------------------------------- ### Method: start() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/PumpStreamHandler.html Starts the Threads that pump the process streams. ```APIDOC ## Method: start() ### Description Starts the `Thread`s that pump the process streams. ### Method void ### Signature `public void start()` ### Parameters None ### Usage Call this method to begin pumping the process streams after setting them. ``` -------------------------------- ### startPrefixMapping(String prefix, String uri) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/helper/ProjectHelper2.RootHandler.html Start a namespace prefix to uri mapping. ```APIDOC ## Method: startPrefixMapping(String prefix, String uri) ### Description Start a namespace prefix to uri mapping. ### Parameters - **prefix** (String) - Required - The namespace prefix. - **uri** (String) - Required - The namespace URI. ### Usage Example ```java handler.startPrefixMapping(prefix, uri); ``` ``` -------------------------------- ### appendCDATAElement usage example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/util/DOMUtils.html Example call to appendCDATAElement with parent, name, and content. ```java appendCDATAElement(, "b", "c") ``` -------------------------------- ### setupModernJavacCommandlineSwitches(Commandline cmd) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.html Does the command line argument processing for modern. ```APIDOC ## setupModernJavacCommandlineSwitches(Commandline cmd) ### Description Does the command line argument processing for modern. ### Method Signature `protected Commandline setupModernJavacCommandlineSwitches(Commandline cmd)` ### Parameters - **cmd** (Commandline) - Required - The command line to which switches are added. ### Return Type Commandline - The command line with switches. ``` -------------------------------- ### appendTextElement usage example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/util/DOMUtils.html Example call to appendTextElement with parent, name, and content. ```java appendTextElement(, "b", "c") ``` -------------------------------- ### appendCDATA usage example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/util/DOMUtils.html Example call to appendCDATA with a parent element and content string. ```java appendCDATA(, "b") ``` -------------------------------- ### Generic deploy element example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/serverdeploy.html Shows how to use the generic deploy element to deploy a component using a Java-based deployment tool. The example sets the classname, classpath, username, and password, and passes additional arguments and JVM arguments. ```xml ``` -------------------------------- ### jvmarg example for forked JUnit task Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/junit.html Example of using the nested element to pass additional parameters to the forked VM. This example runs the test in a VM without JIT by setting -Djava.compiler=NONE. ```xml ... ``` -------------------------------- ### init() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/Ant.html Creates a Project instance for the project to call. This initializes the project for the nested build. ```APIDOC ## init() ### Description Creates a Project instance for the project to call. This initializes the project for the nested build. ### Method init ### Parameters None ### Return Type void ``` -------------------------------- ### BuildListener Interface Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/BuildListener.html The BuildListener interface defines callback methods for build events. Implement this interface to receive notifications about build lifecycle events such as build started, target started, task started, and message logging. ```APIDOC ## Interface BuildListener ### Description Instances of classes that implement this interface can register to be notified when things happened during a build. ### Methods #### buildStarted(BuildEvent event) - **Description**: Called when a build is started. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the build. #### buildFinished(BuildEvent event) - **Description**: Called when a build is finished. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the build. #### targetStarted(BuildEvent event) - **Description**: Called when a target is started. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the target. #### targetFinished(BuildEvent event) - **Description**: Called when a target is finished. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the target. #### taskStarted(BuildEvent event) - **Description**: Called when a task is started. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the task. #### taskFinished(BuildEvent event) - **Description**: Called when a task is finished. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the task. #### messageLogged(BuildEvent event) - **Description**: Called when a message is logged. - **Parameters**: - **event** (BuildEvent) - The build event containing information about the message. ### See Also - BuildEvent - Project.addBuildListener(BuildListener) ``` -------------------------------- ### sysproperty example for JUnit task Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/junit.html Example of using the nested element to specify system properties for the test. This example runs the test in ANT's VM and makes the basedir property available to the test. ```xml ... ``` -------------------------------- ### startPrefixMapping Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/helper/ProjectHelper2.RootHandler.html Start a namespace prefix to uri mapping ```APIDOC ## startPrefixMapping ### Description Start a namespace prefix to uri mapping ### Method startPrefixMapping ### Signature `public void startPrefixMapping(java.lang.String prefix, java.lang.String uri)` ### Parameters - **prefix** (String) - the namespace prefix - **uri** (String) - the namespace uri ``` -------------------------------- ### Main() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/Main.html Constructor for creating a Main instance for later argument processing and startup. ```APIDOC ## Main() ### Description Constructor used when creating Main for later arg processing and startup. ### Method Constructor ### Signature `public Main()` ### Parameters None ### Returns None ``` -------------------------------- ### Conditional close check example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/util/KeepAliveOutputStream.html Example of the conditional close check that KeepAliveOutputStream makes unnecessary. ```java if (out != System.out && out!= System.err) { out.close(); } ``` -------------------------------- ### init() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/XmlProperty.html Initializes the task. ```APIDOC ## init() ### Description Initializes the task. ### Method init ### Signature `public void init()` ### Parameters None ### Returns void ### Throws None ### Overrides - `init()` in class `Task` ``` -------------------------------- ### Find task documentation page with examples Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/tutorial-tasks-filesets-properties.html Example documentation page for a custom Ant task named 'Find'. It shows the full HTML structure with description, parameters table, nested elements, and two usage examples. The first example searches in Ant's home directory; the second searches the C: drive with a delimiter and echoes the result. ```html Find Task

Find

Description

Searchs in a given path for a file and returns the absolute to it as property. If delimiter is set this task returns all found locations.

Parameters

Attribute Description Required
file The name of the file to search. yes
location The name of the property where to store the location yes
delimiter A delimiter to use when returning the list only if the list is required

Parameters specified as nested elements

path

The path where to search the file.

Examples

    
        
            
        
    
Searches in Ants home directory for a file ant.jar and stores its location in property loc (should be ANT_HOME/bin/ant.jar).
    
        
            
        
    
    ant.jar found in: ${loc}
Searches in Windows C: drive for all ant.jar and stores their locations in property loc delimited with ';'. (should need a long time :-) After that it prints out the result (e.g. C:/ant-1.5.4/bin/ant.jar;C:/ant-1.6/bin/ant.jar). ``` -------------------------------- ### start() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/JikesOutputParser.html Deprecated. Invokes parseOutput to start processing the compiler output. This method is specified by the ExecuteStreamHandler interface. ```APIDOC ## start ### Description Deprecated. Invokes parseOutput to start processing the compiler output. This method is specified by the ExecuteStreamHandler interface. ### Method start ### Signature public void start() throws java.io.IOException ### Parameters None ### Throws - **java.io.IOException** - on error ### Deprecated Yes ``` -------------------------------- ### protected Commandline setupKjcCommand() Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/compilers/Kjc.html Sets up the command line arguments for the KJC compiler. ```APIDOC ## protected Commandline setupKjcCommand() ### Description Sets up the command line arguments for the KJC compiler. ### Method setupKjcCommand ### Return Type Commandline - the configured command line object. ### Parameters None ### Example ```java Kjc kjc = new Kjc(); Commandline cmd = kjc.setupKjcCommand(); ``` ``` -------------------------------- ### TimestampedLogger success message example Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/listeners.html Example output of the final success message including the build completion time. ```text BUILD SUCCESSFUL - at 16/08/05 16:24 ``` -------------------------------- ### buildStarted(BuildEvent event) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/XmlLogger.html Fired when the build starts, this builds the top-level element for the document and remembers the time of the start of the build. ```APIDOC ## Method: buildStarted(BuildEvent event) ### Description Fired when the build starts, this builds the top-level element for the document and remembers the time of the start of the build. ### Signature `public void buildStarted(BuildEvent event)` ### Parameters - **event** (BuildEvent) - Ignored. ### Returns void ``` -------------------------------- ### Properties file with in-file expansion Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/Tasks/property.html Example properties file demonstrating in-file property expansion. The deploy.url property references other properties defined in the same file. ```properties build.compiler=jikes deploy.server=lucky deploy.port=8080 deploy.url=http://${deploy.server}:${deploy.port}/ ``` -------------------------------- ### addSetup(Sequential sequence) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/taskdefs/optional/testing/Funtest.html Adds a setup sequence to the Funtest task. ```APIDOC ## addSetup(Sequential sequence) ### Description Adds a setup sequence to the Funtest task. ### Method void addSetup(org.apache.tools.ant.taskdefs.Sequential sequence) ### Parameters - **sequence** (Sequential) - Required - The setup sequence to add. ``` -------------------------------- ### buildStarted(BuildEvent event) Source: https://github.com/dbflute/dbflute-core/blob/develop/dbflute-engine/etc/ant/manual/api/org/apache/tools/ant/BuildListener.html Signals that a build has started. This event is fired before any targets have started, and before the project instance is fully configured. ```APIDOC ## buildStarted(BuildEvent event) ### Description Signals that a build has started. This event is fired before any targets have started, and before the project instance is fully configured (no properties set, project may not know its name or default target). ### Method void ### Signature `void buildStarted(BuildEvent event)` ### Parameters - **event** (BuildEvent) - Required - An event with any relevant extra information. Must not be `null`. ### Returns void ```