From 3044f909329ed345251a64b95be753a661552249 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Fri, 6 Dec 2024 21:38:39 +0100 Subject: [PATCH 1/2] Download page template --- docs/pom.xml | 19 +++++ docs/src/site/resources/download.cgi | 22 ------ docs/src/site/xdoc/download.xml.vm | 75 ------------------- maven-shared-doc-resource/pom.xml | 51 +++++++++++++ .../main/resources/markdown/download.md.vm | 54 +++++++++++++ pom.xml | 20 +++++ 6 files changed, 144 insertions(+), 97 deletions(-) delete mode 100644 docs/src/site/resources/download.cgi delete mode 100644 docs/src/site/xdoc/download.xml.vm create mode 100644 maven-shared-doc-resource/pom.xml create mode 100644 maven-shared-doc-resource/src/main/resources/markdown/download.md.vm diff --git a/docs/pom.xml b/docs/pom.xml index 3923b920..b37e4c62 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -69,8 +69,27 @@ under the License. true true + + pom + maven-parent + + + + org.apache.maven.plugins + maven-remote-resources-plugin + + + site-download + pre-site + false + + + + + + diff --git a/docs/src/site/resources/download.cgi b/docs/src/site/resources/download.cgi deleted file mode 100644 index 1b178d2e..00000000 --- a/docs/src/site/resources/download.cgi +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# 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. -# -# Just call the standard mirrors.cgi script. It will use download.html -# as the input template. -exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* \ No newline at end of file diff --git a/docs/src/site/xdoc/download.xml.vm b/docs/src/site/xdoc/download.xml.vm deleted file mode 100644 index fc564f17..00000000 --- a/docs/src/site/xdoc/download.xml.vm +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Download ${project.name} Source - - - -
- -

${project.name} ${project.version} is distributed in source format.

- -

Use a source archive if you intend to build ${project.name} yourself.

- -

Otherwise, simply use the ready-made binary artifacts from central repository.

- -

${project.name} is distributed under the Apache License, version 2.0.

- - - -

This is the current stable version of ${project.name}.

- - - - - - - - - - - - - - - - - - -
LinkChecksumSignature
${project.name} ${project.version} (Source zip)maven-parent-${project.version}-source-release.zipmaven-parent-${project.version}-source-release.zip.sha512maven-parent-${project.version}-source-release.zip.asc
- -

It is essential that you verify the integrity of the downloaded file - using the checksum (.sha512 file) - or using the signature (.asc file) against the public KEYS used by the Apache Maven developers. -

- -
- - -

It is strongly recommended to use the latest release version of ${project.name} to take advantage of the newest features and bug fixes.

-

Older non-recommended releases can be found on our archive site.

