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/05/28 20:36:24 UTC
[maven-site-plugin] 01/01: Replace
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch replace-xhtml-with-xhtml5
in repository https://gitbox.apache.org/repos/asf/maven-site-plugin.git
commit 80e06c38b521e522eb7fb3c951759ec2868bb541
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat May 28 22:36:15 2022 +0200
Replace
---
pom.xml | 9 +---
.../doxia-formats/src/site/xhtml/xhtml-macro.xhtml | 10 ++---
.../doxia-formats/src/site/xhtml/xhtml.xhtml | 2 +-
src/site/apt/examples/creating-content.apt.vm | 8 +---
src/test/projects/site-plugin-test10/maven-site.vm | 48 +++++++++++-----------
.../unit/deploy-dav/target/site/index.html | 22 +++++-----
6 files changed, 45 insertions(+), 54 deletions(-)
diff --git a/pom.xml b/pom.xml
index 8117e7ce..0834e442 100644
--- a/pom.xml
+++ b/pom.xml
@@ -198,8 +198,8 @@ under the License.
<mavenVersion>3.2.5</mavenVersion>
<javaVersion>8</javaVersion>
<!-- for dependencies -->
- <doxiaVersion>2.0.0-M2</doxiaVersion>
- <doxiaSitetoolsVersion>2.0.0-M2</doxiaSitetoolsVersion>
+ <doxiaVersion>2.0.0-M3-SNAPSHOT</doxiaVersion>
+ <doxiaSitetoolsVersion>2.0.0-M3-SNAPSHOT</doxiaSitetoolsVersion>
<jettyVersion>9.4.46.v20220331</jettyVersion>
<wagonVersion>3.5.1</wagonVersion>
<slf4jVersion>1.7.36</slf4jVersion>
@@ -340,11 +340,6 @@ under the License.
<artifactId>doxia-core</artifactId>
<version>${doxiaVersion}</version>
</dependency>
- <dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-module-xhtml</artifactId>
- <version>${doxiaVersion}</version>
- </dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-xhtml5</artifactId>
diff --git a/src/it/projects/doxia-formats/src/site/xhtml/xhtml-macro.xhtml b/src/it/projects/doxia-formats/src/site/xhtml/xhtml-macro.xhtml
index 48c8480c..b6da8c5d 100644
--- a/src/it/projects/doxia-formats/src/site/xhtml/xhtml-macro.xhtml
+++ b/src/it/projects/doxia-formats/src/site/xhtml/xhtml-macro.xhtml
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
@@ -29,17 +29,17 @@ under the License.
<body>
-<h2>Macros in XHTML</h2>
+<h1>Macros in XHTML</h1>
-<h3>TOC Macro</h3>
+<h2>TOC Macro</h2>
<!-- MACRO{toc} -->
-<h3>Echo Macro</h3>
+<h2>Echo Macro</h2>
<!-- MACRO{echo|param1=value1|param2=value2} -->
-<h3>Snippet Macro</h3>
+<h2>Snippet Macro</h2>
<!-- MACRO{snippet|id=macros|file=src/main/java/org/apache/maven/plugins/site/it/CustomVelocityTool.java} -->
diff --git a/src/it/projects/doxia-formats/src/site/xhtml/xhtml.xhtml b/src/it/projects/doxia-formats/src/site/xhtml/xhtml.xhtml
index c2c0131c..b0d84ab3 100644
--- a/src/it/projects/doxia-formats/src/site/xhtml/xhtml.xhtml
+++ b/src/it/projects/doxia-formats/src/site/xhtml/xhtml.xhtml
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
diff --git a/src/site/apt/examples/creating-content.apt.vm b/src/site/apt/examples/creating-content.apt.vm
index 1d6111ad..c95ff397 100644
--- a/src/site/apt/examples/creating-content.apt.vm
+++ b/src/site/apt/examples/creating-content.apt.vm
@@ -55,10 +55,7 @@ Creating Content
| +- other.xml
|
+- xhtml/
- | +- xhtml-too.xhtml
- |
- +- xhtml5/
- | +- xhtml5-content.xhtml5
+ | +- xhtml-content.xhtml
|
+- site.xml
--------------------
@@ -116,8 +113,7 @@ Creating Content
+- general.html
+- faq.html
+- other.html
- +- xhtml-too.html
- +- xhtml5-content.html
+ +- xhtml-content.html
--------------------
This means that <<</src/site/apt/index.apt>>> will be available in the site as
diff --git a/src/test/projects/site-plugin-test10/maven-site.vm b/src/test/projects/site-plugin-test10/maven-site.vm
index acfa1a7d..896c77dd 100644
--- a/src/test/projects/site-plugin-test10/maven-site.vm
+++ b/src/test/projects/site-plugin-test10/maven-site.vm
@@ -5,9 +5,9 @@
## 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
@@ -146,44 +146,44 @@
#macro ( publishDate $position)
#if ( $siteDescriptor.getChild( "publishDate" ) )
-
- #if ( $siteDescriptor.getChild( "publishDate" ).getAttribute( "format" ) )
+
+ #if ( $siteDescriptor.getChild( "publishDate" ).getAttribute( "format" ) )
#set ( $format = $siteDescriptor.getChild( "publishDate" ).getAttribute( "format" ) )
#end
-
+
#if ( $format )
$dateFormat.applyPattern( $format )
#end
- ##$dateFormat.applyPattern( "MM/dd/yyyy" )
- ##end
-
+ ##$dateFormat.applyPattern( "MM/dd/yyyy" )
+ ##end
+
#set ( $dateToday = $dateFormat.format( $currentDate ) )
-
- #set ( $datePosition = $siteDescriptor.getChild( "publishDate" ).getAttribute( "position" ) )
+
+ #set ( $datePosition = $siteDescriptor.getChild( "publishDate" ).getAttribute( "position" ) )
#if ( $datePosition.equalsIgnoreCase( $position ) )
-
+
#if ( $datePosition.equalsIgnoreCase( "right" ) || $datePosition.equalsIgnoreCase( "bottom" ) )
| $i18n.getString( "site-plugin", $locale, "template.lastpublished" ): $dateToday
-
+
#elseif ( $datePosition.equalsIgnoreCase( "navigation-bottom" ) || $datePosition.equalsIgnoreCase( "navigation-top" ) )
<div id="lastPublished">$i18n.getString( "site-plugin", $locale, "template.lastpublished" ): $dateToday</div>
-
+
#elseif ( $datePosition.equalsIgnoreCase("left") )
<div class="xleft">
- $i18n.getString( "site-plugin", $locale, "template.lastpublished" ): $dateToday | Doc for
+ $i18n.getString( "site-plugin", $locale, "template.lastpublished" ): $dateToday | Doc for
#if ( $siteDescriptor.getChild( "version" ))
$siteDescriptor.getChild( "version" ).getValue()
#else
${project.version}
#end
</div>
- #end
+ #end
#end
- #end
+ #end
#end
#macro ( poweredByLogo )
-
+
#if( $siteDescriptor.getChild( "powered-by" ) )
#foreach ($item in $siteDescriptor.getChild( "powered-by" ).getChildren() )
#if( $item.getAttribute( "href" ) )
@@ -191,20 +191,20 @@
#else
#set ( $href="http://maven.apache.org/" )
#end
-
+
#if( $item.getAttribute( "name" ) )
#set ( $name = $item.getAttribute( "name" ) )
#else
#set ( $name = $i18n.getString( "site-plugin", $locale, "template.builtby" ) )
#set ( $name = "${name} Maven" )
- #end
-
+ #end
+
#if( $item.getAttribute( "img" ) )
#set ( $img = $item.getAttribute( "img" ) )
#else
#set ( $img = "maven-feather.png" )
- #end
-
+ #end
+
<a href="$href" title="$name" id="poweredBy">
<img alt="$name" src="$relativePath/images/logos/$img"></img>
</a>
@@ -222,7 +222,7 @@
#end
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<html>
<head>
<title>$title</title>
@@ -261,7 +261,7 @@
</div>
<div id="leftColumn">
<div id="navcolumn">
- #publishDate( "navigation-top" )
+ #publishDate( "navigation-top" )
#mainMenu()
#poweredByLogo()
#publishDate( "navigation-bottom" )
diff --git a/src/test/resources/unit/deploy-dav/target/site/index.html b/src/test/resources/unit/deploy-dav/target/site/index.html
index f42bdc41..c3f387ab 100644
--- a/src/test/resources/unit/deploy-dav/target/site/index.html
+++ b/src/test/resources/unit/deploy-dav/target/site/index.html
@@ -1,8 +1,8 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<!-- Generated by Apache Maven Doxia at Aug 7, 2010 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>Maven -
+ <title>Maven -
Welcome to Apache Maven</title>
<style type="text/css" media="all">
@import url("./css/maven-base.css");
@@ -14,9 +14,9 @@
<meta name="author" content="Jason van Zyl" />
<meta name="Date-Revision-yyyymmdd" content="20100807" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
+
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
-
+
<script type="text/javascript">_uacct = "UA-140879-1";
urchinTracker();</script>
</head>
@@ -33,13 +33,13 @@
</div>
</div>
<div id="breadcrumbs">
-
+
<div class="xleft">
<a href="http://www.apache.org/" class="externalLink">Apache</a>
>
Maven
</div>
- <div class="xright">
+ <div class="xright">
Last Published: 2010-08-07
</div>
<div class="clear">
@@ -48,7 +48,7 @@
</div>
<div id="leftColumn">
<div id="navcolumn">
-
+
<h5>Main</h5>
<ul>
<li class="none">
@@ -199,7 +199,7 @@
<a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
<img alt="Built by Maven" src="./images/logos/maven-feather.png"/>
</a>
-
+
</div>
</div>
<div id="bodyColumn">
@@ -220,7 +220,7 @@ software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. -->
-
+
<!-- TODO: news? -->
<div class="section"><h2></h2> <!-- valid xdoc needs at least a section -->
@@ -422,7 +422,7 @@ under the License. -->
foundation, see the <a class="externalLink" href="http://www.apache.org/foundation/sponsorship.html">sponsorship</a> page.
</p>
</div></div>
-
+
</div>
</div>
@@ -432,7 +432,7 @@ under the License. -->
<div id="footer">
<div class="xright">© 2002-2010
The Apache Software Foundation
-
+
- <a href="http://maven.apache.org/privacy-policy.html">Privacy Policy</a></div>
<div class="clear">
<hr/>