So what is the proper way to do the following:
1) Filter a config file to put the properties in place 2) Copy the file to the target directory and rename it
For example: I have a property file called hibernate.conf.tmpl.xml and I want it to be filtered and then copied as hibernate.conf.xml
Any ideas? I'd rather not have to know the name of the file ahead of time...
Thanks,
Rick
On Feb 14, 2005, at 3:13 PM, Brett Porter wrote:
1) It doesn't filter anything. Files are not touched, just copied.
Double check your resource set matches the one copied, and that it doesn't overlap with another one defined to contain the same files without filtering.
2) Maven always try to load a file named "some.properties" ?!
That's not from Maven - search your project.xml, maven.xml and project.properties files, including any you inherit from using <extend/>.
I'm now using :
<preGoal name="java:jar-resources">
<ant:filter filtersfile="config/environnement/${platform}.conf" />
<copy todir="target/classes" filtering="false" overwrite="true">
<fileset dir="config/template" />
</copy>
</preGoal>
This is equivalent to using the resources, however will not allow other parts of Maven (eg the IDE plugins) to see where you reosources are.
- Brett
--------------------------------------------------------------------- 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]
