You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Nord, James" <JN...@nds.com> on 2009/04/01 16:07:42 UTC
filtering site resources?
I have some resources in src/site/resources/to_filter that I want to end
up in the project site after filtering.
I have added the following to the pom but the resources are copies
without filtering.
<build>
<filters>
<filter>src/main/filters/filter.propertiess</filter>
</filters>
<resources>
<resource>
<directory>src/site/resources/to_filter</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
This didn't work unsuprisingly as site phase doesn't do any filtering...
so then I tried renaming the files to *.*.vm and added the properties to
the pom (using beta6 of the site plugin)
This also didn't work :-(
How do I accomplish what I want to do?
/James
**************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the postmaster@nds.com and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.
To protect the environment please do not print this e-mail unless necessary.
NDS Limited Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**************************************************************************************
RE: filtering site resources?
Posted by "Nord, James" <JN...@nds.com>.
Thanks,
Did something very similar that worked (below for future reference)..
/James
<build>
<filters>
<filter>src/main/filters/filter.properties</filter>
</filters>
<!-- hack to get the php files filtered correctly for
the site -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>site-filtering-hack</id>
<phase>pre-site</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<inherited>false</inherited>
<configuration>
<outputDirectory>${basedir}/target/site/runtime_docs</outputDirectory>
<resources>
<resource>
<directory>src/main/site-resources/runtime_docs</directory>
<filtering>true</filtering>
</resource>
</resources>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
> -----Original Message-----
> From: EJ Ciramella [mailto:eciramella@upromise.com]
> Sent: 01 April 2009 18:23
> To: Maven Users List
> Subject: RE: filtering site resources?
>
> Yeah, we struggled with this too - and being forced to only
> use velocity properties was a deal breaker for us (all of our
> properties are in the foo.bar style).
>
> On a side project, I simply put site template files in the
> resources directory and process them to the src/site
> directory where I want them (so the foo.bar properties are
> expanded). Just make sure the clean plugin cleans this directory.
>
> -----Original Message-----
> From: Nord, James [mailto:JNord@nds.com]
> Sent: Wednesday, April 01, 2009 10:08 AM
> To: Maven Users List
> Subject: filtering site resources?
>
> I have some resources in src/site/resources/to_filter that I
> want to end up in the project site after filtering.
>
> I have added the following to the pom but the resources are
> copies without filtering.
>
> <build>
> <filters>
> <filter>src/main/filters/filter.propertiess</filter>
> </filters>
> <resources>
> <resource>
> <directory>src/site/resources/to_filter</directory>
> <filtering>true</filtering>
> </resource>
> </resources>
> </build>
>
> This didn't work unsuprisingly as site phase doesn't do any
> filtering...
> so then I tried renaming the files to *.*.vm and added the
> properties to the pom (using beta6 of the site plugin)
>
> This also didn't work :-(
>
> How do I accomplish what I want to do?
>
> /James
>
> **************************************************************
> **********
> **************
> This e-mail is confidential, the property of NDS Ltd and
> intended for the addressee only. Any dissemination, copying
> or distribution of this message or any attachments by anyone
> other than the intended recipient is strictly prohibited. If
> you have received this message in error, please immediately
> notify the postmaster@nds.com and destroy the original
> message. Messages sent to and from NDS may be monitored. NDS
> cannot guarantee any message delivery method is secure or error-free.
> Information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses. We do not
> accept responsibility for any errors or omissions in this
> message and/or attachment that arise as a result of
> transmission. You should carry out your own virus checks
> before opening any attachment. Any views or opinions
> presented are solely those of the author and do not
> necessarily represent those of NDS.
>
> To protect the environment please do not print this e-mail
> unless necessary.
>
> NDS Limited Registered Office: One London Road, Staines,
> Middlesex, TW18 4EX, United Kingdom. A company registered in
> England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
> **************************************************************
> **********
> **************
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
**************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only. Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited. If you have received this message in error, please immediately notify the postmaster@nds.com and destroy the original message. Messages sent to and from NDS may be monitored. NDS cannot guarantee any message delivery method is secure or error-free. Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission. You should carry out your own virus checks before opening any attachment. Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.
To protect the environment please do not print this e-mail unless necessary.
NDS Limited Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00
**************************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: filtering site resources?
Posted by EJ Ciramella <ec...@upromise.com>.
Yeah, we struggled with this too - and being forced to only use velocity
properties was a deal breaker for us (all of our properties are in the
foo.bar style).
On a side project, I simply put site template files in the resources
directory and process them to the src/site directory where I want them
(so the foo.bar properties are expanded). Just make sure the clean
plugin cleans this directory.
-----Original Message-----
From: Nord, James [mailto:JNord@nds.com]
Sent: Wednesday, April 01, 2009 10:08 AM
To: Maven Users List
Subject: filtering site resources?
I have some resources in src/site/resources/to_filter that I want to end
up in the project site after filtering.
I have added the following to the pom but the resources are copies
without filtering.
<build>
<filters>
<filter>src/main/filters/filter.propertiess</filter>
</filters>
<resources>
<resource>
<directory>src/site/resources/to_filter</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
This didn't work unsuprisingly as site phase doesn't do any filtering...
so then I tried renaming the files to *.*.vm and added the properties to
the pom (using beta6 of the site plugin)
This also didn't work :-(
How do I accomplish what I want to do?
/James
************************************************************************
**************
This e-mail is confidential, the property of NDS Ltd and intended for
the addressee only. Any dissemination, copying or distribution of this
message or any attachments by anyone other than the intended recipient
is strictly prohibited. If you have received this message in error,
please immediately notify the postmaster@nds.com and destroy the
original message. Messages sent to and from NDS may be monitored. NDS
cannot guarantee any message delivery method is secure or error-free.
Information could be intercepted, corrupted, lost, destroyed, arrive
late or incomplete, or contain viruses. We do not accept responsibility
for any errors or omissions in this message and/or attachment that arise
as a result of transmission. You should carry out your own virus checks
before opening any attachment. Any views or opinions presented are
solely those of the author and do not necessarily represent those of
NDS.
To protect the environment please do not print this e-mail unless
necessary.
NDS Limited Registered Office: One London Road, Staines, Middlesex, TW18
4EX, United Kingdom. A company registered in England and Wales
Registered no. 3080780 VAT no. GB 603 8808 40-00
************************************************************************
**************
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org