Monthly Archives: June 2009

How to access all Java system properties directly?

You could access all Java system properties directly via ${name}, e.g. ${user.name}, ${user.dir}, ${user.home}, … You could read environment properties and use them   <properties environment=”env”/>   ${env.ENVIRONMENT_VARIABLE} e.g.   ${env.USERPROFILE}, ${env.USERNAME}, ${env.PATH} You could pass properties during Ants start   ant -Dname=value -Danothername=anothervalue Also you Ant could ask for input   <input addproperty=”foo”/>  … Read More »

SET UNIX HOME DIR PROPERTY using ANT

Set properties HOMEDIR in build.xml which will be set through user logged in the current system.. Example: <project name=”test” default=”myhome”>     <property environment=”env”/>     <target name=”myhome”>         <echo message=”My home is ${env.HOME}”/>     </target> </project>

How to use ant Script to Reset BuildNumber?

To use this code, you need to have the file build.number containging: major.number=1 minor.number=0 hotfix.number=0 revision.number=0 continuous.number=0 Then the following 3 targets:   <taskdef resource=”net/sf/antcontrib/antlib.xml”/> <taskdef name=”unset” classname=”ise.antelope.tasks.Unset”/>     <target name=”initBuildNum” description=”Get current build number properties”> <property file=”build.number”/> <var name=”next.major” value=”${major.number}”/> <var name=”next.minor” value=”${minor.number}”/> <var name=”next.hotfix” value=”${hotfix.number}”/> <var name=”next.revision” value=”${revision.number}”/> <var name=”next.continuous” value=”${continuous.number}”/> </target>     <target name=”getBuildNum”>… Read More »

WinZip Command Line | WinZip Command line CheatSheet – Reference

The default action is to add or replace zipfile entries from list, which can include the special name – to compress standard input. If zipfile and list are omitted, zip compresses stdin to stdout.  -f   freshen: only changed files                   -u   update: only changed or new files  -d   delete entries in zipfile                         -m   move… Read More »

Ant : Ant-Contrib – Introduction and Installation Process/Guide

What is Ant-Contrib Tasks? The Ant-Contrib project provides a collection of tasks and types that extend Ant to work as a scripting language as well as a build tool. Many developers want more from Ant than the ability to define dependencies. Ant-Contrib adds extra functionality to let Ant act more like a programming lanuage. Most… Read More »

Graphical Representation of ANT | Ant Flow Chart | Visual representation

1.       Grand: Graphical Representation of ANT Dependencies: Grand is a tool to create visual representation of ant target dependencies. It differs from tools like Vizant or AntGraph by a totally different approach, relying on the Ant API rather than parsing directly the XML files. This enables Grand to provide some nifty features such as the… Read More »

Ant’s built-in properties – Ant Properties Guide

This is a simple example that illustrates how to find the basedir name, file name, project name, ant version, java version, operating system name, ant home directory name, java home directory name, user home directory name and user name. Ant provides you with certain built-in properties that you may find useful during your build process.… Read More »

How to Resolve Apache Ant Copy and Include Issues – Ant Guide

Question: Why Copy in ant is not working if I am putting includes separately? Ant version: Apache Ant version 1.5.4 compiled on January 8 2005. Program 1 is not working and Program 2 is working.  I guess both programs are correct.. Program1: <copy todir=”${Temp}/uaw/Uaw_compilescripts”> <fileset dir=”${SVNCheckout}/scripts/compilescripts” > <include name=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script”/> </fileset> </copy> Program2: <copy todir=”${Temp}/uaw/Uaw_compilescripts”> <fileset… Read More »

Copy and Include Issues in Apache Ant | Ant Troubleshooting Guide

Question: Why Copy in ant is not working if I am putting includes separately? Ant version: Apache Ant version 1.5.4 compiled on January 8 2005. Program 1 is not working and Program 2 is working.  I guess both programs are correct.. Program1:       <copy todir=”${Temp}/uaw/Uaw_compilescripts”>             <fileset dir=”${SVNCheckout}/scripts/compilescripts” >                   <include name=”BuildSh,Compsh,vsamc,buildc.sh,script,compl2,main.sh,makefile,makepl1,script”/>                               </fileset>… Read More »

“Cheat Sheet” of Perforce command-line | Perforce command-line Guide

A way to remember data-mining commands The following is a set of questions that will be used during the Perforce training to remind students which “data-mining” commands to use for specific situations. Perforce is a terrific tool, but it’s easy to get lost in the choices between “p4 files” and “p4 changes” and “p4 filelog”… Read More »