ixx
ixx

Reputation: 32271

Ant: How to use a property value as replacement in replaceregexp

I need to replace a regex match with a value from a properties file.

It would look like:

<replaceregexp 
        file="test.txt"
        match="blabla" 
        replace="some.property"
        >
</replaceregexp>

(That doesn't work, it's just to show what I need)

some.property is in a file called test.properties

Upvotes: 0

Views: 2323

Answers (2)

ggarcia24
ggarcia24

Reputation: 392

I think that the problem is that you are using some.property instead of ${some.property}. That's how I have it working.

Upvotes: 2

Mark O&#39;Connor
Mark O&#39;Connor

Reputation: 77951

Use the loadproperties task to load properties from a file.

Upvotes: 0

Related Questions