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 7093895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:29:47+00:00 2026-05-28T08:29:47+00:00

So the overall problem is this: We have multiple property files <property file=prop1/> <property

  • 0

So the overall problem is this:

We have multiple property files

<property file="prop1"/>
<property file="prop2"/>

prop1 contains a property looking like:

mg.prop = ${mg2.prop}

prop2 contains mg2.prop

mg2.prop = Hello

If they were in the same file and I queried mg.prop, I’d get “Hello” back. Since they are in separate files this does not work (I need to load prop1 before prop2!)

I wrote a custom ant task that does the following:

String resolved = resolveProperty(propertyName);
getProject().setProperty(propertyName, resolved);

If I run

log("Resolved property value = " + getProject().getProperty(propertyName)); 

Right after, I get the correct value.

However in the Ant script, if I do

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

it shows me the original value.

Any thoughts on how to solve 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-05-28T08:29:47+00:00Added an answer on May 28, 2026 at 8:29 am

    Here’s how I ended up resolving this – I turfed the custom ant task.

    I ended up concatenating all the properties files into one, in the reverse order of precedence.

    So if I wanted properties from 3.properties to override those in 2.properties and 1.properties, I did the following:

    <concat destfile="resolved.properties">
        <fileset file="1.properties" />
        <fileset file="2.properties" />
        <fileset file="3.properties" />
    </concat>
    
    <property file="resolved.properties"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have hit upon this problem about whether to use bignums in my language
I would like to find an appropriate algorithm to solve this problem: Suppose we
This problem has been bothering me for sometime now, I have not settled on
I am looking for a Pythonic way to solve the following problem. I have
I have a legacy (solve this problem for us issue) app that communicates with
I have this problem with openGL ES 1.1 on iPhone. I have made myself
I have a problem with this simple program because it doesnt give me the
Let's say I have a program(C++, for example) that allocates multiple objects, never bigger
I have a rather unique problem that I'm having trouble solving. I have a
Sorry for the bad title, but I have no idea how to put this

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.