|
Friki example source code file (build-packed-jar.xml)
The Friki build-packed-jar.xml source code
<project default="build-packed-jar">
<property name="base" value=".."/>
<property name="dest.dir" value="build/lib"/>
<property name="jarfile.name" value="${APP}.jar"/>
<target name="init">
<available property="pack.exists"
classname="org.sadun.util.ant.Pack"
classpath="_ext/pack.jar"/>
<condition property="no-param">
<not>
<isset property="ROOT-CLASS"/>
</not>
</condition>
<condition property="no-packer">
<not>
<istrue value="${pack.exists}"/>
</not>
</condition>
<condition property="ok">
<and>
<isfalse value="${no-packer}"/>
<isfalse value="${no-param}"/>
</and>
</condition>
</target>
<target name='pack' depends="init" if="ok">
<mkdir dir="${dest.dir}"/>
<taskdef name="pack"
classname="org.sadun.util.ant.Pack" classpath="_ext/pack.jar" />
<pack
classes = "${ROOT-CLASS}"
targetJar = "${dest.dir}/${jarfile.name}">
<classpath>
<pathelement location="build/delivery/classes"/>
<fileset dir="_lib">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</classpath>
</pack>
</target>
<target name='pack-lump' unless="ok">
<mkdir dir="${dest.dir}"/>
<jar
jarfile="${dest.dir}/${jarfile.name}"
basedir="build/delivery/classes"/>
<copy todir="${dest.dir}" filtering="off" overwrite="true">
<fileset dir="_lib">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name='complain-param' depends="init" if="no-param">
<echo message="Can not build packed jar file; needs property ROOT-CLASS"/>
</target>
<target name='complain-packer' depends="init" if="no-packer">
<echo message="Can not build packed jar file; needs class org.sadun.util.ant.Pack"/>
</target>
<target name="build-packed-jar" depends="pack, complain-param, complain-packer, pack-lump"/>
</project>
Other Friki examples (source code examples)Here is a short list of links related to this Friki build-packed-jar.xml source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.