🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Ant’s built-in properties – Ant Properties Guide

ants-built-in-properties

ants-built-in-properties

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. The following table shows the property name and it’s description.

 

Ant’s built-in properties:

Property                                                              Description

 

ant.file                                                                  The absolute path of the build file

 

ant.project.name                                            The name of the project as set in the <project> element’s name attribute.

 

ant.home                                                            The root directory of ant

 

ant.version                                                         The version of this ant installation. This is not just the version number and includes information such as the compilation date.

 

ant.java.version                                               The version of the java that ant uses

 

basedir                                                                 The absolute path of the project

 

os.name                                                              Operating system name

 

java.home                                                          Java home directory name

 

user.home                                                          User directory name

 

user.name                                                          User name                         

 

 

Example Program:

<?xml version=”1.0″?>

 

<project name=”AntProperties” default=”echo” basedir=”.”>

 

  <target name=”echo”>

  <echo message=”The operating system is: ${os.name}”/> 

 

  <!– absolute path of the project. –>

  <echo message=”The home path is: ${basedir}”/>

 

  <!– absolute path of the build file. –>

  <echo message=”The file name is: ${ant.file}”/>

 

  <!– root directory of ant. –>

  <echo message=”The Project name is: ${ant.project.name}”/>

  <echo message=”The Ant home directory is: ${ant.home}”/>

  <echo message=”The Ant version is: ${ant.version}”/>

  <echo message=”The Java version is: ${ant.java.version}”/>

 

  <!– System properties. –>

  <echo message=”The Java home directory is: ${java.home}”/>

  <echo message=”The User home directory is: ${user.home}”/>

  <echo message=”The User name is: ${user.name}”/>

  </target>

 

</project>

 

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x