From cdd32b5d5936f8ddb3957524f392d031c4de9d09 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Fri, 6 Dec 2024 21:38:39 +0100 Subject: [PATCH] Download page template --- docs/pom.xml | 19 +++++ docs/src/site/xdoc/download.xml.vm | 75 ------------------- maven-shared-doc-resource/pom.xml | 51 +++++++++++++ .../main/resources/markdown/download.md.vm | 54 +++++++++++++ .../main/resources}/resources/download.cgi | 0 pom.xml | 23 +++++- 6 files changed, 146 insertions(+), 76 deletions(-) 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 rename {docs/src/site => maven-shared-doc-resource/src/main/resources}/resources/download.cgi (100%) diff --git a/docs/pom.xml b/docs/pom.xml index 06b8dac2..54d31205 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -70,8 +70,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/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..75a7b5ec --- /dev/null +++ b/maven-shared-doc-resource/pom.xml @@ -0,0 +1,51 @@ + + + + 4.0.0 + + org.apache.maven + maven-parent + 44-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..718f81d0 --- /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](\[preferred\]maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip) |[${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}/)\. \ No newline at end of file diff --git a/docs/src/site/resources/download.cgi b/maven-shared-doc-resource/src/main/resources/resources/download.cgi similarity index 100% rename from docs/src/site/resources/download.cgi rename to maven-shared-doc-resource/src/main/resources/resources/download.cgi diff --git a/pom.xml b/pom.xml index 01e4aefb..4566ca8d 100644 --- a/pom.xml +++ b/pom.xml @@ -914,6 +914,7 @@ under the License. maven-skins doxia-tools docs + maven-shared-doc-resource @@ -958,8 +959,9 @@ under the License. 3.0.1 5.11.3 - 1.12.0 + 2.0.0 6 + 3.21.0 2024-07-04T20:44:45Z @@ -1230,6 +1232,25 @@ under the License.
+ + org.apache.maven.plugins + maven-remote-resources-plugin + + + site-download + + process + + none + + + org.apache.maven:maven-shared-doc-resource:44-SNAPSHOT + + ${project.build.directory}/generated-site + + + +