alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Friki example source code file (build.xml)

This example Friki source code file (build.xml) is included in the DevDaily.com "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, root-class, root-class, this, this, warning, warning

The Friki build.xml source code

<project name="friki" default="cycle" basedir="..">

  <property file="src/project.prp"/>
  <property file="src/configs/${config}.prp"/>
  <property name="scripts" value="ant" />

  <target name="clean">
    <ant antfile="${scripts}/clean.xml" inheritAll="true"/>
    <delete>
  </target>

  <target name="configure">
    <ant antfile="${scripts}/configure.xml" inheritAll="true" />
  </target>

  <target name="filter">
    <ant antfile="${scripts}/filter.xml" inheritAll="true"/>
  </target>

  <target name="copy">
    <ant antfile="${scripts}/copy-files.xml" inheritAll="true"/>
  </target>

  <target name="compile" depends="configure,filter">
    <ant antfile="${scripts}/compile.xml" inheritAll="true"/>
  </target>

  <target name="jar" depends="compile,copy">
    <ant antfile="${scripts}/build-packed-jar.xml" inheritAll="true">
      <property name="dest.dir" value="build/delivery/files/WEB-INF/lib"/>
      <property name="ROOT-CLASS" value="com.efsol.friki.FrikiServlet,FilterLock,FilterReplace,Include,Join,Lock,Replace,wiki.ListRow,wiki.CompressISBN,wiki.RemoteWikiLink,wiki.LocalWikiLink,wiki.TableRow"/>
    </ant>
  </target>

  <target name="test" depends="compile,copy">
    <ant antfile="${scripts}/localtest.xml" inheritAll="true"/>
  </target>
  
  <target name="build" depends="test,jar">
    <ant antfile="${scripts}/build-war.xml" inheritAll="true"/>
  </target>

  <target name="export">
    <ant antfile="${scripts}/export-src.xml" inheritAll="true">
      <property name="exclude" value="_lib/*regex*.jar"/>
    </ant>
  </target>

  <target name="step">
    <ant antfile="${scripts}/increment-version-step.xml" inheritAll="true"/>
  </target>

  <target name="inc">
    <ant antfile="${scripts}/increment-version-build.xml" inheritAll="true"/>
  </target>
  
  <target name='cycle' depends='compile, copy, test, inc, export'/>

  <target name="buildrelease" depends='clean, build, export'>
    <property file="src/project.prp"/>
    <property file="src/relnum.prp"/>
    <property name="version" value="${version.major}.${version.minor}.${version.step}-${version.build}" />

    <zip zipfile="${APP}-${config}-${version}.zip" basedir="src/doc">
      <fileset dir="." includes="${APP}.war"/>
    </zip>
  </target>

  <target name="localrelease" depends='buildrelease'>
    <copy 
    	file="${APP}-${config}-${version}.zip" 
    	tofile="../downloads/${APP}-${config}.zip" 
    	overwrite="true" filtering="off"/>

    <copy 
    	file="../_dist/${APP}-${version}-src.zip" 
    	tofile="../downloads/${APP}-${version}-src.zip" 
    	overwrite="true" filtering="off"/>

    <copy todir="../downloads" overwrite="true" filtering="off" flatten="false">
      <fileset dir="src/doc" includes="*"/>
    </copy>
  </target>

    
  <target name="update-data">
    <get src="http://usemod.com/intermap.txt" 
    	dest="src/configs/classic_resources/intermap.txt" 
     />
  </target>
  
  <!-- 
    if we are "at home", fetch the latest build scripts and libraries
    WARNING! This will not work when run from a downloaded build
  -->
  <target name="update-resources">
    <copy todir="${scripts}" overwrite="true" filtering="off" flatten="false">
      <fileset dir="../_ant">
        <include name="*.xml"/>
      </fileset>
    </copy>
    <ant antfile="${scripts}/update-libs.xml" inheritAll="true"/>
    <ant antfile="${scripts}/update-libs.xml" target="update-lib" inheritAll="true">
      <property name="lib.dir" value="src/configs/OneDotThree/_lib"/>
    </ant>
    <ant antfile="${scripts}/update-libs.xml" target="update-lib" inheritAll="true">
      <property name="lib.dir" value="src/configs/OneDotFour/_lib"/>
    </ant>
  </target>

</project>

Other Friki examples (source code examples)

Here is a short list of links related to this Friki build.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

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.