You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/04/24 11:30:14 UTC
[maven-site-plugin] 02/05: [MSITE-892] Upgrade to Doxia/Doxia Sitetools to 2.0.0-M2
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch doxia-2.0.0
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
commit 5f81392dadcc6899c17e1c64f6957229514118ff
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Apr 24 13:04:27 2022 +0200
[MSITE-892] Upgrade to Doxia/Doxia Sitetools to 2.0.0-M2
---
pom.xml | 30 +------
.../java/org/apache/maven/plugins/it/MyReport.java | 4 +-
src/it/projects/MSITE-842/invoker.properties | 3 +-
src/it/projects/MSITE-842/pom.xml | 65 ++------------
src/it/projects/MSITE-842/{ => project}/pom.xml | 14 ++--
.../MSITE-842/{ => project}/src/it/MSITE-842.html | 0
.../{ => project}/src/it/another-page.html | 0
.../MSITE-842/{ => project}/src/it/sub/sub.html | 0
.../java/org/apache/maven/plugins/it/MyReport.java | 0
.../MSITE-842.html => project/src/site/site.xml} | 23 +++--
.../{src/it/MSITE-842.html => skin/pom.xml} | 21 ++++-
.../src/main/resources/META-INF/maven/site.vm} | 0
src/it/projects/MSITE-842/verify.groovy | 12 +--
.../src/site/apt/velocity-context.apt.vm | 11 ---
.../src/site/confluence/confluence.confluence | 35 --------
.../doxia-formats/src/site/docbook/docbook.xml | 56 -------------
.../doxia-formats/src/site/twiki/twiki.twiki | 25 ------
src/it/projects/doxia-formats/verify.groovy | 3 -
src/it/projects/template-skin/invoker.properties | 4 +-
src/it/projects/template-skin/pom.xml | 20 +----
.../site/render/AbstractSiteRenderingMojo.java | 56 ++++---------
.../render/CategorySummaryDocumentRenderer.java | 8 +-
.../site/render/ReportDocumentRenderer.java | 3 -
.../apache/maven/plugins/site/run/DoxiaFilter.java | 2 +-
src/site/apt/examples/templatefile.apt.vm | 98 ----------------------
src/site/site.xml | 1 -
26 files changed, 79 insertions(+), 415 deletions(-)
diff --git a/pom.xml b/pom.xml
index a4d5516e..efc1ef1a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -197,10 +197,9 @@ under the License.
<properties>
<mavenVersion>3.2.5</mavenVersion>
<javaVersion>8</javaVersion>
-
<!-- for dependencies -->
- <doxiaVersion>1.11.1</doxiaVersion>
- <doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
+ <doxiaVersion>2.0.0-M2</doxiaVersion>
+ <doxiaSitetoolsVersion>2.0.0-M2</doxiaSitetoolsVersion>
<jettyVersion>9.4.46.v20220331</jettyVersion>
<wagonVersion>3.5.1</wagonVersion>
<slf4jVersion>1.7.36</slf4jVersion>
@@ -372,24 +371,7 @@ under the License.
<version>${doxiaVersion}</version>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-module-confluence</artifactId>
- <version>${doxiaVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-module-docbook-simple</artifactId>
- <version>${doxiaVersion}</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-module-twiki</artifactId>
- <version>${doxiaVersion}</version>
- <scope>runtime</scope>
- </dependency>
+
<!-- Doxia Sitetools -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
@@ -407,12 +389,6 @@ under the License.
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>${doxiaSitetoolsVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<!-- Wagon -->
diff --git a/src/it/projects/MSITE-627/src/main/java/org/apache/maven/plugins/it/MyReport.java b/src/it/projects/MSITE-627/src/main/java/org/apache/maven/plugins/it/MyReport.java
index 1d4ffe2b..8fba898f 100644
--- a/src/it/projects/MSITE-627/src/main/java/org/apache/maven/plugins/it/MyReport.java
+++ b/src/it/projects/MSITE-627/src/main/java/org/apache/maven/plugins/it/MyReport.java
@@ -20,7 +20,7 @@ package org.apache.maven.plugins.it;
*/
import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkAdapter;
+import org.apache.maven.doxia.sink.impl.SinkAdapter;
import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
@@ -30,7 +30,7 @@ import java.util.Locale;
/**
* Goal which creates a sink in a report.
- *
+ *
* @goal test
* @phase site
*/
diff --git a/src/it/projects/MSITE-842/invoker.properties b/src/it/projects/MSITE-842/invoker.properties
index ed62a613..fc01a821 100644
--- a/src/it/projects/MSITE-842/invoker.properties
+++ b/src/it/projects/MSITE-842/invoker.properties
@@ -17,5 +17,4 @@
invoker.goals.1 = clean install
invoker.debug.1 = false
-invoker.goals.2 = site
-invoker.maven.version = 3.0+
+invoker.goals.2 = -pl project site
diff --git a/src/it/projects/MSITE-842/pom.xml b/src/it/projects/MSITE-842/pom.xml
index 470ef867..15ac0597 100644
--- a/src/it/projects/MSITE-842/pom.xml
+++ b/src/it/projects/MSITE-842/pom.xml
@@ -25,69 +25,16 @@ under the License.
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins.site.its</groupId>
- <artifactId>MSITE-842</artifactId>
+ <artifactId>MSITE-842-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
- <packaging>maven-plugin</packaging>
+ <packaging>pom</packaging>
<name>it-plugin-test Maven Mojo</name>
<url>http://maven.apache.org</url>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- <version>3.0.0</version>
- </dependency>
- </dependencies>
-
- <build>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>@project.version@</version>
- </plugin>
- </plugins>
- </pluginManagement>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <templateFile>${basedir}/src/site/show-properties.vm</templateFile>
- </configuration>
- </plugin>
- </plugins>
-
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins.site.its</groupId>
- <artifactId>MSITE-842</artifactId>
- <version>${project.version}</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.9</version>
- <reportSets>
- <reportSet>
- <configuration>
- <skip>true</skip>
- </configuration>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
+ <modules>
+ <module>skin</module>
+ <module>project</module>
+ </modules>
</project>
diff --git a/src/it/projects/MSITE-842/pom.xml b/src/it/projects/MSITE-842/project/pom.xml
similarity index 88%
copy from src/it/projects/MSITE-842/pom.xml
copy to src/it/projects/MSITE-842/project/pom.xml
index 470ef867..d44dd883 100644
--- a/src/it/projects/MSITE-842/pom.xml
+++ b/src/it/projects/MSITE-842/project/pom.xml
@@ -25,7 +25,7 @@ under the License.
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins.site.its</groupId>
- <artifactId>MSITE-842</artifactId>
+ <artifactId>MSITE-842-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
@@ -40,7 +40,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>3.0.0</version>
+ <version>4.0.0-M1</version>
</dependency>
</dependencies>
@@ -59,10 +59,8 @@ under the License.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <templateFile>${basedir}/src/site/show-properties.vm</templateFile>
- </configuration>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <version>3.6.4</version>
</plugin>
</plugins>
@@ -72,13 +70,13 @@ under the License.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins.site.its</groupId>
- <artifactId>MSITE-842</artifactId>
+ <artifactId>MSITE-842-plugin</artifactId>
<version>${project.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.9</version>
+ <version>@projectInfoReportsPluginVersion@</version>
<reportSets>
<reportSet>
<configuration>
diff --git a/src/it/projects/MSITE-842/src/it/MSITE-842.html b/src/it/projects/MSITE-842/project/src/it/MSITE-842.html
similarity index 100%
copy from src/it/projects/MSITE-842/src/it/MSITE-842.html
copy to src/it/projects/MSITE-842/project/src/it/MSITE-842.html
diff --git a/src/it/projects/MSITE-842/src/it/another-page.html b/src/it/projects/MSITE-842/project/src/it/another-page.html
similarity index 100%
rename from src/it/projects/MSITE-842/src/it/another-page.html
rename to src/it/projects/MSITE-842/project/src/it/another-page.html
diff --git a/src/it/projects/MSITE-842/src/it/sub/sub.html b/src/it/projects/MSITE-842/project/src/it/sub/sub.html
similarity index 100%
rename from src/it/projects/MSITE-842/src/it/sub/sub.html
rename to src/it/projects/MSITE-842/project/src/it/sub/sub.html
diff --git a/src/it/projects/MSITE-842/src/main/java/org/apache/maven/plugins/it/MyReport.java b/src/it/projects/MSITE-842/project/src/main/java/org/apache/maven/plugins/it/MyReport.java
similarity index 100%
rename from src/it/projects/MSITE-842/src/main/java/org/apache/maven/plugins/it/MyReport.java
rename to src/it/projects/MSITE-842/project/src/main/java/org/apache/maven/plugins/it/MyReport.java
diff --git a/src/it/projects/MSITE-842/src/it/MSITE-842.html b/src/it/projects/MSITE-842/project/src/site/site.xml
similarity index 53%
copy from src/it/projects/MSITE-842/src/it/MSITE-842.html
copy to src/it/projects/MSITE-842/project/src/site/site.xml
index 4aea73d8..46939e5e 100644
--- a/src/it/projects/MSITE-842/src/it/MSITE-842.html
+++ b/src/it/projects/MSITE-842/project/src/site/site.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,10 +19,21 @@ specific language governing permissions and limitations
under the License.
-->
-alignedFileName = MSITE-842.html
-
-currentFileName = MSITE-842.html
+<project name="Maven" xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <skin>
+ <groupId>org.apache.maven.plugins.site.its</groupId>
+ <artifactId>MSITE-842-skin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </skin>
-getRelativePath() = .
+ <body>
+ <links>
+ <item name="Maven" href="http://maven.apache.org/"/>
+ </links>
-content = Main Sink
+ <menu name="Documentation">
+ <!--<item name="Xdoc Example" href="xdoc.html"/>-->
+ </menu>
+ </body>
+</project>
diff --git a/src/it/projects/MSITE-842/src/it/MSITE-842.html b/src/it/projects/MSITE-842/skin/pom.xml
similarity index 54%
rename from src/it/projects/MSITE-842/src/it/MSITE-842.html
rename to src/it/projects/MSITE-842/skin/pom.xml
index 4aea73d8..009ce86b 100644
--- a/src/it/projects/MSITE-842/src/it/MSITE-842.html
+++ b/src/it/projects/MSITE-842/skin/pom.xml
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,10 +19,21 @@ specific language governing permissions and limitations
under the License.
-->
-alignedFileName = MSITE-842.html
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.site.its</groupId>
+ <artifactId>MSITE-842-skin</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
-currentFileName = MSITE-842.html
+ <name>it-plugin-test Maven Mojo</name>
+ <url>http://maven.apache.org</url>
-getRelativePath() = .
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
-content = Main Sink
+</project>
diff --git a/src/it/projects/MSITE-842/src/site/show-properties.vm b/src/it/projects/MSITE-842/skin/src/main/resources/META-INF/maven/site.vm
similarity index 100%
rename from src/it/projects/MSITE-842/src/site/show-properties.vm
rename to src/it/projects/MSITE-842/skin/src/main/resources/META-INF/maven/site.vm
diff --git a/src/it/projects/MSITE-842/verify.groovy b/src/it/projects/MSITE-842/verify.groovy
index 508edb64..2bc801d6 100644
--- a/src/it/projects/MSITE-842/verify.groovy
+++ b/src/it/projects/MSITE-842/verify.groovy
@@ -22,22 +22,22 @@ File resultFile;
File expectedFile;
// Check MSITE-842.html (must exist and be exactly like the model
-resultFile = new File(basedir, "target/site/MSITE-842.html");
-expectedFile = new File(basedir, "src/it/MSITE-842.html");
+resultFile = new File(basedir, "project/target/site/MSITE-842.html");
+expectedFile = new File(basedir, "project/src/it/MSITE-842.html");
assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())
// Check another-page.html (must exist and be exactly like the model
-resultFile = new File(basedir, "target/site/another-page.html");
-expectedFile = new File(basedir, "src/it/another-page.html");
+resultFile = new File(basedir, "project/target/site/another-page.html");
+expectedFile = new File(basedir, "project/src/it/another-page.html");
assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())
// Check sub/sub.html (must exist and be exactly like the model
-resultFile = new File(basedir, "target/site/sub/sub.html");
-expectedFile = new File(basedir, "src/it/sub/sub.html");
+resultFile = new File(basedir, "project/target/site/sub/sub.html");
+expectedFile = new File(basedir, "project/src/it/sub/sub.html");
assert resultFile.exists() && resultFile.isFile()
assert resultFile.text.normalize().equals(expectedFile.text.normalize())
diff --git a/src/it/projects/doxia-formats/src/site/apt/velocity-context.apt.vm b/src/it/projects/doxia-formats/src/site/apt/velocity-context.apt.vm
index 122a9313..b1e30996 100644
--- a/src/it/projects/doxia-formats/src/site/apt/velocity-context.apt.vm
+++ b/src/it/projects/doxia-formats/src/site/apt/velocity-context.apt.vm
@@ -52,15 +52,8 @@ Doxia Site Renderer Velocity Context
*-----------------------+-------------------------------------------------------+
| <<<decoration>>> | <<<decoration.name>>> = <<< $decoration.name>>>
*-----------------------+-------------------------------------------------------+
-| <<<currentDate>>> | = <<<$currentDate>>> \
-| | <<<dateFormat.format(currentDate)>>> = <<<$dateFormat.format($currentDate)>>>
-*-----------------------+-------------------------------------------------------+
| <<<currentFileName>>> | = <<<$currentFileName>>>
*-----------------------+-------------------------------------------------------+
-| <<<dateFormat>>> | = <<<$dateFormat>>>
-*-----------------------+-------------------------------------------------------+
-| <<<dateRevision>>> | = <<<$dateRevision>>>
-*-----------------------+-------------------------------------------------------+
| <<<doxiaSiteRendererVersion>>> | = <<<$doxiaSiteRendererVersion>>>
*-----------------------+-------------------------------------------------------+
| <<<locale>>> | = <<<$locale>>>
@@ -77,10 +70,6 @@ Doxia Site Renderer Velocity Context
*-----------------------*-------------------------------------------------------*
|| variable || examples ||
*-----------------------+-------------------------------------------------------+
-| <<<FileUtils>>> | = <<<$FileUtils>>>
-*-----------------------+-------------------------------------------------------+
-| <<<i18n>>> | = <<<$i18n>>>
-*-----------------------+-------------------------------------------------------+
| <<<PathTool>>> | = <<<$PathTool>>>
*-----------------------+-------------------------------------------------------+
| <<<StringUtils>>> | = <<<$StringUtils>>>
diff --git a/src/it/projects/doxia-formats/src/site/confluence/confluence.confluence b/src/it/projects/doxia-formats/src/site/confluence/confluence.confluence
deleted file mode 100644
index 89c3f06c..00000000
--- a/src/it/projects/doxia-formats/src/site/confluence/confluence.confluence
+++ /dev/null
@@ -1,35 +0,0 @@
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
-h4. Confluence Markup
-
-Ideally, the markup should be _readable_ and even *clearly understandable* when you are
-editing it. Inserting formatting should require few keystrokes, and little thought.
-
-After all, we want people to be concentrating on the words, not on where the angle-brackets
-should go.
-
-* Kinds of Markup
-** Text Effects
-** Headings
-** Text Breaks
-** Links
-** Other
-
-Example from [https://confluence.atlassian.com/display/CONF25/Confluence+Notation+Guide+Overview]
-
-Content for verify.groovy
diff --git a/src/it/projects/doxia-formats/src/site/docbook/docbook.xml b/src/it/projects/doxia-formats/src/site/docbook/docbook.xml
deleted file mode 100644
index a5d77f24..00000000
--- a/src/it/projects/doxia-formats/src/site/docbook/docbook.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding='UTF-8'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<!-- example from https://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/docbooksys/segmentedhtml/ch08s03.html -->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<article>
- <articleinfo>
- <title>Your title here</title>
-
- <author>
- <firstname>Your first name</firstname>
- <surname>Your surname</surname>
- <affiliation>
- <address><email>Your e-mail address</email></address>
- </affiliation>
- </author>
-
- <copyright>
- <year>2002</year>
- <holder role="mailto:your e-mail address">Your name</holder>
- </copyright>
-
- <abstract>
- <para>Include an abstract of the article's contents here.</para>
- </abstract>
- </articleinfo>
-
- <sect1><title>Section 1</title>
- <para>
- blah blah blah
- </para>
- </sect1>
-
- <sect1><title>Section 2</title>
- <para>
- Content for verify.groovy
- </para>
- </sect1>
-</article>
diff --git a/src/it/projects/doxia-formats/src/site/twiki/twiki.twiki b/src/it/projects/doxia-formats/src/site/twiki/twiki.twiki
deleted file mode 100644
index 1c9876d3..00000000
--- a/src/it/projects/doxia-formats/src/site/twiki/twiki.twiki
+++ /dev/null
@@ -1,25 +0,0 @@
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
-
----++ Example
-
- * level 1
- * level 2
- * back on 1
- * last bullet
-
-Content for verify.groovy
diff --git a/src/it/projects/doxia-formats/verify.groovy b/src/it/projects/doxia-formats/verify.groovy
index 6b2f273b..6d3a5643 100644
--- a/src/it/projects/doxia-formats/verify.groovy
+++ b/src/it/projects/doxia-formats/verify.groovy
@@ -24,14 +24,11 @@
'index.html',
'velocity-context.html',
'velocity-include-parse.html',
- 'confluence.html',
- 'docbook.html',
'faq-macro.html',
'faq.html',
'markdown-macro.html',
'markdown.html',
'markdown2.html',
- 'twiki.html',
'xdoc.html',
'xdoc-macro.html',
'xhtml.html',
diff --git a/src/it/projects/template-skin/invoker.properties b/src/it/projects/template-skin/invoker.properties
index 245bb47c..d76b4eaa 100644
--- a/src/it/projects/template-skin/invoker.properties
+++ b/src/it/projects/template-skin/invoker.properties
@@ -15,5 +15,5 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals=site:site install
-invoker.goals.2=-Puse-skin site:site
+invoker.goals=install
+invoker.goals.2=site:site
diff --git a/src/it/projects/template-skin/pom.xml b/src/it/projects/template-skin/pom.xml
index bde0432c..25ed717c 100644
--- a/src/it/projects/template-skin/pom.xml
+++ b/src/it/projects/template-skin/pom.xml
@@ -54,28 +54,10 @@ under the License.
<profiles>
<profile>
- <id>use-template</id>
+ <id>use-skin</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <templateFile>${basedir}/src/main/resources/META-INF/maven/site.vm</templateFile>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- <profile>
- <id>use-skin</id>
- <reporting>
- <outputDirectory>${project.build.directory}/site-skin</outputDirectory>
- </reporting>
</profile>
</profiles>
</project>
diff --git a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
index 3fceab25..589470f0 100644
--- a/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
+++ b/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
@@ -85,17 +85,6 @@ public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMo
@Parameter
private Map<String, String> moduleExcludes;
- /**
- * The location of a Velocity template file to use. When used, skins and the default templates, CSS and images
- * are disabled. It is highly recommended that you package this as a skin instead.
- *
- * @since 2.0-beta-5
- * @deprecated Upcoming major Doxia version removes support for template files in favor of skins.
- */
- @Parameter( property = "templateFile" )
- @Deprecated
- private File templateFile;
-
/**
* Additional template properties for rendering the site. See
* <a href="/doxia/doxia-sitetools/doxia-site-renderer/">Doxia Site Renderer</a>.
@@ -302,40 +291,25 @@ public abstract class AbstractSiteRenderingMojo extends AbstractSiteDescriptorMo
}
SiteRenderingContext context;
- if ( templateFile != null )
+ try
{
- getLog().info( buffer().a( "Rendering content with " ).strong( templateFile
- + " template file" ).a( '.' ).toString() );
+ Artifact skinArtifact =
+ siteTool.getSkinArtifactFromRepository( localRepository, repositories, decorationModel );
- if ( !templateFile.exists() )
- {
- throw new MojoFailureException( "Template file '" + templateFile + "' does not exist" );
- }
- context = siteRenderer.createContextForTemplate( templateFile, attributes, decorationModel,
- project.getName(), locale );
+ getLog().info( buffer().a( "Rendering content with " ).strong( skinArtifact.getId()
+ + " skin" ).a( '.' ).toString() );
+
+ context = siteRenderer.createContextForSkin( skinArtifact, attributes, decorationModel,
+ project.getName(), locale );
}
- else
+ catch ( SiteToolException e )
{
- try
- {
- Artifact skinArtifact =
- siteTool.getSkinArtifactFromRepository( localRepository, repositories, decorationModel );
-
- getLog().info( buffer().a( "Rendering content with " ).strong( skinArtifact.getId()
- + " skin" ).a( '.' ).toString() );
-
- context = siteRenderer.createContextForSkin( skinArtifact, attributes, decorationModel,
- project.getName(), locale );
- }
- catch ( SiteToolException e )
- {
- throw new MojoExecutionException( "SiteToolException while preparing skin: " + e.getMessage(), e );
- }
- catch ( RendererException e )
- {
- throw new MojoExecutionException( "RendererException while preparing context for skin: "
- + e.getMessage(), e );
- }
+ throw new MojoExecutionException( "SiteToolException while preparing skin: " + e.getMessage(), e );
+ }
+ catch ( RendererException e )
+ {
+ throw new MojoExecutionException( "RendererException while preparing context for skin: "
+ + e.getMessage(), e );
}
// Generate static site
diff --git a/src/main/java/org/apache/maven/plugins/site/render/CategorySummaryDocumentRenderer.java b/src/main/java/org/apache/maven/plugins/site/render/CategorySummaryDocumentRenderer.java
index e2979f03..9c295a10 100644
--- a/src/main/java/org/apache/maven/plugins/site/render/CategorySummaryDocumentRenderer.java
+++ b/src/main/java/org/apache/maven/plugins/site/render/CategorySummaryDocumentRenderer.java
@@ -32,7 +32,6 @@ import org.apache.maven.doxia.siterenderer.RendererException;
import org.apache.maven.doxia.siterenderer.RenderingContext;
import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
-import org.apache.maven.doxia.tools.MojoLogWrapper;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.reporting.MavenReport;
import org.codehaus.plexus.i18n.I18N;
@@ -82,11 +81,6 @@ public class CategorySummaryDocumentRenderer
{
SiteRendererSink sink = new SiteRendererSink( renderingContext );
- if ( log != null )
- {
- sink.enableLogging( new MojoLogWrapper( log ) );
- }
-
sink.head();
sink.title();
@@ -172,7 +166,7 @@ public class CategorySummaryDocumentRenderer
sink.close();
- renderer.generateDocument( writer, sink, siteRenderingContext );
+ renderer.mergeDocumentIntoSite( writer, sink, siteRenderingContext );
}
public String getOutputName()
diff --git a/src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java b/src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java
index 45cf613f..40cf3ad0 100644
--- a/src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java
+++ b/src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java
@@ -40,7 +40,6 @@ import org.apache.maven.doxia.siterenderer.RendererException;
import org.apache.maven.doxia.siterenderer.RenderingContext;
import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
import org.apache.maven.doxia.siterenderer.sink.SiteRendererSink;
-import org.apache.maven.doxia.tools.MojoLogWrapper;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.reporting.MavenMultiPageReport;
import org.apache.maven.reporting.MavenReport;
@@ -280,8 +279,6 @@ public class ReportDocumentRenderer
for ( MultiPageSubSink mySink : sinks )
{
- mySink.enableLogging( new MojoLogWrapper( log ) );
-
outputName = mySink.getOutputName();
log.debug( " Rendering " + outputName );
diff --git a/src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java b/src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
index 7c698969..012ae187 100644
--- a/src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
+++ b/src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
@@ -177,7 +177,7 @@ public class DoxiaFilter
try
{
Map<String, DocumentRenderer> locateDocuments =
- siteRenderer.locateDocumentFiles( generatedSiteContext );
+ siteRenderer.locateDocumentFiles( generatedSiteContext, false );
if ( locateDocuments.containsKey( path ) )
{
diff --git a/src/site/apt/examples/templatefile.apt.vm b/src/site/apt/examples/templatefile.apt.vm
deleted file mode 100644
index 80d0c890..00000000
--- a/src/site/apt/examples/templatefile.apt.vm
+++ /dev/null
@@ -1,98 +0,0 @@
- ------
- Changing the Template File
- ------
- Vincent Siveton
- <vi...@gmail.com>
- Maria Odea Ching
- ------
- 2009-03-08
- ------
-
- ~~ Licensed to the Apache Software Foundation (ASF) under one
- ~~ or more contributor license agreements. See the NOTICE file
- ~~ distributed with this work for additional information
- ~~ regarding copyright ownership. The ASF licenses this file
- ~~ to you under the Apache License, Version 2.0 (the
- ~~ "License"); you may not use this file except in compliance
- ~~ with the License. You may obtain a copy of the License at
- ~~
- ~~ http://www.apache.org/licenses/LICENSE-2.0
- ~~
- ~~ Unless required by applicable law or agreed to in writing,
- ~~ software distributed under the License is distributed on an
- ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- ~~ KIND, either express or implied. See the License for the
- ~~ specific language governing permissions and limitations
- ~~ under the License.
-
- ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
-
-
-Changing the Template File
-
- 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>
- ...
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>${project.version}</version>
- <configuration>
- <templateFile>${basedir}/maven-site.vm</templateFile>
- </configuration>
- </plugin>
- </plugins>
- </build>
- ...
-</project>
-+-----+
-
- 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>
- <version>2.0-beta-4</version>
- <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 do not want to start from scratch you can start with the
- {{{https://github.com/apache/maven-doxia-sitetools/blob/master/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/}}.
\ No newline at end of file
diff --git a/src/site/site.xml b/src/site/site.xml
index 27e90d52..b6f6533c 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -49,7 +49,6 @@ under the License.
</menu>
<menu name="Site Template">
- <item name="Changing the Template File" href="/examples/templatefile.html"/>
<item name="Creating Skins" href="/examples/creatingskins.html"/>
</menu>