You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/04/03 11:39:13 UTC
[commons-build-plugin] branch master updated: Add property commons.dist.subdir.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-build-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 848b1b4 Add property commons.dist.subdir.
848b1b4 is described below
commit 848b1b4f14ada05175a7ad9c5bb35f797c807aec
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Apr 3 07:39:11 2022 -0400
Add property commons.dist.subdir.
---
src/changes/changes.xml | 5 +++++
.../commons-xdoc-templates/download-page-body.xml | 24 +++++++++++-----------
.../commons-xdoc-templates/download-page-foot.xml | 4 ++--
src/main/scripts/generate-xdocs.build.xml | 23 +++++++++++++++++++++
src/main/scripts/generate-xdocs.mojos.xml | 9 ++++++++
5 files changed, 51 insertions(+), 14 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8f4b886..c11779d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -26,6 +26,11 @@
<body>
<release version="1.13" date="20YY-MM-DD" description="Feature release">
+ <!-- ADD -->
+ <action dev="ggregory" type="update" due-to="Dependabot">
+ Add property commons.dist.subdir.
+ </action>
+ <!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Dependabot">
Bump maven-antrun-plugin from 1.8 to 3.0.0, #18.
</action>
diff --git a/src/main/resources/commons-xdoc-templates/download-page-body.xml b/src/main/resources/commons-xdoc-templates/download-page-body.xml
index b8736c3..c3bd368 100644
--- a/src/main/resources/commons-xdoc-templates/download-page-body.xml
+++ b/src/main/resources/commons-xdoc-templates/download-page-body.xml
@@ -2,28 +2,28 @@
<subsection name="Binaries">
<table>
<tr>
- <td><a href="[preferred]/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz">@FINAL_NAME@@BINARY-SUFFIX@.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.@HASHLC@">@HASHLC@</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz">@FINAL_NAME@@BINARY-SUFFIX@.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.@HASHLC@">@HASHLC@</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip">@FINAL_NAME@@BINARY-SUFFIX@.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip.@HASHLC@">@HASHLC@</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip">@FINAL_NAME@@BINARY-SUFFIX@.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip.@HASHLC@">@HASHLC@</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
<subsection name="Source">
<table>
<tr>
- <td><a href="[preferred]/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.tar.gz">@FINAL_NAME@-src.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.tar.gz.@HASHLC@">@HASHLC@</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.tar.gz.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.tar.gz">@FINAL_NAME@-src.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.tar.gz.@HASHLC@">@HASHLC@</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.tar.gz.asc">pgp</a></td>
</tr>
<tr>
- <td><a href="[preferred]/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.zip">@FINAL_NAME@-src.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.zip.@HASHLC@">@HASHLC@</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.zip.asc">pgp</a></td>
+ <td><a href="[preferred]/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.zip">@FINAL_NAME@-src.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.zip.@HASHLC@">@HASHLC@</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@DISTDIR@/@SRCDIR@/@FINAL_NAME@-src.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
diff --git a/src/main/resources/commons-xdoc-templates/download-page-foot.xml b/src/main/resources/commons-xdoc-templates/download-page-foot.xml
index 48cb029..9e37140 100644
--- a/src/main/resources/commons-xdoc-templates/download-page-foot.xml
+++ b/src/main/resources/commons-xdoc-templates/download-page-foot.xml
@@ -3,8 +3,8 @@
Older releases can be obtained from the archives.
</p>
<ul>
- <li class="download"><a href="[preferred]/commons/@ID@/">browse download area</a></li>
- <li><a href="https://archive.apache.org/dist/commons/@ID@/">archives...</a></li>
+ <li class="download"><a href="[preferred]/commons/@DISTDIR@/">browse download area</a></li>
+ <li><a href="https://archive.apache.org/dist/commons/@DISTDIR@/">archives...</a></li>
</ul>
</section>
</body>
diff --git a/src/main/scripts/generate-xdocs.build.xml b/src/main/scripts/generate-xdocs.build.xml
index 9761d6a..1bc9478 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -155,6 +155,7 @@
<echo level="${level}" message="----- commons-build:download-page - Parameters - START -----" />
<echo level="${level}" message="project.name : ${project.name}" />
<echo level="${level}" message="commons.componentid : ${commons.componentid}" />
+ <echo level="${level}" message="commons.dist.subdir : ${commons.dist.subdir}" />
<!-- Current release -->
<echo level="${level}" message="commons.release.version : ${commons.release.version}" />
<echo level="${level}" message="commons.release.name : ${commons.release.name}" />
@@ -233,6 +234,9 @@
<echo level="info" message="*** loading download-page body(1) file***" />
<!-- Set up the defaults -->
+ <condition property="DISTDIR" value="${commons.dist.subdir}" else="${commons.componentid}">
+ <isset property="commons.dist.subdir" />
+ </condition>
<condition property="BINDIR" value="${commons.release.subdir}" else="binaries">
<isset property="commons.release.subdir" />
</condition>
@@ -255,6 +259,7 @@
<token key="ID" value="${commons.componentid}" />
<token key="FINAL_NAME" value="${commons.release.name}" />
<token key="BINARY-SUFFIX" value="${commons.binary.suffix}" />
+ <token key="DISTDIR" value="${DISTDIR}" />
<token key="BINDIR" value="${BINDIR}" />
<token key="SRCDIR" value="${SRCDIR}" />
<token key="HASHLC" value="${HASHLC}" />
@@ -269,6 +274,9 @@
<echo level="info" message="*** loading download-page body(2) file***" />
<!-- Set up the defaults -->
+ <condition property="DISTDIR" value="${commons.dist.subdir}" else="${commons.componentid}">
+ <isset property="commons.dist.subdir" />
+ </condition>
<condition property="BINDIR" value="${commons.release.2.subdir}" else="binaries">
<isset property="commons.release.2.subdir" />
</condition>
@@ -291,6 +299,7 @@
<token key="ID" value="${commons.componentid}" />
<token key="FINAL_NAME" value="${commons.release.2.name}" />
<token key="BINARY-SUFFIX" value="${commons.release.2.binary.suffix}" />
+ <token key="DISTDIR" value="${DISTDIR}" />
<token key="BINDIR" value="${BINDIR}" />
<token key="SRCDIR" value="${SRCDIR}" />
<token key="HASHLC" value="${HASHLC}" />
@@ -305,6 +314,9 @@
<echo level="info" message="*** loading download-page body(3) file***" />
<!-- Set up the defaults -->
+ <condition property="DISTDIR" value="${commons.dist.subdir}" else="${commons.componentid}">
+ <isset property="commons.dist.subdir" />
+ </condition>
<condition property="BINDIR" value="${commons.release.3.subdir}" else="binaries">
<isset property="commons.release.3.subdir" />
</condition>
@@ -327,6 +339,7 @@
<token key="ID" value="${commons.componentid}" />
<token key="FINAL_NAME" value="${commons.release.3.name}" />
<token key="BINARY-SUFFIX" value="${commons.release.3.binary.suffix}" />
+ <token key="DISTDIR" value="${DISTDIR}" />
<token key="BINDIR" value="${BINDIR}" />
<token key="SRCDIR" value="${SRCDIR}" />
<token key="HASHLC" value="${HASHLC}" />
@@ -341,6 +354,9 @@
<echo level="info" message="*** loading download-page body(4) file***" />
<!-- Set up the defaults -->
+ <condition property="DISTDIR" value="${commons.dist.subdir}" else="${commons.componentid}">
+ <isset property="commons.dist.subdir" />
+ </condition>
<condition property="BINDIR" value="${commons.release.4.subdir}" else="binaries">
<isset property="commons.release.4.subdir" />
</condition>
@@ -363,6 +379,7 @@
<token key="ID" value="${commons.componentid}" />
<token key="FINAL_NAME" value="${commons.release.4.name}" />
<token key="BINARY-SUFFIX" value="${commons.release.4.binary.suffix}" />
+ <token key="DISTDIR" value="${DISTDIR}" />
<token key="BINDIR" value="${BINDIR}" />
<token key="SRCDIR" value="${SRCDIR}" />
<token key="HASHLC" value="${HASHLC}" />
@@ -376,12 +393,18 @@
<target name="load-download-page-foot" if="commons.release.version">
<echo level="info" message="*** loading download-page footer files ***" />
+ <!-- Set up the defaults -->
+ <condition property="DISTDIR" value="${commons.dist.subdir}" else="${commons.componentid}">
+ <isset property="commons.dist.subdir" />
+ </condition>
+
<!-- Load Footer -->
<loadresource property="download-page-foot-xml">
<javaresource name="${commonsMojoXdocDir}/download-page-foot.xml" />
<filterchain>
<replacetokens>
<token key="ID" value="${commons.componentid}" />
+ <token key="DISTDIR" value="${DISTDIR}" />
</replacetokens>
</filterchain>
</loadresource>
diff --git a/src/main/scripts/generate-xdocs.mojos.xml b/src/main/scripts/generate-xdocs.mojos.xml
index 40bfce7..ac1c7a2 100644
--- a/src/main/scripts/generate-xdocs.mojos.xml
+++ b/src/main/scripts/generate-xdocs.mojos.xml
@@ -92,6 +92,15 @@
<description>The commons component id.</description>
</parameter>
<parameter>
+ <name>commons.dist.subdir</name>
+ <property>commons.dist.subdir</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.dist.subdir}</defaultValue>
+ <type>java.lang.String</type>
+ <description>The folder in commons for this component.</description>
+ </parameter>
+ <parameter>
<name>commons.jira.pid</name>
<property>commons.jira.pid</property>
<required>true</required>