For users using scripts to automate the build workflow of their Java application with the Java Service Wrapper, it is now possible to be sure to always download the latest (or stable) version of the Wrapper without editing any scripts at each release of the Wrapper.

At the root of our download page, you will find 2 files contaning the latest and stable versions of the Wrapper:

After getting the version number, it is easy to generate the URL to download the desired file. All our files follow the same naming convention:
wrapper-${platform}-${bit}-${version}${edition}.${extension}
Where the possible values are: Below is a concrete example of the URL to download the Wrapper 3.5.34 for linux-x86, 64-bit, standard edition:
https://download.tanukisoftware.com/wrapper/3.5.34/wrapper-linux-x86-64-3.5.34-st.tar.gz
Another example of the URL to download the Wrapper 3.5.30 for Windows x86, 32-bit, community edition:
https://download.tanukisoftware.com/wrapper/3.5.30/wrapper-windows-x86-32-3.5.30.zip

Ant example

The following script demonstrates how to download the latest version of the Wrapper using Ant. To test it, please create a file build.xml on your machine and copy/paste the following code:

build.xml
<project name="download.wrapper" default="main">
    <!-- Temporary file to hold the value of the latest version of the Wrapper. -->
    <property name="temp.file" value="latest.txt"/>
    
    <!-- Always download the Wrapper for linux x86, 64-bit, professional edition. -->
    <property name="platform" value="linux-x86"/>
    <property name="bit" value="64"/>
    <property name="edition" value="-pro"/>
    <property name="extension" value="tar.gz"/>
    
    <target name="main">
        <!-- First http request to get the version of the latest release. -->
        <get src="https://download.tanukisoftware.com/wrapper/latest" dest="${temp.file}"/>
        
        <!-- Load the file to save the version in a property and 
             make sure to strip line breaks. -->
        <loadfile property="version" srcFile="${temp.file}">
            <filterchain>
                <striplinebreaks/>
            </filterchain>
        </loadfile>
        
        <!-- Concat the values to form the file name. -->
        <property 
            name="filename" 
            value="wrapper-${platform}-${bit}-${version}${edition}.${extension}" />
        
        <!-- Second http request to download the latest version of the Wrapper. -->
        <get 
            src="https://download.tanukisoftware.com/wrapper/${version}/${filename}" 
            dest="."/>
        
        <!-- Delete the temporary file. -->
        <delete file="${temp.file}"/>
    </target>
</project>
You can now execute this script with Ant to download the latest version of the Wrapper on your machine.

Bash example

The following script demonstrates how to download the stable version of the Wrapper from the terminal. To test it, please create a file my-script.sh on your machine and copy/paste the following code:

my-script.sh
#!/bin/bash

# Note: this script requires curl and wget.

# Always download the Wrapper for freeBSD, 32-bit, standard edition
platform=freebsd-x86
bit=32
edition=-st
extension=tar.gz

# Get the version number of the stable release
version=`curl https://download.tanukisoftware.com/wrapper/stable`

# Create the file name of the file to download
filename="wrapper-${platform}-${bit}-${version}${edition}.${extension}"

# Download the file
wget "https://download.tanukisoftware.com/wrapper/${version}/${filename}"
Allow this script to be executed (chmod +x my-script.sh) and execute it to download the stable version of the Wrapper on your machine.