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 2023/02/12 18:19:25 UTC

[maven-fluido-skin] 01/01: [MSKINS-101] Remove decorationModel/custom/publishDate from skin-macros.vm

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSKINS-101
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git

commit f18b1d5bc29d47db8fd83ac2cdfb729b41a9832c
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue Jan 17 22:50:14 2023 +0100

    [MSKINS-101] Remove decorationModel/custom/publishDate from skin-macros.vm
    
    This closes #45
---
 src/it/mskins-17/pom.xml                         |  3 +
 src/it/mskins-17/src/site/apt/index.apt.vm       | 72 +++++++++----------
 src/it/mskins-17/src/site/site.xml               | 90 +++++++++++-------------
 src/it/mskins-17/verify.groovy                   |  2 +-
 src/main/resources/META-INF/maven/site-macros.vm |  2 -
 5 files changed, 82 insertions(+), 87 deletions(-)

diff --git a/src/it/mskins-17/pom.xml b/src/it/mskins-17/pom.xml
index 1015014..b3b4547 100644
--- a/src/it/mskins-17/pom.xml
+++ b/src/it/mskins-17/pom.xml
@@ -37,6 +37,9 @@
     <skinGroupId>@project.groupId@</skinGroupId>
     <skinArtifactId>@project.artifactId@</skinArtifactId>
     <skinVersion>@project.version@</skinVersion>
+    <!-- START SNIPPET: skin-custom-config -->
+    <project.build.outputTimestamp>1990-01-01T00:00:00Z</project.build.outputTimestamp>
+    <!-- END SNIPPET: skin-custom-config -->
   </properties>
 
   <build>
diff --git a/src/it/mskins-17/src/site/apt/index.apt.vm b/src/it/mskins-17/src/site/apt/index.apt.vm
index d623b71..f6d50d5 100644
--- a/src/it/mskins-17/src/site/apt/index.apt.vm
+++ b/src/it/mskins-17/src/site/apt/index.apt.vm
@@ -1,36 +1,36 @@
- ------
- ${project.name}
- ------
- Hervé Boutemy
- ------
- 2011-10-15
- ------
-
-~~ 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
-
-${project.name}
-
- This is a test for ${skinName} with sidebar enabled and Google Search.
- ${skinDescription}
-
-* Actual configuration
-
-%{snippet|id=skin-custom-config|file=${project.basedir}/src/site/site.xml}
+ ------
+ ${project.name}
+ ------
+ Hervé Boutemy
+ ------
+ 2011-10-15
+ ------
+
+~~ 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
+
+${project.name}
+
+ This is a test for ${skinName} with sidebar enabled and Google Search.
+ ${skinDescription}
+
+* Actual configuration
+
+%{snippet|id=skin-custom-config|file=${project.basedir}/pom.xml}
diff --git a/src/it/mskins-17/src/site/site.xml b/src/it/mskins-17/src/site/site.xml
index 1554f07..d3c994f 100644
--- a/src/it/mskins-17/src/site/site.xml
+++ b/src/it/mskins-17/src/site/site.xml
@@ -1,48 +1,42 @@
-<?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.
- */
- -->
-
-<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
-  name="${skinName}">
-
-  <skin>
-    <groupId>${skinGroupId}</groupId>
-    <artifactId>${skinArtifactId}</artifactId>
-    <version>${skinVersion}</version>
-  </skin>
-
-  <!-- START SNIPPET: skin-custom-config -->
-  <custom>
-    <publishDate>1970-01-01</publishDate>
-  </custom>
-  <!-- END SNIPPET: skin-custom-config -->
-
-  <publishDate format="yyyy-MM-dd" position="right" />
-
-  <body>
-    <breadcrumbs>
-      <item name="Apache Maven Fluido Skin"  href="https://maven.apache.org/skins/maven-fluido-skin/index.html" />
-      <item name="Maven Fluido Skin ITs"  href="https://maven.apache.org/skins/maven-fluido-skin/ITs.html" />
-    </breadcrumbs>
-  </body>
-</project>
\ No newline at end of file
+<?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.
+ */
+ -->
+
+<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
+  name="${skinName}">
+
+  <skin>
+    <groupId>${skinGroupId}</groupId>
+    <artifactId>${skinArtifactId}</artifactId>
+    <version>${skinVersion}</version>
+  </skin>
+
+  <publishDate format="yyyy-MM-dd" position="right" />
+
+  <body>
+    <breadcrumbs>
+      <item name="Apache Maven Fluido Skin"  href="https://maven.apache.org/skins/maven-fluido-skin/index.html" />
+      <item name="Maven Fluido Skin ITs"  href="https://maven.apache.org/skins/maven-fluido-skin/ITs.html" />
+    </breadcrumbs>
+  </body>
+</project>
diff --git a/src/it/mskins-17/verify.groovy b/src/it/mskins-17/verify.groovy
index 865757c..0c1c84a 100644
--- a/src/it/mskins-17/verify.groovy
+++ b/src/it/mskins-17/verify.groovy
@@ -19,4 +19,4 @@
 
 File index = new File( basedir, "target/site/index.html" )
 assert index.exists()
-assert index.text.contains( '<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 1970-01-01</li>' )
\ No newline at end of file
+assert index.text.contains( '<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 1990-01-01</li>' )
diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index 3cdf879..3ed06f6 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -410,8 +410,6 @@ $indent     </ul>##
 #macro ( publishDate $position $decorationPublishDate $version )
 #**##if ( $publishDate )
 #*  *##set ( $dateValue = $date.format( $publishDate ) )
-#**##elseif ( $decoration.custom.getChild( 'publishDate' ) )
-#*  *##set ( $dateValue = $decoration.custom.getChild( 'publishDate' ).getValue() )
 #**##else
 #*  *##set ( $dateValue = $date )
 #**##end