You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gregory Kick <gk...@gmail.com> on 2007/01/12 04:31:36 UTC
applying filters to a site
after looking through the thread at
http://www.nabble.com/-M2--Insert-variables-in-xdoc-apt-files-tf1956665.html
i've gotten filters applied to a site using:
<resources>
<resource>
<directory>src/site</directory>
<targetPath>../filtered-site</targetPath>
<filtering>true</filtering>
</resource>
</resources>
<filters>
<filter>site-filter.properties</filter>
</filters>
and
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
</configuration>
</plugin>
Is there a better way to get this done? It seems like there are way
too many steps involved...
--
Gregory Kick
gk5885@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: applying filters to a site
Posted by "Riboe, Jens" <Je...@ca.com>.
This is indeed too many steps involved and if you try it for a
multi-module project it breaks down. Unless you replicate a substantial
set of the pom properties, which makes the idea of pom inheritance less
appealing.
Resource filtering happens during compilation, which means all
sub-modules try to filter as well even if you just want it to occur for
the parent project. IFAIK there is no way to prevent pom properties
inheritance.
IMHO multi-module site generation needs a re-design.
* POM properties filtering should be built-in for site.xml and text
docs, like apt.
* There should be built-in support for report aggregation, so it doesn't
need to be implemented
by each report plug-in.
I find myself wasting too much time just with trial-and-error to get
site generation work.
/Jens
>> -----Original Message-----
>> From: Gregory Kick [mailto:gk5885@gmail.com]
>> Sent: den 12 januari 2007 04:32
>> To: Maven Users List
>> Subject: applying filters to a site
>>
>> after looking through the thread at
>>
>>
http://www.nabble.com/-M2--Insert-variables-in-xdoc-apt-files-tf1956665.
html
>>
>> i've gotten filters applied to a site using:
>>
>> <resources>
>> <resource>
>> <directory>src/site</directory>
>> <targetPath>../filtered-site</targetPath>
>> <filtering>true</filtering>
>> </resource>
>> </resources>
>> <filters>
>> <filter>site-filter.properties</filter>
>> </filters>
>>
>> and
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-site-plugin</artifactId>
>> <configuration>
>>
>>
<siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
>> </configuration>
>> </plugin>
>>
>>
>> Is there a better way to get this done? It seems like there are way
>> too many steps involved...
>>
>> --
>> Gregory Kick
>> gk5885@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org