Quack
Quack is an Apache Ant Task to create self-extracting jar files.
Download
| Quack 1.1 | quack-1.1.zip | Download |
| Quack 1.1 Source | quack-1.1-src.zip | Download |
Installing
Quack can be installed in a number of ways, each gives the result of placing quack.jar on the classpath.
- Place quack.jar in ANT_HOME/lib.
- Add the locaton of quack.jar to the CLASSPATH environment variable.
- Specify the location of quack.jar using a <classpath> element in a <taskdef> in the buildfile.
- Specify the location of quack.jar using the classpath attribute of <taskdef> in the buildfile.
Usage
The following demonstrates an example usage of Quack within an Ant buildfile.
<target name="self-extract"> <taskdef name="quack" classname="uk.co.bedican.quack.SelfExtractingJarTask" classpath="/path/to/quack.jar" /> <quack destfile="my-product.jar"> <fileset dir="my-product" /> </quack> </target>
Task Parameters
This task forms an implicit FileSet and supports most attributes of <fileset> (dir becomes basedir) as well as the nested <include>, <exclude> and <patternset> elements.
Or, you may place within it nested file sets. In this case basedir is optional; the implicit file set is only used if basedir is set. You may use any mixture of the implicit file set (with basedir set, and optional attributes like includes and optional subelements like <include>); explicit nested <fileset> elements so long as at least one fileset total is specified.
| Attribute | Description | Required |
|---|---|---|
| destfile | The jar file to create. | Yes |
| basedir | The directory to pack within the jar. | No |
| includes | Comma or space separated list of patterns of files that must be included. All files are included when omitted. | No |
| excludes | Comma or space separated list of patterns of files that must be excluded. No files (except default excludes) are excluded when omitted. | No |
| includesfile | The name of a file. Each line of this file is taken to be an include pattern. | No |
| excludesfile | The name of a file. Each line of this file is taken to be an exclude pattern. | No |
License
© Copyright 2010 Bedican Solutions
Redistribution and use of this software is permitted providing the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer.
- Distributions in binary form compiled from source must make that source available for redistribution without sublicense, retaining all copyright notices, including the above copyright notice, this list of conditions and the following disclaimer.
- Distributions must provide a link to http://www.bedican.co.uk
- Neither the name bedican, bedican solutions nor the name of the author, may be used to endorse or promote any website or products without specific prior written permission. The name bedican is a trademark of bedican solutions.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
