Getting Started with Ant

  • Download the ant zip from ant repo online. Unzip it to the desired location. Give the path as below in the environment variable and restart. Need to take care of the java -version required for the given ant. For example the 1.10 ant version will require Java 1.8.

  • To build first ant file and also run a XSLT transformation: create a file named build.xml with the following content:
<project name="first_project">
<target name="FirstXSLT">
<xslt in="FirstInput.xml" out="FirstOutput.xml" style="FirstTransform.xslt">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<FirstMessage>Hello World!</FirstMessage>
  • Put all the above file in the same location. Go to the location of the file build.xml. >ant MyXSLT, should produce an output MyOutput.xml with the following content:

<?xml version="1.0" encoding="UTF-8"?><FirstMessage>Hello World!</FirstMessage>
  • To use math operations in Ant, use antcontrib jar, download. Then add it to the lib folder of the ant installation. 


  1. leovegas | Casino Online | Get 150 Spins - Gold Casino
    Play Slots at the best online casino. Get 150 dafabet Free Spins for a 100% match bonus at the leovegas hottest Slots Games! fun88 vin


Post a Comment

Popular posts from this blog

Adding custom domain to google blogger

CMD commands