You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/11/29 14:40:19 UTC
[08/50] commons-build-plugin git commit: Implement
commons.release.layout for download-page goal
Implement commons.release.layout for download-page goal
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/commons-build-plugin/trunk@1739607 13f79535-47bb-0310-9956-ffa450edef68
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/e761ec6d
Tree: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/tree/e761ec6d
Diff: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/diff/e761ec6d
Branch: refs/heads/master
Commit: e761ec6dbb4610231229514f974435f9fffb112c
Parents: 5ca2c86
Author: Sebastian Bazley <se...@apache.org>
Authored: Sun Apr 17 13:23:46 2016 +0000
Committer: Sebastian Bazley <se...@apache.org>
Committed: Sun Apr 17 13:23:46 2016 +0000
----------------------------------------------------------------------
.../download-page-body.xml | 24 ++++++++--------
.../download-page-head.xml | 6 +++-
src/main/scripts/generate-xdocs.build.xml | 30 ++++++++++++++++++++
src/main/scripts/generate-xdocs.mojos.xml | 27 ++++++++++++++++++
src/site/xdoc/download-page-mojo.xml | 19 +++++++++++++
src/site/xdoc/download-page.xml | 1 +
6 files changed, 94 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/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 4ad81e2..250f626 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@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz">@FINAL_NAME@@BINARY-SUFFIX@.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.tar.gz.asc">pgp</a></td>
+ <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.md5">md5</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@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.zip">@FINAL_NAME@@BINARY-SUFFIX@.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.zip.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/binaries/@FINAL_NAME@@BINARY-SUFFIX@.zip.asc">pgp</a></td>
+ <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.md5">md5</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@ID@/@BINDIR@/@FINAL_NAME@@BINARY-SUFFIX@.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
<subsection name="Source">
<table>
<tr>
- <td><a href="[preferred]/commons/@ID@/source/@FINAL_NAME@-src.tar.gz">@FINAL_NAME@-src.tar.gz</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/source/@FINAL_NAME@-src.tar.gz.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/source/@FINAL_NAME@-src.tar.gz.asc">pgp</a></td>
+ <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.md5">md5</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@/source/@FINAL_NAME@-src.zip">@FINAL_NAME@-src.zip</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/source/@FINAL_NAME@-src.zip.md5">md5</a></td>
- <td><a href="https://www.apache.org/dist/commons/@ID@/source/@FINAL_NAME@-src.zip.asc">pgp</a></td>
+ <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.md5">md5</a></td>
+ <td><a href="https://www.apache.org/dist/commons/@ID@/@SRCDIR@/@FINAL_NAME@-src.zip.asc">pgp</a></td>
</tr>
</table>
</subsection>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/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 68d3b95..f6bd2ad 100644
--- a/src/main/resources/commons-xdoc-templates/download-page-head.xml
+++ b/src/main/resources/commons-xdoc-templates/download-page-head.xml
@@ -32,14 +32,18 @@ limitations under the License.
| - commons.componentid (required, alphabetic, lower case) |
| - commons.release.version (required) |
| - commons.release.name (required) |
- | - commons.binary.suffix (optional) |
+ | - commons.binary.suffix (optional) |
| (defaults to "-bin", set to "" for pre-maven2 releases) |
| - commons.release.desc (optional) |
+ | - commons.release.layout (optional) |
+ | (set to 'version' to use e.g. commons-net-3.5) |
| |
| - 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.layout (optional) |
+ | (set to 'version' to use e.g. commons-net-3.5) |
| |
| 3) Example Properties |
| (commons.release.name inherited by parent: |
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/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 baa4533..7ba5b2e 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -149,14 +149,17 @@
<echo level="${level}" message="commons.release.name : ${commons.release.name}" />
<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.layout : ${commons.release.layout}" />
<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.layout : ${commons.release.2.layout}" />
<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.layout : ${commons.release.3.layout}" />
<echo level="${level}" message="----- commons:download-page - Parameters - END -----" />
<echo level="info" message="*** Generating ${project.name} ${commons.release.version} Download Page ***" />
@@ -197,6 +200,13 @@
<target name="load-download-page-body-1" if="commons.release.version">
<echo level="info" message="*** loading download-page body(1) file***" />
+ <condition property="BINDIR" value="${commons.release.version}" else="binaries">
+ <equals arg1="${commons.release.layout}" arg2="version"/>
+ </condition>
+ <condition property="SRCDIR" value="${commons.release.version}" else="source">
+ <equals arg1="${commons.release.layout}" arg2="version"/>
+ </condition>
+
<!-- Load Body -->
<loadresource property="download-page-body-1-xml">
<javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
@@ -208,6 +218,8 @@
<token key="ID" value="${commons.componentid}"/>
<token key="FINAL_NAME" value="${commons.release.name}"/>
<token key="BINARY-SUFFIX" value="${commons.binary.suffix}"/>
+ <token key="BINDIR" value="${BINDIR}"/>
+ <token key="SRCDIR" value="${SRCDIR}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -218,6 +230,13 @@
<target name="load-download-page-body-2" if="commons.release.2.version">
<echo level="info" message="*** loading download-page body(2) file***" />
+ <condition property="BINDIR" value="${commons.release.2.version}" else="binaries">
+ <equals arg1="${commons.release.2.layout}" arg2="version"/>
+ </condition>
+ <condition property="SRCDIR" value="${commons.release.2.version}" else="source">
+ <equals arg1="${commons.release.2.layout}" arg2="version"/>
+ </condition>
+
<!-- Load Body -->
<loadresource property="download-page-body-2-xml">
<javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
@@ -229,6 +248,8 @@
<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="BINDIR" value="${BINDIR}"/>
+ <token key="SRCDIR" value="${SRCDIR}"/>
</replacetokens>
</filterchain>
</loadresource>
@@ -239,6 +260,13 @@
<target name="load-download-page-body-3" if="commons.release.3.version">
<echo level="info" message="*** loading download-page body(3) file***" />
+ <condition property="BINDIR" value="${commons.release.3.version}" else="binaries">
+ <equals arg1="${commons.release.3.layout}" arg2="version"/>
+ </condition>
+ <condition property="SRCDIR" value="${commons.release.3.version}" else="source">
+ <equals arg1="${commons.release.3.layout}" arg2="version"/>
+ </condition>
+
<!-- Load Body -->
<loadresource property="download-page-body-3-xml">
<javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
@@ -250,6 +278,8 @@
<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="BINDIR" value="${BINDIR}"/>
+ <token key="SRCDIR" value="${SRCDIR}"/>
</replacetokens>
</filterchain>
</loadresource>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/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 55be745..75ba37d 100644
--- a/src/main/scripts/generate-xdocs.mojos.xml
+++ b/src/main/scripts/generate-xdocs.mojos.xml
@@ -180,6 +180,15 @@
<type>java.lang.String</type>
<description>Release Title or Description.</description>
</parameter>
+ <parameter>
+ <name>commons.release.layout</name>
+ <property>commons.release.layout</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.layout}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Layout style (e.g. version)</description>
+ </parameter>
<!-- commons.release.2.* -->
<parameter>
<name>commons.release.2.version</name>
@@ -217,6 +226,15 @@
<type>java.lang.String</type>
<description>The suffix for the alternative release binary distro.</description>
</parameter>
+ <parameter>
+ <name>commons.release.2.layout</name>
+ <property>commons.release.2.layout</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.2.layout}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Layout style (e.g. version)</description>
+ </parameter>
<!-- commons.release.3.* -->
<parameter>
<name>commons.release.3.version</name>
@@ -254,6 +272,15 @@
<type>java.lang.String</type>
<description>The suffix for the alternative release binary distro.</description>
</parameter>
+ <parameter>
+ <name>commons.release.3.layout</name>
+ <property>commons.release.3.layout</property>
+ <required>false</required>
+ <readonly>false</readonly>
+ <defaultValue>${commons.release.3.layout}</defaultValue>
+ <type>java.lang.String</type>
+ <description>Layout style (e.g. version)</description>
+ </parameter>
</parameters>
</mojo>
<mojo>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/src/site/xdoc/download-page-mojo.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/download-page-mojo.xml b/src/site/xdoc/download-page-mojo.xml
index 2ed6777..bc5dc5e 100644
--- a/src/site/xdoc/download-page-mojo.xml
+++ b/src/site/xdoc/download-page-mojo.xml
@@ -94,6 +94,12 @@
<td><code>-</code></td>
<td>Release Title or Description.<br/><strong>Default value is</strong>: <code>${commons.release.desc}</code>.</td>
</tr>
+ <tr>
+ <td><strong><a href="#commons.release.layout">commons.release.layout</a></strong></td>
+ <td><code>String</code></td>
+ <td><code>-</code></td>
+ <td>Layout Style (e.g. version)<br/><strong>Default value is</strong>: <code>${commons.release.layout}</code>.</td>
+ </tr>
<!-- commons.release.2.* -->
<tr>
<td><strong><a href="#commons.release.2.version">commons.release.2.version</a></strong></td>
@@ -113,6 +119,12 @@
<td><code>-</code></td>
<td>The suffix for the alternative release binary distro.<br/><strong>Default value is</strong>: <code>${commons.release.2.binary.suffix}</code>.</td>
</tr>
+ <tr>
+ <td><strong><a href="#commons.release.layout">commons.release.2.layout</a></strong></td>
+ <td><code>String</code></td>
+ <td><code>-</code></td>
+ <td>Layout Style (e.g. version)<br/><strong>Default value is</strong>: <code>${commons.release.2.layout}</code>.</td>
+ </tr>
<!-- commons.release.3.* -->
<tr>
<td><strong><a href="#commons.release.3.version">commons.release.3.version</a></strong></td>
@@ -133,6 +145,13 @@
<td>The suffix for the alternative release binary distro.<br/><strong>Default value is</strong>: <code>${commons.release.3.binary.suffix}</code>.</td>
</tr>
<tr>
+ <td><strong><a href="#commons.release.layout">commons.release.3.layout</a></strong></td>
+ <td><code>String</code></td>
+ <td><code>-</code></td>
+ <td>Layout Style (e.g. version)<br/><strong>Default value is</strong>: <code>${commons.release.3.layout}</code>.</td>
+ </tr>
+ <!-- Miscellaneous -->
+ <tr>
<td><strong><a href="#messageLevel">messageLevel</a></strong></td>
<td><code>String</code></td>
<td><code>-</code></td>
http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/e761ec6d/src/site/xdoc/download-page.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/download-page.xml b/src/site/xdoc/download-page.xml
index 9e4c5a6..daba417 100644
--- a/src/site/xdoc/download-page.xml
+++ b/src/site/xdoc/download-page.xml
@@ -77,6 +77,7 @@
<li><b>commons.release.desc</b> - (<i>optional</i>) The download links are shown in a section with the component name and release version - if this parameter is specified then this text is appended</li>
<li><b>commons.binary.suffix</b> - (<i>optional - defaults to <code>-bin</code></i>) The suffix for the binary release
(some components use "-bin", others have no suffix)</li>
+ <li><b>commons.release.layout</b> - The layout style. This defaults to using source/binaries folders; use 'version' to use a single versioned folder (e.g. commons-build-23) fore binaries and source</li>
</ul>
</p>
<p>