Hello Marco
For such a need, use the jelly variable.
What you would do typically is initiate your variable using the property
value, then you can modify its value. That would do the trick in runtime
but if you need to actually write this value in a property, check the
Ant <property> tag, that should allow you to write the value in your
property file.
Hope it helps
Eric.
Marco Mistroni wrote:
hello all,
i am building an application using Maven.
I have defined some custom properties in project.properties, and i
can successfully retrieve them inside my java code using
System.getPRoperteis.
I was wondering however if maven can substitute properties defined
inside project.properties also in normal configuration files.
example:
i have a config file called openejb.config in which i have to define
a datasource wiht url, username and password
i need same informations also for my dbunit tests, so i have defined
those 3passwords inside my project properteis.
in my java code i use System.getPRoperty("username") to get value
from properties, but in my config file i have tried to do
${username}
hoping that during compiation/build maven would have substituted it
with the value of the property username defined in project.properties
But it didn't work...
Is it possible to do that? if so, how?
thanks in advance and regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]