Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the most of we have a download page in project root pom, properties will also available in childs ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, one possible way is to set the properties only for the current pom, but not if used as parent (https://github.com/apache/maven-apache-parent/blob/061e19af986a914df4d37b14e7e53a079d9033c5/pom.xml#L486)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be more complicated ... we will need a mark file in all project

<inherited>false</inherited>
</execution>
</executions>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
Expand Down
22 changes: 0 additions & 22 deletions docs/src/site/resources/download.cgi

This file was deleted.

75 changes: 0 additions & 75 deletions docs/src/site/xdoc/download.xml.vm

This file was deleted.

51 changes: 51 additions & 0 deletions maven-shared-doc-resource/pom.xml
Original file line number Diff line number Diff line change
@@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still is a question - should such template be placed in this project or some other?


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<configuration>
<includes>
<include>**/*.vm</include>
<include>**/*.cgi</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need some documentation of the properties used by this template.

Copy link
Member Author

@slawekjaranowski slawekjaranowski Dec 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when we make decision where we should put it we will add a documentation

#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}/).
23 changes: 22 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ under the License.
<module>maven-skins</module>
<module>doxia-tools</module>
<module>docs</module>
<module>maven-shared-doc-resource</module>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to work on MSITE-911 in the near future, so this doesn't need to be maintained outside the parent project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My approach to put it in external repo are:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @slawekjaranowski

The Commons Build and Release plugins are not deprecated and generates a lot more than just one page. I use them for all Commons releases.

What I'm more interested in getting rid of is the commons-skin plug-in but I don't know if it's possible to fold it in commons-parent directly.

It would be nice to merge the Build and Release plugin but I never took the time to do it.

Ideally, I'd prefer to have all three current plug-ins in commons-parent, so I have 1 framework-y thing to deal with instead of 4.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that Build and Release plugins are not deprecated but use deprecated ant mojo

</modules>

<scm>
Expand Down Expand Up @@ -958,8 +959,9 @@ under the License.
<!-- DO NOT UPGRADE to 4: incompatible with Maven 3 -->
<version.plexus-xml>3.0.1</version.plexus-xml>
<versions.junit5>5.11.3</versions.junit5>
<version.maven-fluido-skin>1.12.0</version.maven-fluido-skin>
<version.maven-fluido-skin>2.0.0</version.maven-fluido-skin>
<version.maven-shared-resources>6</version.maven-shared-resources>
<version.maven-site-plugin>3.21.0</version.maven-site-plugin>
<project.build.outputTimestamp>2024-07-04T20:44:45Z</project.build.outputTimestamp>
</properties>

Expand Down Expand Up @@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather bind this to pre-site

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to inheritance we can put here pre-site

<configuration>
<resourceBundles>
<bundle>org.apache.maven:maven-shared-doc-resource:44-SNAPSHOT</bundle>
</resourceBundles>
<outputDirectory>${project.build.directory}/generated-site</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>

Expand Down
Loading