Apache Ant User Manual

## Splash

by Les Hughes (leslie.hughes@rubus.com)

### Description

This task creates a splash screen. The splash screen is displayed for the duration of the build and includes a handy progress bar as well. Use in conjunction with the `sound` task to provide interest whilst waiting for your builds to complete...

### Parameters

Attribute | Description | Required
--- | --- | ---
imageurl | A URL pointing to an image to display. | No; defaults to `antlogo.gif` from the classpath
showduration | Initial period to pause the build to show the splash in milliseconds. | No; defaults to 5000
progressregexp | Progress regular expression which is used to parse the output and dig out current progress. Exactly one group pattern must exists, and it represents the progress number (0-100) (i.e Progress: (.*)%) since Apache Ant 1.8.0 | No; defaults to progress increase with every action and logged output line
displaytext | display text presented in the splash window since Ant 1.8.0 | No; defaults to Building ...

### Deprecated properties

The following properties can be used to configure the proxy settings to retrieve an image from behind a firewall. However, the settings apply not just to this task, but to all following tasks. Therefore they are now deprecated in preference to the `<setproxy>` task, that makes it clear to readers of the build exactly what is going on.

Attribute | Description | Required
--- | --- | ---
useproxy | Use a proxy to access imgurl. Note: Only tested on JDK 1.2.2 and above | No
proxy | IP or hostname of the proxy server | No
port | Proxy port number | No
user | User to authenticate to the proxy as | No
password | Proxy password | No

### Examples

Splash `images/ant_logo_large.gif` from the classpath.

    <splash/>

Splash the Jakarta logo, for an initial period of 5 seconds.

    <splash imageurl="https://jakarta.apache.org/images/jakarta-logo.gif"
            useproxy="true"
            showduration="5000"/>

Splash with controlled progress and nondefault text

    <target name="test_new_features">
        <echo>New features</echo>
        <splash progressRegExp="Progress: (.*)%" showduration="0" displayText="Test text"/>
        <sleep seconds="1"/>
        <echo>Progress: 10%</echo>
        <sleep seconds="1"/>
        <echo>Progress: 20%</echo>
        <sleep seconds="1"/>
        <echo>Progress: 50%</echo>
        <sleep seconds="1"/>
        <echo>Progress: 70%</echo>
        <sleep seconds="1"/>
        <echo>Progress: 100%</echo>
        <sleep seconds="3"/>
    </target>