Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7797427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:40:47+00:00 2026-06-01T23:40:47+00:00

I have a property file which is generated by my ant script itself during

  • 0

I have a property file which is generated by my ant script itself during execution. And I want to access the value of properties from this generated property file.

For e.g.,

Generated Property File:

first.prop=abcd
second.prop=pqrs

and in script, I am trying to access it like this,

I am having a property name (that I want to access and is in generated property file) from some other property. That property is name.prop.
so,

<echo message="${name.prop}"/>
<echo message="${${name.prop}}"/>

gives

first.prop
${${name.prop}}

as output respectively.
What can be the solution over this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:40:48+00:00Added an answer on June 1, 2026 at 11:40 pm

    This is from the doc:

    Nesting of Braces

    In its default configuration Ant will not try to balance braces in
    property expansions, it will only consume the text up to the first
    closing brace when creating a property name. I.e. when expanding
    something like ${a${b}} it will be translated into two parts:

    • the expansion of property a${b – likely nothing useful.
    • the literal text } resulting from the second closing brace

    This means you can’t use easily expand properties whose names are
    given by properties, but there are some workarounds for older versions
    of Ant. With Ant 1.8.0 and the the props Antlib you can configure Ant
    to use the NestedPropertyExpander defined there if you need such a
    feature.

    So it is not available easily. Workarounds (using <script /> or <macrodef /> can be found here in the official ant faq.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a Resource bundle property file: A.properties: thekey={0} This is a test
I have an APK generated from eclipse which contains a native library packaged inside
I have an ant script to compile and generate an AIR file, and it
I have a file which contains lots of properties file line by line may
I have a Property File like this: frame.server.dev=mark.is.cool frame.server.test=chris.is.cool frame.server.qa=mitch.is.cool frame.server.prod=cory.is.cool I need to
I have a property file with the following junit.version=3.8.1 dbcp.version=5.5.27 oracle.jdbc.version=10.2.0.2.0 I try to
I have a class isSearching with a single boolean property in a 'functions' file
I have an entity called File, I created a partial class with a property
I have this inside my spring xml file: <object type=Test.Web.Utilities.TestClass, Test.Web singleton=false id=TestClass> <property
I have property management application consisting of tables: tenants landlords units properties vendors-contacts Basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.