| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Friki example source code file (build-packed-jar.xml)

This example Friki source code file (build-packed-jar.xml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Friki tags/keywords

app, app, can, can, root-class, root-class

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="" value="${APP}.jar"/>

  <target name="init">
    <available property="pack.exists" 
    <condition property="no-param">
        <isset property="ROOT-CLASS"/>

    <condition property="no-packer">
        <istrue value="${pack.exists}"/>
    <condition property="ok">
        <isfalse value="${no-packer}"/>
        <isfalse value="${no-param}"/>

  <target name='pack' depends="init" if="ok">
    <mkdir dir="${dest.dir}"/>
    <taskdef name="pack" 
      classname="org.sadun.util.ant.Pack" classpath="_ext/pack.jar" />
      classes = "${ROOT-CLASS}"
      targetJar = "${dest.dir}/${}">
        <pathelement location="build/delivery/classes"/>
        <fileset dir="_lib">
          <include name="**/*.jar"/>
        <pathelement path="${java.class.path}"/>
  <target name='pack-lump' unless="ok">
    <mkdir dir="${dest.dir}"/>
    <copy todir="${dest.dir}" filtering="off" overwrite="true">
      <fileset dir="_lib">
        <include name="*.jar"/>
  <target name='complain-param' depends="init" if="no-param">
    <echo message="Can not build packed jar file; needs property ROOT-CLASS"/> 
  <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 name="build-packed-jar" depends="pack, complain-param, complain-packer, pack-lump"/>


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


new blog posts


Copyright 1998-2021 Alvin Alexander,
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.