Good day to you, Ravi,

Put your properties file under src/main/filters ( or src/test/filters if its
for testing ). Then add it to your pom via

<project>
  ...
  <filters>
    <filter>src/main/filters/sample-filter-file.properties</filter>
  </filters>
  ...
</project>

And in your sample-filter-file.properties, have something like this
outDir=C:/Output
another.property.name=another property value
and.so.on=and.so.forth

You can also take a look at [1] for more info. 

Cheers,
Franz

[1]
http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html


Balasubramanian, Ravi Shankar wrote:
> 
> Hi,
> 
> I am a relatively new user of maven and I want to be injecting
> properties into the pom from an external properties file. For eg, I will
> have a property "outDir=C:/Output" defined in an external properties
> file and I want to be using this in my pom.xml file. Something like
> <outputDir>${outDir}</outputDir>. 
> 
> Can anyone let me know how this can be done? I tried adding the
> properties file as a filter and somehow it does not seem to work. 
> 
>  
> 
> Thanks for any help,
> 
> Ravi.
> 
> "Tough times never last, but tough men do..."
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Injecting-properties-into-the-pom-from-an-external-properties-file-tf2888983s177.html#a8073374
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to