Apache Ant target execute based on condition

July 21, 2011

To execute an Ant target based on condition, use the “if” attribute of the target,

<target name="build-module-A" if="module-A-present"/>

if the module-A-present property is set (to any value, e.g. false), the target will be run.


<target name="use-file" depends="-check-use-file" if="${file.exists}">

As of Ant 1.8.0, you may instead use property expansion; a value of true (or on or yes) will enable the item, while false (or off or no) will disable it. Other values are still assumed to be property names and so the item is enabled only if the named property is defined.


Wubi 8.04, errors while installing

June 30, 2011

While running Wubi.exe got from Ubuntu 8.04.4 LTS (Hardy Heron) download page http://releases.ubuntu.com/8.04/,

The error shown in screenshot occurs.

The problem seems to be because of mismatch between Wubi.exe and download URLs in http://releases.ubuntu.com/8.04/. To solve this problem download the Wubi.exe for 8.04 from Wubi SourceForge site http://sourceforge.net/projects/wubi/files/Wubi/

Steps to start Tomcat windows service in Debug mode

June 2, 2011
  • Change Directory under Tomcat bin folder
    C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin
  • Run tomcat7w.exe
  • Under Java/ Java Options, enter lines above all the -D options
    Make sure the above 2 lines are in separate lines

REferences – http://wiki.apache.org/tomcat/FAQ/Developing#Q1

Making HP Deskjet 1050 All-in-One printer to work in Ubuntu 10.10

April 26, 2011

Installing Kindle For PC on Ubuntu 10.10 Maverick Meerkat

April 17, 2011

I wanted to use Kindle For PC in Ubuntu 10.10 Maverick Meerkat using “Wine”, but got the below error while running install .exe

fixme:system:SetProcessDPIAware stub!

After some Google search, found that upgrading Wine to latest version “Wine 1.3” will solve this problem.
Follow the steps given in this link to upgrade Wine to 1.3 – http://www.winehq.org/download/ubuntu
After that open Wine Configuration, and set Windows version to “Windows 98” .
Now again run the Kindle installation exe to install and run Kindle without problems.

Ubuntu Linux command line tool to Convert PDF to Image and from Image to PDF

April 7, 2011

To convert Convert PDF to Image and from Image to PDF, follow the below steps,

Note- To get a higher quality image while converting from PDF to image, use options, like for example below

convert -quality 100 -density 600x600 multipage.pdf single%d.jpg

More about the options are available here –http://manpages.ubuntu.com/manpages/lucid/man1/convert.1.html

Review Board – Code Review tool

September 9, 2010

Found this Open source code review tool http://www.reviewboard.org/screenshots/
through this Yelp Engineering blog post – http://engineeringblog.yelp.com/2010/09/push-it.html

I didn’t try it but the users list http://www.reviewboard.org/users/ shows that it should be pretty good, and also it supports Git version control