You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2018/08/21 19:48:13 UTC
commons-build-plugin git commit: Use SHA256 as the default hash
Repository: commons-build-plugin
Updated Branches:
refs/heads/master 5737d83c6 -> 4a97cc48c
Use SHA256 as the default hash
Project: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/commit/4a97cc48
Tree: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/tree/4a97cc48
Diff: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/diff/4a97cc48
Branch: refs/heads/master
Commit: 4a97cc48c9e9098de679674c59914a21df3fd411
Parents: 5737d83
Author: Sebb <se...@apache.org>
Authored: Tue Aug 21 20:47:56 2018 +0100
Committer: Sebb <se...@apache.org>
Committed: Tue Aug 21 20:47:56 2018 +0100
----------------------------------------------------------------------
src/changes/changes.xml | 5 +++
.../download-page-body.xml | 8 ++--
.../download-page-head.xml | 16 ++++---
src/main/scripts/generate-xdocs.build.xml | 47 ++++++++++++++++++++
src/main/scripts/generate-xdocs.mojos.xml | 36 +++++++++++++++
5 files changed, 101 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a97cc48/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 496cb77..5ce111c 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -25,6 +25,11 @@
</properties>
<body>
+ <release version="1.10" date="2018-??-??" description="Feature release">
+ <action dev="sebb" type="update">
+ Use SHA256 signatures as the default in the download page.
+ </action>
+ </release>
<release version="1.9" date="2018-06-16" description="Feature release">
<action dev="ggregory" type="fix">
Fix in src/main/resources/commons-xdoc-templates/readme-md-template.md for components that have a major version number in their artifact IDs.
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a97cc48/src/main/resources/commons-xdoc-templates/download-page-body.xml
----------------------------------------------------------------------
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 f5144af..b8736c3 100644
--- a/src/main/resources/commons-xdoc-templates/download-page-body.xml
+++ b/src/main/resources/commons-xdoc-templates/download-page-body.xml
@@ -3,12 +3,12 @@
<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.sha1">sha1</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>
</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.sha1">sha1</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>
</tr>
</table>
@@ -17,12 +17,12 @@
<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.sha1">sha1</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>
</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.sha1">sha1</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>
</tr>
</table>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a97cc48/src/main/resources/commons-xdoc-templates/download-page-head.xml
----------------------------------------------------------------------
diff --git a/src/main/resources/commons-xdoc-templates/download-page-head.xml b/src/main/resources/commons-xdoc-templates/download-page-head.xml
index e556c26..f33895d 100644
--- a/src/main/resources/commons-xdoc-templates/download-page-head.xml
+++ b/src/main/resources/commons-xdoc-templates/download-page-head.xml
@@ -29,19 +29,21 @@ limitations under the License.
| 1) Re-generate using: mvn commons:download-page |
| |
| 2) Set the following properties in the component's pom: |
- | - commons.componentid (required, alphabetic, lower case) |
+ | - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| - commons.release.name (required) |
| - commons.binary.suffix (optional) |
| (defaults to "-bin", set to "" for pre-maven2 releases) |
| - commons.release.desc (optional) |
| - commons.release.subdir (optional) |
+ | - commons.release.hash (optional, lowercase, default sha256) |
| |
- | - commons.release.2/3.version (conditional) |
- | - commons.release.2/3.name (conditional) |
- | - commons.release.2/3.binary.suffix (optional) |
- | - commons.release.2/3.desc (optional) |
- | - commons.release.2/3.subdir (optional) |
+ | - commons.release.[234].version (conditional) |
+ | - commons.release.[234].name (conditional) |
+ | - commons.release.[234].binary.suffix (optional) |
+ | - commons.release.[234].desc (optional) |
+ | - commons.release.[234].subdir (optional) |
+ | - commons.release.[234].hash (optional, lowercase, [sha256])|
| |
| 3) Example Properties |
| (commons.release.name inherited by parent: |
@@ -102,7 +104,7 @@ limitations under the License.
It is essential that you
<a href="https://www.apache.org/info/verification.html">verify the integrity</a>
of downloaded files, preferably using the <code>PGP</code> signature (<code>*.asc</code> files);
- failing that using the <code>SHA1</code> hash (<code>*.sha1</code> checksum files).
+ failing that using the <code>@HASHUC@</code> hash (<code>*.@HASHLC@</code> checksum files).
</p>
<p>
The <a href="https://www.apache.org/dist/commons/KEYS">KEYS</a>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a97cc48/src/main/scripts/generate-xdocs.build.xml
----------------------------------------------------------------------
diff --git a/src/main/scripts/generate-xdocs.build.xml b/src/main/scripts/generate-xdocs.build.xml
index f64b014..b305e54 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -142,6 +142,14 @@
<!-- ========== Generate Download Page ==================================== -->
+ <scriptdef language="javascript" name="upper">
+ <attribute name="string" />
+ <attribute name="to" />
+
+ project.setProperty( attributes.get( "to" ),
+ attributes.get( "string" ).toUpperCase() );
+ </scriptdef>
+
<target name="download-page" description="Generate Download page">
<echo level="${level}" message="----- commons:download-page - Parameters - START -----" />
@@ -153,24 +161,28 @@
<echo level="${level}" message="commons.release.desc : ${commons.release.desc}" />
<echo level="${level}" message="commons.binary.suffix : ${commons.binary.suffix}" />
<echo level="${level}" message="commons.release.subdir : ${commons.release.subdir}" />
+ <echo level="${level}" message="commons.release.hash : ${commons.release.hash}" />
<!-- Release #2 -->
<echo level="${level}" message="commons.release.2.version: ${commons.release.2.version}" />
<echo level="${level}" message="commons.release.2.name : ${commons.release.2.name}" />
<echo level="${level}" message="commons.release.2.desc : ${commons.release.2.desc}" />
<echo level="${level}" message="commons.release.2.binary.suffix: ${commons.release.2.binary.suffix}" />
<echo level="${level}" message="commons.release.2.subdir : ${commons.release.2.subdir}" />
+ <echo level="${level}" message="commons.release.2.hash : ${commons.release.2.hash}" />
<!-- Release #3 -->
<echo level="${level}" message="commons.release.3.version: ${commons.release.3.version}" />
<echo level="${level}" message="commons.release.3.name : ${commons.release.3.name}" />
<echo level="${level}" message="commons.release.3.desc : ${commons.release.3.desc}" />
<echo level="${level}" message="commons.release.3.binary.suffix: ${commons.release.3.binary.suffix}" />
<echo level="${level}" message="commons.release.3.subdir : ${commons.release.3.subdir}" />
+ <echo level="${level}" message="commons.release.3.hash : ${commons.release.3.hash}" />
<!-- Release #4 -->
<echo level="${level}" message="commons.release.4.version: ${commons.release.4.version}" />
<echo level="${level}" message="commons.release.4.name : ${commons.release.4.name}" />
<echo level="${level}" message="commons.release.4.desc : ${commons.release.4.desc}" />
<echo level="${level}" message="commons.release.4.binary.suffix: ${commons.release.4.binary.suffix}" />
<echo level="${level}" message="commons.release.4.subdir : ${commons.release.4.subdir}" />
+ <echo level="${level}" message="commons.release.4.hash : ${commons.release.4.hash}" />
<echo level="${level}" message="----- commons:download-page - Parameters - END -----" />
@@ -197,12 +209,19 @@
<target name="load-download-page-head" if="commons.release.version">
<echo level="info" message="*** loading download-page header file ***" />
+ <condition property="HASHLC" value="${commons.release.hash}" else="sha256">
+ <isset property="commons.release.hash"/>
+ </condition>
+ <upper string="${HASHLC}" to="HASHUC" />
+
<!-- Load header -->
<loadresource property="download-page-head-xml">
<javaresource name="${commonsMojoXdocDir}/download-page-head.xml"/>
<filterchain>
<replacetokens>
<token key="NAME" value="${project.name}"/>
+ <token key="HASHUC" value="${HASHUC}"/>
+ <token key="HASHLC" value="${HASHLC}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -213,12 +232,17 @@
<target name="load-download-page-body-1" if="commons.release.version">
<echo level="info" message="*** loading download-page body(1) file***" />
+ <!-- Set up the defaults -->
<condition property="BINDIR" value="${commons.release.subdir}" else="binaries">
<isset property="commons.release.subdir"/>
</condition>
<condition property="SRCDIR" value="${commons.release.subdir}" else="source">
<isset property="commons.release.subdir"/>
</condition>
+ <condition property="HASHLC" value="${commons.release.hash}" else="sha256">
+ <isset property="commons.release.hash"/>
+ </condition>
+ <upper string="${HASHLC}" to="HASHUC" />
<!-- Load Body -->
<loadresource property="download-page-body-1-xml">
@@ -233,6 +257,8 @@
<token key="BINARY-SUFFIX" value="${commons.binary.suffix}"/>
<token key="BINDIR" value="${BINDIR}"/>
<token key="SRCDIR" value="${SRCDIR}"/>
+ <token key="HASHUC" value="${HASHUC}"/>
+ <token key="HASHLC" value="${HASHLC}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -243,12 +269,17 @@
<target name="load-download-page-body-2" if="commons.release.2.version">
<echo level="info" message="*** loading download-page body(2) file***" />
+ <!-- Set up the defaults -->
<condition property="BINDIR" value="${commons.release.2.subdir}" else="binaries">
<isset property="commons.release.2.subdir"/>
</condition>
<condition property="SRCDIR" value="${commons.release.2.subdir}" else="source">
<isset property="commons.release.2.subdir"/>
</condition>
+ <condition property="HASHLC" value="${commons.release.2.hash}" else="sha256">
+ <isset property="commons.release.2.hash"/>
+ </condition>
+ <upper string="${HASHLC}" to="HASHUC" />
<!-- Load Body -->
<loadresource property="download-page-body-2-xml">
@@ -263,6 +294,8 @@
<token key="BINARY-SUFFIX" value="${commons.release.2.binary.suffix}"/>
<token key="BINDIR" value="${BINDIR}"/>
<token key="SRCDIR" value="${SRCDIR}"/>
+ <token key="HASHUC" value="${HASHUC}"/>
+ <token key="HASHLC" value="${HASHLC}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -273,12 +306,17 @@
<target name="load-download-page-body-3" if="commons.release.3.version">
<echo level="info" message="*** loading download-page body(3) file***" />
+ <!-- Set up the defaults -->
<condition property="BINDIR" value="${commons.release.3.subdir}" else="binaries">
<isset property="commons.release.3.subdir"/>
</condition>
<condition property="SRCDIR" value="${commons.release.3.subdir}" else="source">
<isset property="commons.release.3.subdir"/>
</condition>
+ <condition property="HASHLC" value="${commons.release.3.hash}" else="sha256">
+ <isset property="commons.release.3.hash"/>
+ </condition>
+ <upper string="${HASHLC}" to="HASHUC" />
<!-- Load Body -->
<loadresource property="download-page-body-3-xml">
@@ -293,6 +331,8 @@
<token key="BINARY-SUFFIX" value="${commons.release.3.binary.suffix}"/>
<token key="BINDIR" value="${BINDIR}"/>
<token key="SRCDIR" value="${SRCDIR}"/>
+ <token key="HASHUC" value="${HASHUC}"/>
+ <token key="HASHLC" value="${HASHLC}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -303,12 +343,17 @@
<target name="load-download-page-body-4" if="commons.release.4.version">
<echo level="info" message="*** loading download-page body(4) file***" />
+ <!-- Set up the defaults -->
<condition property="BINDIR" value="${commons.release.4.subdir}" else="binaries">
<isset property="commons.release.4.subdir"/>
</condition>
<condition property="SRCDIR" value="${commons.release.4.subdir}" else="source">
<isset property="commons.release.4.subdir"/>
</condition>
+ <condition property="HASHLC" value="${commons.release.4.hash}" else="sha256">
+ <isset property="commons.release.4.hash"/>
+ </condition>
+ <upper string="${HASHLC}" to="HASHUC" />
<!-- Load Body -->
<loadresource property="download-page-body-4-xml">
@@ -323,6 +368,8 @@
<token key="BINARY-SUFFIX" value="${commons.release.4.binary.suffix}"/>
<token key="BINDIR" value="${BINDIR}"/>
<token key="SRCDIR" value="${SRCDIR}"/>
+ <token key="HASHUC" value="${HASHUC}"/>
+ <token key="HASHLC" value="${HASHLC}"/>
</replacetokens>
</filterchain>
</loadresource>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/4a97cc48/src/main/scripts/generate-xdocs.mojos.xml
----------------------------------------------------------------------
diff --git a/src/main/scripts/generate-xdocs.mojos.xml b/src/main/scripts/generate-xdocs.mojos.xml
index ddfee58..aeac0d4 100644
--- a/src/main/scripts/generate-xdocs.mojos.xml
+++ b/src/main/scripts/generate-xdocs.mojos.xml
@@ -695,6 +695,15 @@
<type>java.lang.String</type>
<description>Subdirectory (instead of source/binaries.)</description>
</parameter>
+ <parameter>
+ <name>commons.release.hash</name>
+ <property>commons.release.hash</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.hash}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Type of hash (lower case, e.g. sha256)</description>
+ </parameter>
<!-- commons.release.2.* -->
<parameter>
<name>commons.release.2.version</name>
@@ -741,6 +750,15 @@
<type>java.lang.String</type>
<description>Subdirectory (instead of source/binaries.)</description>
</parameter>
+ <parameter>
+ <name>commons.release.2.hash</name>
+ <property>commons.release.2.hash</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.2.hash}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Type of hash (lower case, e.g. sha256)</description>
+ </parameter>
<!-- commons.release.3.* -->
<parameter>
<name>commons.release.3.version</name>
@@ -787,6 +805,15 @@
<type>java.lang.String</type>
<description>Subdirectory (instead of source/binaries.)</description>
</parameter>
+ <parameter>
+ <name>commons.release.3.hash</name>
+ <property>commons.release.3.hash</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.3.hash}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Type of hash (lower case, e.g. sha256)</description>
+ </parameter>
<!-- commons.release.4.* -->
<parameter>
<name>commons.release.4.version</name>
@@ -833,6 +860,15 @@
<type>java.lang.String</type>
<description>Subdirectory (instead of source/binaries.)</description>
</parameter>
+ <parameter>
+ <name>commons.release.4.hash</name>
+ <property>commons.release.4.hash</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.4.hash}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Type of hash (lower case, e.g. sha256)</description>
+ </parameter>
</parameters>
</mojo>
<mojo>