Hi again Andrius,
(or whoever else can help ;)
I thought tha the explanations given above had helped my case, but my
project appears to be suffering from the mysterious 'bit-rot'. My
current situation is as such, M2 is refusing to tokenise my file
called 'stage'. I am trying to copy the file from one location to
another, while filtering in some java system properties, which I have
been led to believe should work. The file stage is a filters file
which itself needs to be filtered before being used.Here is an extract
of the pom, the filters file folows that :
Thx in advance.
<build>
<resources>
<resource>
<targetPath>../templates</targetPath>
<filtering>true</filtering>
<directory>src/main/resources/tokens</directory>
<includes>
<include>stage</include>
</includes>
</resource>
<resource>
<targetPath>../prepackage/config</targetPath>
<filtering>true</filtering>
<directory>src/main/resources/templates</directory>
<includes>
<include>config.xml</include>
<include>log4j.xml</include>
<include>server-config.wsdd</include>
</includes>
</resource>
<resource>
<targetPath>../prepackage/etc</targetPath>
<filtering>false</filtering>
<directory>target/prepackage/config</directory>
<includes>
<include>log4j.xml</include>
</includes>
</resource>
<resource>
<targetPath>../testpackages</targetPath>
<filtering>false</filtering>
<directory>src/test/testpackages</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>src/main/resources/tokens/stage</filterPropertiesFile>-->
<filtering>true</filtering>
</configuration>
</execution>
<execution>
<id>template_filtering</id>
<goals>
<goal>resources</goal>
</goals>
<configuration>
<filterPropertiesFile>target/templates/stage</filterPropertiesFile>
<filtering>true</filtering>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Filters file (stage):
#
# DepotGate Stage Descriptor
# Version $Revision$
#
# the level against which is logged
# PROD: INFO
# default: DEBUG
log.level.log4j=DEBUG
# directories
# directory to log to
fs.dir.log=${java.io.tmpdir}depotgate.log
# The Depot root directory (where uploaded files are stored)
# OSA: /jdepot/root
fs.dir.depotbase=${java.io.tmpdir}depot
# The home directory of the JDepot binaries, configuration etc.
# OSA: /work/jdepot
fs.dir.jdepothome=${java.io.tmpdir}depot
# temporary directory in which to store SOAP attachments
# e.g. /tmp
# must have at least 400M of space available
# OSA: /jdepot/attachments
fs.dir.attachments=${java.io.tmpdir}attachments
# temporary directory for saving uploaded files to
# e.g. /tmp
fs.dir.staging=${java.io.tmpdir}
# the FQ DNS hostname by which the system is reachable
# OSA: jdepot-o.internal.epo.org
net.inet.dns.vhost=localhost
# the URL which the web server is accessable via
# e.g. http://jdepot.internal.epo.org/depot
# this does not normally have to be changed
net.inet.url.depotprefix=http://${net.inet.dns.vhost}/depot
On 04/10/05, Andrius Karpavicius <[EMAIL PROTECTED]> wrote:
> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]