Quantcast
Channel: Eureka! » Ant
Browsing latest articles
Browse All 26 View Live

Image may be NSFW.
Clik here to view.

Apache Ant – Get and Set Ant property in Javascript when using the script task

In Ant script we could write Javascript code using the <script> task. In the following example, i will pass 2 Ant properties to Javascript and print the square value to the console. Also at the...

View Article



Image may be NSFW.
Clik here to view.

Apache Ant – Iteration within a specific number range

Previously i have published a post about using for loop in Ant to read a text file line by line. Apache Ant – for loop example for reading a text file   The <for> task requires a list attribute...

View Article

Image may be NSFW.
Clik here to view.

Apache Ant – Check if a string property contains a certain string

The following example which check if a string property contains a another string. <project name="ant-string-contains-example" default="run" basedir="."> <target name="run"> <property...

View Article

Image may be NSFW.
Clik here to view.

Apache Ant – Missing environmental variables config in sshexec

The <sshexec> task is a very handle tool for executing command on the server through SSH. But i find that the SSH session does not have the proper environmental variables. Here is a simple...

View Article

Image may be NSFW.
Clik here to view.

Apache Ant – Get the current running Ant version in Ant script

I am trying to figure out which Apache Ant version is running on the Jenkins server. Starting from Apache Ant 1.7.0, you can make use of the <Antversion> task to determine the running Ant...

View Article


Image may be NSFW.
Clik here to view.

Apache Ant and SVN Integration

We could setup a SVN client in Apache Ant. Here is an example. 1. Download the following .jar files @ the repository.pentaho.org svnant-1.3.0.jar svnClientAdapter-svnant-1.3.0.jar...

View Article

Image may be NSFW.
Clik here to view.

Apache Ant – Get the SVN revision number by exec task

In Apache Ant, we can use the <exec> task to execute shell command in Ant script. Previously i have shown you how to integrate Apache Ant with SVN. Apache Ant and SVN Integration   If you only...

View Article

Image may be NSFW.
Clik here to view.

Ant – Execute Grunt and fail it on error

I want to execute a Grunt build in an Ant build project. This could be done by using <exec>. <?xml version="1.0" encoding="UTF-8"?> <project name="Ant Called Grunt" default="grunt"...

View Article


Image may be NSFW.
Clik here to view.

Apache Ant – Run piped command in exec task

The Ant <exec> task allows us to run shell command in Ant script. We could provide input arguments like the following example which prints today’s weekday. build.xml <?xml version="1.0"...

View Article


Image may be NSFW.
Clik here to view.

Apache Ant – Extract a string from property using regular expression

The Ant-Contrib library is a must have tool if you need to have more control on your build flow. Here is another example on using the propertyRegex task provided by Ant-Contrib to select or replace a...

View Article
Browsing latest articles
Browse All 26 View Live




Latest Images