kwin commented on code in PR #218: URL: https://github.com/apache/maven-parent/pull/218#discussion_r1874391198
########## maven-shared-doc-resource/pom.xml: ########## @@ -0,0 +1,51 @@ +<?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/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.maven</groupId> + <artifactId>maven-parent</artifactId> + <version>44-SNAPSHOT</version> + </parent> + + <artifactId>maven-shared-doc-resource</artifactId> Review Comment: I would rather name this maven-shared-site-resource as the files in it are pretty maven-site specific. `doc` seems to generic for these files. ########## 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 ) Review Comment: we need some documentation of the properties used by this template. ########## maven-shared-doc-resource/src/main/resources/resources/download.cgi: ########## Review Comment: we don't need this as this is globally setup: https://github.com/apache/infrastructure-p6/blob/1bd0e53353181cf46865b5ec8f5e4fa16541ce7e/modules/closer_cgi/files/closer-cgi.conf#L6C1-L6C12 ########## 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://www.apache.org/dist/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://www.apache.org/dist/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.sha512)|[${downloadArtifactId}\-${project.version}\-source\-release\.zip\.asc](https://www.apache.org/dist/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.asc)| Review Comment: Let us use the new download location for checksum and signature: downloads.a.o instead of www.a.o/dist. ########## 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://www.apache.org/dist/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://www.apache.org/dist/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.sha512)|[${downloadArtifactId}\-${project.version}\-source\-release\.zip\.asc](https://www.apache.org/dist/maven/${downloadDirectory}/${downloadArtifactId}-${project.version}-source-release.zip.asc)| Review Comment: the placeholder `[preferred]` is actually replaced by a URL ending with slash (despite incorrect documentation at https://infra.apache.org/release-download-pages.html#custom), so it must not be followed by a slash. ########## docs/pom.xml: ########## @@ -70,8 +70,27 @@ under the License. <!-- modules with documentation not need to install and deploy --> <maven.install.skip>true</maven.install.skip> <maven.deploy.skip>true</maven.deploy.skip> + + <downloadDirectory>pom</downloadDirectory> + <downloadArtifactId>maven-parent</downloadArtifactId> </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-remote-resources-plugin</artifactId> + <executions> + <execution> + <id>site-download</id> + <phase>pre-site</phase> + <inherited>false</inherited> Review Comment: I don't think anyone inherits from the site-pom anyways.... ########## pom.xml: ########## @@ -1230,6 +1232,25 @@ under the License. </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-remote-resources-plugin</artifactId> + <executions> + <execution> + <id>site-download</id> + <goals> + <goal>process</goal> + </goals> + <phase>none</phase> Review Comment: I would rather bind this to `pre-site` ########## docs/pom.xml: ########## @@ -70,8 +70,27 @@ under the License. <!-- modules with documentation not need to install and deploy --> <maven.install.skip>true</maven.install.skip> <maven.deploy.skip>true</maven.deploy.skip> + + <downloadDirectory>pom</downloadDirectory> + <downloadArtifactId>maven-parent</downloadArtifactId> </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-remote-resources-plugin</artifactId> + <executions> + <execution> + <id>site-download</id> + <phase>pre-site</phase> Review Comment: instead of putting this config into each pom leveraging the templates, I would rather set https://maven.apache.org/plugins/maven-remote-resources-plugin/process-mojo.html#skip based on the values of `downloadDirectory`/`downloadArtifact` in the main parent pom. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org