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 d121d431ee1dc20dea98d643be004e61c362d4f5 Author: Michael Osipov <micha...@apache.org> AuthorDate: Tue Jan 17 22:50:14 2023 +0100 [MSKINS-101] Remove decorationModel/custom/publishDate from skin-macros.vm --- pom.xml | 2 +- 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 - 6 files changed, 83 insertions(+), 88 deletions(-) diff --git a/pom.xml b/pom.xml index 9671823..842ded6 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ under the License. <properties> <bootstrap.version>2.3.2</bootstrap.version> <jquery.version>1.11.2</jquery.version> - <sitePluginVersion>4.0.0-M4</sitePluginVersion> + <sitePluginVersion>4.0.0-M5-SNAPSHOT</sitePluginVersion> <projectInfoReportsPluginVersion>3.4.1</projectInfoReportsPluginVersion> <project.build.outputTimestamp>2023-01-12T16:00:06Z</project.build.outputTimestamp> <anchorjs.version>4.2.2</anchorjs.version> 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 0a99140..0061485 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 1 == index.getText().count( '<li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 1970-01-01</li>' ) \ No newline at end of file +assert 1 == index.getText().count( '<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