Interviewer And Interviewee Guide

Java ANT Interview Question:

Tell me how does ant read properties? How to set my property system?

Submitted by: Administrator
Properties in ant are set in an order. Once a property is set, later the same property can not overwrite the previous one.

This process provides a good leverage of presetting all properties in one location, and overwriting only the needed properties. For instance, a password is to be used for an application task, and the developer does not want to share the password with his team members or developers of other teams. The following is the process to do the task:

- Store the password in ${user.home}/prj.properties file.
- Set the password - passwd = realpassword of the developer
- Master the prj.properties in include directory
passwd = password
- Read the property files in the following order in the build.xml file
1. Type ant -Dpasswd=newpassword
2. ${user.home}/prj.properties (personal)
3. projectdirectoryname/prj.properties (project team)
4. masterincludedirectory name/prj.properties (universal)

<cvsnttaskpasswd=${password=passwd} … />
Submitted by: Administrator

Read Online Java ANT Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.