-
-
- -
- diff --git a/maven-shared-doc-resource/pom.xml b/maven-shared-doc-resource/pom.xml new file mode 100644 index 00000000..90d91e79 --- /dev/null +++ b/maven-shared-doc-resource/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.maven + maven-parent + 50-SNAPSHOT + + + maven-shared-doc-resource + + + + + org.apache.maven.plugins + maven-remote-resources-plugin + + + **/*.vm + **/*.cgi + + + + + + bundle + + + + + + + diff --git a/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm b/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm new file mode 100644 index 00000000..8c8ff471 --- /dev/null +++ b/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm @@ -0,0 +1,54 @@ +--- +title: Download ${project.name} Source +--- +#* +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. +*# +#set( $h = "#" ) +#set( $downloadDirectory = $project.properties.downloadDirectory ) +#if( ! $downloadDirectory ) +#set( $downloadDirectory = "plugins" ) +#end +#set( $downloadArtifactId = $project.properties.downloadArtifactId ) +#if( ! $downloadArtifactId ) +#set( $downloadArtifactId = $project.artifactId ) +#end + +# Download ${project.name} ${project.version} Source + +${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build +${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository. + +In order to guard against corrupted downloads/installations, it is highly recommended to +[verify the signature](https://www.apache.org/dev/release-signing#verifying-signature) +of the release bundles against the public [KEYS](https://downloads.apache.org/maven/KEYS) used by the Apache Maven +developers. + +${project.name} is distributed under the [Apache License, version 2.0](https://www.apache.org/licenses/). + +${h}${h} ${project.name} ${project.version} + +This is the current stable version of ${project.name}. + +| | Link |Checksum|Signature| +|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|---| +${project.name} ${project.version} (Source zip)| [${downloadArtifactId}-${project.version}-source-release.zip](https://www.apache.org/dyn/closer.lua/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip?action=download) |[${downloadArtifactId}-${project.version}-source-release.zip.sha512](https://downloads.apache.org/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.sha512)|[${downloadArtifactId}-${project.version}-source-release.zip.asc](https://downloads.apache.org/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.asc)| + +${h}${h} Previous Versions + +Older non-recommended releases can be found on our [archive site](https://archive.apache.org/dist/maven/${downloadDirectory}/). diff --git a/pom.xml b/pom.xml index 1ca26e38..5b9b0c53 100644 --- a/pom.xml +++ b/pom.xml @@ -940,6 +940,7 @@ under the License. maven-shared-components maven-skins docs + maven-shared-doc-resource @@ -1309,6 +1310,25 @@ under the License.
+ + org.apache.maven.plugins + maven-remote-resources-plugin + + + site-download + + process + + none + + + org.apache.maven:maven-shared-doc-resource:${project.version} + + ${project.build.directory}/generated-site + + + +
From 449973202498f877b1a16a8b6ddff3862eb7492f Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Mon, 10 Aug 2026 22:13:05 +0200 Subject: [PATCH 2/2] Align the download template with the page it replaces The template rendered a version-numbered "#Apache_Maven_Parent_POM_50-SNAPSHOT" anchor and no "#Files". Every component already on the refreshed page publishes "#Files", and a version-numbered anchor changes on each release, so keep the heading literal. The dlcdn host is deliberate (MNGSITE-505): the mirror network was retired, so do not restore closer.lua or the [preferred] placeholder. Verified: rendered docs/ site against the xdoc page from apache/maven-parent#593 -> anchors, download hrefs and visible text all identical. Generated-by: Claude Opus 5 --- .../main/resources/markdown/download.md.vm | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm b/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm index 8c8ff471..60915683 100644 --- a/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm +++ b/maven-shared-doc-resource/src/main/resources/markdown/download.md.vm @@ -28,27 +28,32 @@ under the License. #if( ! $downloadArtifactId ) #set( $downloadArtifactId = $project.artifactId ) #end +#set( $sourceRelease = "${downloadArtifactId}-${project.version}-source-release.zip" ) # Download ${project.name} ${project.version} Source -${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build -${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository. +**${project.name} ${project.version}** is distributed in source format. -In order to guard against corrupted downloads/installations, it is highly recommended to -[verify the signature](https://www.apache.org/dev/release-signing#verifying-signature) -of the release bundles against the public [KEYS](https://downloads.apache.org/maven/KEYS) used by the Apache Maven -developers. +Use a source archive if you intend to build **${project.name}** yourself. -${project.name} is distributed under the [Apache License, version 2.0](https://www.apache.org/licenses/). +Otherwise, simply use the ready-made binary artifacts from **central repository**. -${h}${h} ${project.name} ${project.version} +**${project.name}** is distributed under the [Apache License, version 2.0](https://www.apache.org/licenses/). -This is the current stable version of ${project.name}. +${h}${h} Files -| | Link |Checksum|Signature| -|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|---| -${project.name} ${project.version} (Source zip)| [${downloadArtifactId}-${project.version}-source-release.zip](https://www.apache.org/dyn/closer.lua/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip?action=download) |[${downloadArtifactId}-${project.version}-source-release.zip.sha512](https://downloads.apache.org/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.sha512)|[${downloadArtifactId}-${project.version}-source-release.zip.asc](https://downloads.apache.org/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.asc)| +This is the current stable version of **${project.name}**. + +| | Link | Checksum | Signature | +|---|---|---|---| +| ${project.name} ${project.version} (Source zip) | [${sourceRelease}](https://dlcdn.apache.org/maven/${downloadDirectory}/${sourceRelease}) | [${sourceRelease}.sha512](https://downloads.apache.org/maven/${downloadDirectory}/${sourceRelease}.sha512) | [${sourceRelease}.asc](https://downloads.apache.org/maven/${downloadDirectory}/${sourceRelease}.asc) | + +It is essential that you [verify the integrity](https://www.apache.org/info/verification.html) of the downloaded file +using the checksum (.sha512 file) +or using the signature (.asc file) against the public [KEYS](https://downloads.apache.org/maven/KEYS) used by the Apache Maven developers. ${h}${h} Previous Versions +It is strongly recommended to use the latest release version of **${project.name}** to take advantage of the newest features and bug fixes. + Older non-recommended releases can be found on our [archive site](https://archive.apache.org/dist/maven/${downloadDirectory}/).