I believe the following snippet (from
http://maven.apache.org/pom.html#Resources) could solve your situation:

<resources>
      <resource>
        <targetPath>META-INF/plexus</targetPath>
        <filtering>false</filtering>
        <directory>${basedir}/src/main/plexus</directory>
        <includes>
          <include>configuration.xml</include>
        </includes>
        <excludes>
          <exclude>**/*.properties</exclude>
        </excludes>
      </resource>
    </resources>
    <testResources>
      ...
    </testResources>

>From what you are saying it appears that filtering has not been applied to 
>test resources. 

M.

On Sun, 2010-05-09 at 13:05 -0700, Stephane Eybert wrote:
> Hi Jemos,
> 
> Thanks for your reply. But I wonder how come the file in the target
> directory shows all the properties being filtered fine.
> 
> A look at the file core/target/classes/spring-hibernate.xml shows the
> property place holders replaced by the corresponding values.
> 
> But a look at the file core/target/test-classes/spring-hibernate.xml shows
> that the property place holders were NOT replaced.
> 
> So, the filtering works in a way that escapes me... It seems to filter
> something, creating a filtered file at
> core/target/classes/spring-hibernate.xml but not doing it for the file
> core/target/test-classes/spring-hibernate.xml 
> 
> What puzzles me is that I only run an integration test with the command:
> 
> mvn clean test -Pitest
> 
> Here are the generated files in the target directory, one in classes/
> filtered fine and the other one in test-classes not filtered:
> 
> http://old.nabble.com/file/p28505207/spring-hibernate.xml
> spring-hibernate.xml 
> 
> http://old.nabble.com/file/p28505207/spring-hibernate.xml
> spring-hibernate.xml 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to