You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/11/10 20:44:35 UTC
svn commit: r593811 -
/maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt
Author: dennisl
Date: Sat Nov 10 11:44:33 2007
New Revision: 593811
URL: http://svn.apache.org/viewvc?rev=593811&view=rev
Log:
o Explain how this works for different version of the plugin.
o Add a note that it is better to build a skin.
Modified:
maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt
Modified: maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt?rev=593811&r1=593810&r2=593811&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt (original)
+++ maven/plugins/trunk/maven-site-plugin/src/site/apt/examples/templatefile.apt Sat Nov 10 11:44:33 2007
@@ -31,7 +31,16 @@
Changing the Template File
- It is possible to change the Velocity template used for creating the site. In your pom, just add something like this:
+ It is possible to change the Velocity template used for creating the site.
+ Save your custom template in a directory of your choice and configure the
+ site plugin accordingly.
+
+ <<Note:>> If you use this method then skins and the default templates, CSS
+ and images are disabled. It is therefor highly recommended that you package
+ this as a {{{creatingskins.html}skin}} instead.
+
+ For version 2.0-beta-5 and later you would add something like this to your
+ <<<pom.xml>>>:
+-----+
<project>
@@ -39,12 +48,11 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <templateDirectory>${basedir}</templateDirectory>
- <template>maven-site.vm</template>
- </configuration>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <templateFile>${basedir}/maven-site.vm</templateFile>
+ </configuration>
</plugin>
</plugins>
</build>
@@ -52,5 +60,37 @@
</project>
+-----+
- And execute the site goal from your project. For more information about Velocity, see
+ For version 2.0-beta-4 and earlier it was done by adding this to your
+ <<<pom.xml>>>:
+
++-----+
+<project>
+ ...
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <templateDirectory>${basedir}</templateDirectory>
+ <template>maven-site.vm</template>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ ...
+</project>
++-----+
+
+ Then you execute the site goal from your project:
+
++-----+
+mvn site
++-----+
+
+ If you don't want to start from scratch you can start with the
+ {{{https://svn.apache.org/repos/asf/maven/doxia/doxia-sitetools/trunk/doxia-site-renderer/src/main/resources/org/apache/maven/doxia/siterenderer/resources/default-site.vm}default template}}
+ that is used by the site plugin.
+
+ For more information about Velocity, see
{{{http://velocity.apache.org/}http://velocity.apache.org/}}.