antbuildejb-jar.xml

Ejb jar for Jboss PER environment


I am trying to read the attributes from a properties file into a field in ejb-jar.xml via ANT.

I have one properties file PER environment which contains an IP address which must be written into ejb-jar.xml when ANT is building the ear.

How would I accomplish that ?


Solution

  • please refer https://ant.apache.org/manual/Tasks/replace.html

    check this : if you have someDirectory/cofiguration.properties in which you have IP configuration as per your environments and in that property file ipAddress.key is the key and want to replace with the value of it. ejbIPAddress will be replaced by ipAddress.key value of someDirectory/cofiguration.properties