I am not precisely sure what the difference is, but from looking at the filtering code in the maven-resources-plugin in the past, I know that it does treat *.properties files differently than other files.

These things might make a difference, too:

1. What delimiters are you using for the tokens? ${} is probably more likely to work than @@.

2. How are the properties specified? There is an issue with replacing system properties (specified on the command line with -Dname=value). Are you are using system properties in your token replacements?

3. Watch out for typos that might mess up the token replacement engine. For example, an unmatched }, {, or @ character can mess up replacement.


As a real-world example of #3, the jboss-service.xml file that ships with JBoss 4.0.3SP1 has a typo in it, and my token replacements weren't working properly until I resolved it. This was the offending line (note the paren instead of curly brace after jboss.server.home):

  scans ${jboss.server.home)/deploy, which is always local

-Max

Claus Myglegaard Vagner wrote:
Hi,

I have a problem filtering property files (using maven 2.0.4):

Setup:
 ...
<build>
       <finalName>planb</finalName>
       <sourceDirectory>src/java</sourceDirectory>
       <testSourceDirectory>src/test</testSourceDirectory>
       <filters>
           <filter>${basedir}/context.properties</filter>
       </filters>
       <resources>
           <resource>
               <directory>${basedir}/src/conf</directory>
               <filtering>true</filtering>
               <includes>
                   <include>context.xml</include>
                   <include>version.properties</include>
               </includes>
           </resource>
           ...
       </resources>
       ...
</build>
 ...

Filtering of the above context.xml works fine, but filtering of version.properties dosn't seem to work?

If I create a version.xml file instead an replaces it with version.properties again it works... (any difference for *.xml contra *.properties filtering?)

Ideally I would like to use settings.xml as filter instead of context.properties but it only seems to work with context.properties...

Can anybody please help me with

1. why isn't version.properties being filtered?
2. why can't I use settings.xml as a filter?

Best Regards,
Claus

---------------------------------------------------------------------
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]

Reply via email to