Hi,

The way you have defined here, the files will always come from /src 
directory.

Plus 
<filterPropertiesFile>${basedir}/src/main/resources/tokens/stage</filterPropertiesFile>
 
should point to a file, not a directory.??

Maybe first you can filter into some temporary directory that filter that 
again. For this you will have to declare resources plugin twice with a 
diferent stage of execution and in it's configuration specify directories 
to filter. A month ago it didn't work to specify a source and target 
directories in a plugin directly, although a model seemed to support it. 
You can try how it works now.


Andrius





Sena Gbeckor-Kove <[EMAIL PROTECTED]> 
2005.10.03 12:43
Please respond to
"Maven Users List" <[email protected]>


To
Maven Users List <[email protected]>
cc

Subject
Re: [m2] Filtering problems in Beta






Hi Andrius,

Thanks for the example earlier, I have now run into another problem, I
filter a resource which gets copied into a target directory, so far so
simple. Then I need to to filter the contents of that directory. I
have attempted to do this with the following code :

  <build>
                 <resources>
                                 <resource>
 <targetPath>${basedir}/target/etc/templates</targetPath>
 <filtering>true</filtering>
 <directory>${basedir}/src/main/resources/tokens</directory>
                                                 <includes>
 <include>stage</include>
                                                 </includes>
                                                 <excludes>
 <exclude>*.tokens</exclude>
                                                 </excludes>
                                 </resource>
                                 <resource>
 <targetPath>${basedir}/target/etc</targetPath>
 <filtering>true</filtering>
 <directory>${basedir}/src/main/resources/templates</directory>
                                 </resource>
                 </resources>
                 <plugins>
                                 <plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-resources-plugin</artifactId>
                                                 <executions>
 <execution>
  <id>stage_filtering</id>  
  <goals>
                 <goal>resources</goal>
  </goals>
  <configuration>
  
<filterPropertiesFile>${basedir}/src/main/resources/tokens/stage</filterPropertiesFile>
                 <filtering>true</filtering>
  </configuration>
 </execution>
 <execution>
  <id>template_filtering</id>
  <goals>
                 <goal>resources</goal>
  </goals>
  <configuration>
  
<filterPropertiesFile>${basedir}/target/templates/stage</filterPropertiesFile>
                 <filtering>true</filtering>
  </configuration>
 </execution>
                                                 </executions>
                                 </plugin>
                 </plugins>
  </build>

Unfortunately this brings up the error :

error copying resources.

Any ideas? This is stumping me somewhat.

Thx







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

Reply via email to