commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [3/3] commons-build-plugin git commit: Allow for a fourth release since components like Apache Commons Pool now track from Java 5, 6, and 7. Java 8 is around the corner I am sure.
Date Sat, 16 Dec 2017 17:34:35 GMT
Allow for a fourth release since components like Apache Commons Pool now
track from Java 5, 6, and 7. Java 8 is around the corner I am sure.

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/f0acb5dd
Tree: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/tree/f0acb5dd
Diff: http://git-wip-us.apache.org/repos/asf/commons-build-plugin/diff/f0acb5dd

Branch: refs/heads/master
Commit: f0acb5dde3ec223d9a0f27f641144f74cb48236a
Parents: 85d80bd
Author: Gary Gregory <ggregory@apache.org>
Authored: Sat Dec 16 10:34:30 2017 -0700
Committer: Gary Gregory <ggregory@apache.org>
Committed: Sat Dec 16 10:34:30 2017 -0700

----------------------------------------------------------------------
 src/main/scripts/generate-xdocs.build.xml | 892 +++++++++++++------------
 src/main/scripts/generate-xdocs.mojos.xml | 850 ++++++++++++-----------
 src/site/xdoc/download-page-mojo.xml      | 529 ++++++++-------
 src/site/xdoc/download-page.xml           | 287 ++++----
 4 files changed, 1338 insertions(+), 1220 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-build-plugin/blob/f0acb5dd/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 54622f5..772dd76 100644
--- a/src/main/scripts/generate-xdocs.build.xml
+++ b/src/main/scripts/generate-xdocs.build.xml
@@ -1,428 +1,464 @@
-<!--
-    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.
--->
-<!--
-   Commons Build: Standard XDOC Pages Generation.
-
-   $HeadURL$
-   $Revision$ $Date$
- -->
-<project name="Commons Build: Standard XDOC Pages Generation" basedir=".">
-
-    <property name="commonsMojoId"      value="Commons:xdoc-generate" />
-    <property name="commonsMojoXdocDir" value="resources/commons-xdoc-templates" />
-    <property name="commonsMojoTempDir" value="target/commons-generated-xdocs" />
-    <property name="level"              value="info" />
-
-    <!-- ========== Generate Mailing List Page ================================ -->
-
-    <target name="mail-page" description="Generate Mailing List page">
-
-        <echo level="${level}" message="----- commons:mailing-list - Parameters - START -----" />
-        <echo level="${level}" message="project.name         : ${project.name}" />
-        <echo level="${level}" message="commons.componentid  : ${commons.componentid}" />
-        <echo level="${level}" message="commons.xdoc.dir     : ${commons.xdoc.dir}" />
-        <echo level="${level}" message="----- commons:mailing-list - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} Mailing List Page ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the issue-tracking template from mojo resources to temp directory -->
-        <loadresource property="mailinglists-xml">
-            <javaresource name="${commonsMojoXdocDir}/mail-lists-template.xml"/>
-        </loadresource>
-        <echo message="${mailinglists-xml}" file="${commonsMojoTempDir}/mail-lists-template.xml" append="false" />
-
-        <!-- Copy the mail-lists template filtering to replace properties -->
-        <copy file="${commonsMojoTempDir}/mail-lists-template.xml" tofile="${commonsMojoTempDir}/mail-lists.xml" overwrite="true">
-            <filterset>
-            <filter  token="NAME"         value="${project.name}"/>
-            <filter  token="ID"           value="${commons.componentid}"/>
-            </filterset>
-        </copy>
-
-        <!-- copy to either m1 or m2 xdoc directory -->
-        <antcall target="copy-to-xdoc-dir">
-            <param name="file.name" value="mail-lists.xml"/>
-        </antcall>
-
-    </target>
-
-    <!-- ========== Generate Issue Tracking Page ============================== -->
-
-    <target name="jira-page" description="Generate JIRA Issue Tracking page">
-
-        <echo level="${level}" message="----- commons:jira-page - Parameters - START -----" />
-        <echo level="${level}" message="project.name         : ${project.name}" />
-        <echo level="${level}" message="commons.xdoc.dir     : ${commons.xdoc.dir}" />
-        <echo level="${level}" message="commons.jira.id      : ${commons.jira.id}" />
-        <echo level="${level}" message="commons.jira.pid     : ${commons.jira.pid}" />
-        <echo level="${level}" message="----- commons:jira-page - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} Issue Tracking Page ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the issue-tracking template from mojo resources to temp directory -->
-        <loadresource property="issuetracking-xml">
-            <javaresource name="${commonsMojoXdocDir}/issue-tracking-template.xml"/>
-        </loadresource>
-        <echo message="${issuetracking-xml}" file="${commonsMojoTempDir}/issue-tracking-template.xml" append="false" />
-
-        <!-- Copy the issue-tracking template filtering to replace properties -->
-        <copy file="${commonsMojoTempDir}/issue-tracking-template.xml" tofile="${commonsMojoTempDir}/issue-tracking.xml" overwrite="true">
-            <filterset>
-            <filter  token="NAME"         value="${project.name}"/>
-            <filter  token="JIRA_ID"      value="${commons.jira.id}"/>
-            <filter  token="JIRA_PID"     value="${commons.jira.pid}"/>
-            </filterset>
-        </copy>
-
-        <!-- copy to either m1 or m2 xdoc directory -->
-        <antcall target="copy-to-xdoc-dir">
-            <param name="file.name" value="issue-tracking.xml"/>
-        </antcall>
-
-    </target>
-
-
-    <!-- ========== Generate Sandbox Issue Tracking Page ====================== -->
-
-    <target name="sandbox-jira-page" description="Generate Sandbox JIRA Issue Tracking page">
-
-        <echo level="${level}" message="----- commons:sandbox-jira-page - Parameters - START -----" />
-        <echo level="${level}" message="project.name            : ${project.name}" />
-        <echo level="${level}" message="commons.jira.componentid: ${commons.jira.componentid}" />
-        <echo level="${level}" message="----- commons:sandbox-jira-page - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} Sandbox Issue Tracking Page ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the issue-tracking template from mojo resources to temp directory -->
-        <loadresource property="sandbox-issuetracking-xml">
-            <javaresource name="${commonsMojoXdocDir}/sandbox-issue-tracking-template.xml"/>
-        </loadresource>
-        <echo message="${sandbox-issuetracking-xml}" file="${commonsMojoTempDir}/sandbox-issue-tracking-template.xml" append="false" />
-
-        <!-- Copy the issue-tracking template filtering to replace properties -->
-        <copy file="${commonsMojoTempDir}/sandbox-issue-tracking-template.xml" tofile="${commonsMojoTempDir}/issue-tracking.xml" overwrite="true">
-            <filterset>
-            <filter  token="NAME"             value="${project.name}"/>
-            <filter  token="JIRA_COMPONENTID" value="${commons.jira.componentid}"/>
-            </filterset>
-        </copy>
-
-        <!-- copy to either m1 or m2 xdoc directory -->
-        <antcall target="copy-to-xdoc-dir">
-            <param name="file.name" value="issue-tracking.xml"/>
-        </antcall>
-
-    </target>
-
-
-    <!-- ========== Generate Download Page ==================================== -->
-
-    <target name="download-page" description="Generate Download page">
-
-        <echo level="${level}" message="----- commons: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.release.version  : ${commons.release.version}" />
-        <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.subdir   : ${commons.release.subdir}" />
-        <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.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:download-page - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} ${commons.release.version} Download Page ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the dowload-page template from mojo resources to temp directory -->
-        <antcall target="load-no-download-page-template"/>
-        <antcall target="load-download-page-head"/>
-        <antcall target="load-download-page-body-1"/>
-        <antcall target="load-download-page-body-2"/>
-        <antcall target="load-download-page-body-3"/>
-        <antcall target="load-download-page-foot"/>
-
-        <!-- copy to either m1 or m2 xdoc directory -->
-        <antcall target="copy-to-xdoc-dir">
-            <param name="file.name" value="download_${commons.componentid}.xml"/>
-        </antcall>
-    </target>
-
-    <target name="load-download-page-head" if="commons.release.version">
-        <echo  level="info" message="*** loading download-page header file ***" />
-
-        <!-- Load header -->
-        <loadresource property="download-page-head-xml">
-            <javaresource name="${commonsMojoXdocDir}/download-page-head.xml"/>
-            <filterchain>
-                <replacetokens>
-                    <token key="NAME" value="${project.name}"/>
-                </replacetokens>
-            </filterchain>
-        </loadresource>
-        <echo message="${download-page-head-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="false" />
-
-    </target>
-
-    <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.subdir}" else="binaries">
-          <isset property="commons.release.subdir"/>
-        </condition>
-        <condition property="SRCDIR" value="${commons.release.subdir}" else="source">
-          <isset property="commons.release.subdir"/>
-        </condition>
-
-        <!-- Load Body -->
-        <loadresource property="download-page-body-1-xml">
-            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
-            <filterchain>
-                <replacetokens>
-                    <token key="VERSION"       value="${commons.release.version}"/>
-                    <token key="RELDESC"       value="${commons.release.desc}"/>
-                    <token key="NAME"          value="${project.name}"/>
-                    <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>
-        <echo message="${download-page-body-1-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
-
-    </target>
-
-    <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.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>
-
-        <!-- Load Body -->
-        <loadresource property="download-page-body-2-xml">
-            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
-            <filterchain>
-                <replacetokens>
-                    <token key="VERSION"       value="${commons.release.2.version}"/>
-                    <token key="RELDESC"       value="${commons.release.2.desc}"/>
-                    <token key="NAME"          value="${project.name}"/>
-                    <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>
-        <echo message="${download-page-body-2-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
-
-    </target>
-
-    <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.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>
-
-        <!-- Load Body -->
-        <loadresource property="download-page-body-3-xml">
-            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
-            <filterchain>
-                <replacetokens>
-                    <token key="VERSION"       value="${commons.release.3.version}"/>
-                    <token key="RELDESC"       value="${commons.release.3.desc}"/>
-                    <token key="NAME"          value="${project.name}"/>
-                    <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>
-        <echo message="${download-page-body-3-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
-
-    </target>
-
-    <target name="load-download-page-foot" if="commons.release.version">
-        <echo  level="info" message="*** loading download-page footer files ***" />
-
-        <!-- Load Footer -->
-        <loadresource property="download-page-foot-xml">
-            <javaresource name="${commonsMojoXdocDir}/download-page-foot.xml"/>
-            <filterchain>
-                <replacetokens>
-                    <token key="ID"            value="${commons.componentid}"/>
-                </replacetokens>
-            </filterchain>
-        </loadresource>
-        <echo message="${download-page-foot-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
-
-    </target>
-
-    <target name="load-no-download-page-template" unless="commons.release.version">
-        <echo  level="info" message="*** copying no-download-page-template.xml ***" />
-        <loadresource property="no-downloadpage-xml">
-            <javaresource name="${commonsMojoXdocDir}/no-download-page-template.xml"/>
-        </loadresource>
-        <echo message="${no-downloadpage-xml}" file="${commonsMojoTempDir}/download-page-template.xml" append="false" />
-    </target>
-
-    <target name="copy-to-xdoc-dir">
-        <available file="xdocs"         type="dir" property="m1.xdocs.lib.present"/>
-        <available file="src/site/xdoc" type="dir" property="m2.xdocs.lib.present"/>
-        <antcall target="copy-to-m1-xdoc-dir"/>
-        <antcall target="copy-to-m2-xdoc-dir"/>
-    </target>
-
-    <target name="copy-to-m1-xdoc-dir" if="m1.xdocs.lib.present">
-        <echo level="info" message="*** Copying ${file.name} to m1 xdocs dir ***" />
-        <copy file="${commonsMojoTempDir}/${file.name}" tofile="xdocs/${file.name}" overwrite="true" filtering="true"/>
-    </target>
-
-    <target name="copy-to-m2-xdoc-dir" if="m2.xdocs.lib.present">
-        <echo level="info" message="*** Copying ${file.name} to m2 src/site/xdoc dir ***" />
-        <copy file="${commonsMojoTempDir}/${file.name}" tofile="src/site/xdoc/${file.name}" overwrite="true" filtering="true"/>
-    </target>
-
-    <!-- ========== Generate README.md file ================================ -->
-
-    <target name="readme-md" description="Generate README.md">
-
-        <echo level="${level}" message="----- commons:readme-md - Parameters - START -----" />
-        <echo level="${level}" message="project.name              : ${project.name}" />
-        <echo level="${level}" message="project.artifactId        : ${project.artifactId}" />
-        <echo level="${level}" message="project.groupId           : ${project.groupId}" />
-        <echo level="${level}" message="commons.jira.id           : ${commons.jira.id}" />
-        <echo level="${level}" message="commons.release.version   : ${commons.release.version}" />
-        <echo level="${level}" message="commons.componentid       : ${commons.componentid}" />
-        <echo level="${level}" message="----- commons:readme-md - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} README.md ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the readme-md template from mojo resources to temp directory -->
-        <loadresource property="readme-md">
-            <javaresource name="${commonsMojoXdocDir}/readme-md-template.md"/>
-        </loadresource>
-        <echo message="${readme-md}" file="${commonsMojoTempDir}/readme-md-template.md" append="false" />
-
-        <!-- Without using ant-contrib: remove "-project" for multi-module artifacts -->
-        <loadresource property="tmp.artifactId">
-            <propertyresource name="project.artifactId" />
-            <filterchain>
-                <tokenfilter>
-                    <filetokenizer/>
-                    <replacestring from="-project" to=""/>
-                </tokenfilter>
-            </filterchain>
-        </loadresource>
-
-        <!-- Copy the readme-md template filtering to replace properties -->
-        <copy file="${commonsMojoTempDir}/readme-md-template.md" tofile="README.md" overwrite="true">
-            <filterset>
-             <filter  token="NAME"           value="${project.name}"/>
-             <filter  token="ARTIFACTID"     value="${project.artifactId}"/>
-             <filter  token="ARTIFACTCOREID" value="${tmp.artifactId}"/>
-             <filter  token="GROUPID"        value="${project.groupId}"/>
-             <filter  token="JIRA_ID"        value="${commons.jira.id}"/>
-             <filter  token="VERSION"        value="${commons.release.version}"/>
-             <filter  token="DESCRIPTION"    value="${project.description}"/>
-             <filter  token="ID"             value="${commons.componentid}"/>
-            </filterset>
-        </copy>
-
-    </target>
-
-    <!-- ========== Generate CONTRIBUTING.md file ================================ -->
-
-    <target name="contributing-md" description="Generate CONTRIBUTING.md">
-
-        <echo level="${level}" message="----- commons:readme-md - Parameters - START -----" />
-        <echo level="${level}" message="project.name              : ${project.name}" />
-        <echo level="${level}" message="project.artifactId        : ${project.artifactId}" />
-        <echo level="${level}" message="commons.jira.id           : ${commons.jira.id}" />
-        <echo level="${level}" message="commons.componentid       : ${commons.componentid}" />
-        <echo level="${level}" message="----- commons:readme-md - Parameters - END   -----" />
-
-        <echo level="info" message="*** Generating ${project.name} CONTRIBUTING.md ***" />
-
-        <!-- Create a temporary directory to load the template files into -->
-        <mkdir dir="${commonsMojoTempDir}"/>
-
-        <!-- Load the contributing-md template from mojo resources to temp directory -->
-        <loadresource property="contributing-md">
-           <javaresource name="${commonsMojoXdocDir}/contributing-md-template.md"/>
-        </loadresource>
-        <echo message="${contributing-md}" file="${commonsMojoTempDir}/contributing-md-template.md" append="false" />
-
-        <!-- Without using ant-contrib: remove "-project" for multi-module artifacts -->
-        <loadresource property="tmp.artifactId">
-            <propertyresource name="project.artifactId" />
-            <filterchain>
-                <tokenfilter>
-                    <filetokenizer/>
-                    <replacestring from="-project" to=""/>
-                </tokenfilter>
-            </filterchain>
-        </loadresource>
-
-        <!-- Copy the mail-lists template filtering to replace properties -->
-        <copy file="${commonsMojoTempDir}/contributing-md-template.md" tofile="CONTRIBUTING.md" overwrite="true">
-            <filterset>
-                <filter  token="NAME"            value="${project.name}"/>
-                <filter  token="ARTIFACTID"      value="${project.artifactId}"/>
-                <filter  token="ARTIFACTCOREID"  value="${tmp.artifactId}"/>
-                <filter  token="JIRA_ID"         value="${commons.jira.id}"/>
-                <filter  token="ID"              value="${commons.componentid}"/>
-            </filterset>
-        </copy>
-
-    </target>
-
-</project>
+<!--
+    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.
+-->
+<!--
+   Commons Build: Standard XDOC Pages Generation.
+
+   $HeadURL$
+   $Revision$ $Date$
+ -->
+<project name="Commons Build: Standard XDOC Pages Generation" basedir=".">
+
+    <property name="commonsMojoId"      value="Commons:xdoc-generate" />
+    <property name="commonsMojoXdocDir" value="resources/commons-xdoc-templates" />
+    <property name="commonsMojoTempDir" value="target/commons-generated-xdocs" />
+    <property name="level"              value="info" />
+
+    <!-- ========== Generate Mailing List Page ================================ -->
+
+    <target name="mail-page" description="Generate Mailing List page">
+
+        <echo level="${level}" message="----- commons:mailing-list - Parameters - START -----" />
+        <echo level="${level}" message="project.name         : ${project.name}" />
+        <echo level="${level}" message="commons.componentid  : ${commons.componentid}" />
+        <echo level="${level}" message="commons.xdoc.dir     : ${commons.xdoc.dir}" />
+        <echo level="${level}" message="----- commons:mailing-list - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} Mailing List Page ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the issue-tracking template from mojo resources to temp directory -->
+        <loadresource property="mailinglists-xml">
+            <javaresource name="${commonsMojoXdocDir}/mail-lists-template.xml"/>
+        </loadresource>
+        <echo message="${mailinglists-xml}" file="${commonsMojoTempDir}/mail-lists-template.xml" append="false" />
+
+        <!-- Copy the mail-lists template filtering to replace properties -->
+        <copy file="${commonsMojoTempDir}/mail-lists-template.xml" tofile="${commonsMojoTempDir}/mail-lists.xml" overwrite="true">
+            <filterset>
+            <filter  token="NAME"         value="${project.name}"/>
+            <filter  token="ID"           value="${commons.componentid}"/>
+            </filterset>
+        </copy>
+
+        <!-- copy to either m1 or m2 xdoc directory -->
+        <antcall target="copy-to-xdoc-dir">
+            <param name="file.name" value="mail-lists.xml"/>
+        </antcall>
+
+    </target>
+
+    <!-- ========== Generate Issue Tracking Page ============================== -->
+
+    <target name="jira-page" description="Generate JIRA Issue Tracking page">
+
+        <echo level="${level}" message="----- commons:jira-page - Parameters - START -----" />
+        <echo level="${level}" message="project.name         : ${project.name}" />
+        <echo level="${level}" message="commons.xdoc.dir     : ${commons.xdoc.dir}" />
+        <echo level="${level}" message="commons.jira.id      : ${commons.jira.id}" />
+        <echo level="${level}" message="commons.jira.pid     : ${commons.jira.pid}" />
+        <echo level="${level}" message="----- commons:jira-page - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} Issue Tracking Page ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the issue-tracking template from mojo resources to temp directory -->
+        <loadresource property="issuetracking-xml">
+            <javaresource name="${commonsMojoXdocDir}/issue-tracking-template.xml"/>
+        </loadresource>
+        <echo message="${issuetracking-xml}" file="${commonsMojoTempDir}/issue-tracking-template.xml" append="false" />
+
+        <!-- Copy the issue-tracking template filtering to replace properties -->
+        <copy file="${commonsMojoTempDir}/issue-tracking-template.xml" tofile="${commonsMojoTempDir}/issue-tracking.xml" overwrite="true">
+            <filterset>
+            <filter  token="NAME"         value="${project.name}"/>
+            <filter  token="JIRA_ID"      value="${commons.jira.id}"/>
+            <filter  token="JIRA_PID"     value="${commons.jira.pid}"/>
+            </filterset>
+        </copy>
+
+        <!-- copy to either m1 or m2 xdoc directory -->
+        <antcall target="copy-to-xdoc-dir">
+            <param name="file.name" value="issue-tracking.xml"/>
+        </antcall>
+
+    </target>
+
+
+    <!-- ========== Generate Sandbox Issue Tracking Page ====================== -->
+
+    <target name="sandbox-jira-page" description="Generate Sandbox JIRA Issue Tracking page">
+
+        <echo level="${level}" message="----- commons:sandbox-jira-page - Parameters - START -----" />
+        <echo level="${level}" message="project.name            : ${project.name}" />
+        <echo level="${level}" message="commons.jira.componentid: ${commons.jira.componentid}" />
+        <echo level="${level}" message="----- commons:sandbox-jira-page - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} Sandbox Issue Tracking Page ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the issue-tracking template from mojo resources to temp directory -->
+        <loadresource property="sandbox-issuetracking-xml">
+            <javaresource name="${commonsMojoXdocDir}/sandbox-issue-tracking-template.xml"/>
+        </loadresource>
+        <echo message="${sandbox-issuetracking-xml}" file="${commonsMojoTempDir}/sandbox-issue-tracking-template.xml" append="false" />
+
+        <!-- Copy the issue-tracking template filtering to replace properties -->
+        <copy file="${commonsMojoTempDir}/sandbox-issue-tracking-template.xml" tofile="${commonsMojoTempDir}/issue-tracking.xml" overwrite="true">
+            <filterset>
+            <filter  token="NAME"             value="${project.name}"/>
+            <filter  token="JIRA_COMPONENTID" value="${commons.jira.componentid}"/>
+            </filterset>
+        </copy>
+
+        <!-- copy to either m1 or m2 xdoc directory -->
+        <antcall target="copy-to-xdoc-dir">
+            <param name="file.name" value="issue-tracking.xml"/>
+        </antcall>
+
+    </target>
+
+
+    <!-- ========== Generate Download Page ==================================== -->
+
+    <target name="download-page" description="Generate Download page">
+
+        <echo level="${level}" message="----- commons: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.release.version  : ${commons.release.version}" />
+        <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.subdir   : ${commons.release.subdir}" />
+        <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.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.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:download-page - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} ${commons.release.version} Download Page ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the dowload-page template from mojo resources to temp directory -->
+        <antcall target="load-no-download-page-template"/>
+        <antcall target="load-download-page-head"/>
+        <antcall target="load-download-page-body-1"/>
+        <antcall target="load-download-page-body-2"/>
+        <antcall target="load-download-page-body-3"/>
+        <antcall target="load-download-page-body-4"/>
+        <antcall target="load-download-page-foot"/>
+
+        <!-- copy to either m1 or m2 xdoc directory -->
+        <antcall target="copy-to-xdoc-dir">
+            <param name="file.name" value="download_${commons.componentid}.xml"/>
+        </antcall>
+    </target>
+
+    <target name="load-download-page-head" if="commons.release.version">
+        <echo  level="info" message="*** loading download-page header file ***" />
+
+        <!-- Load header -->
+        <loadresource property="download-page-head-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-head.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="NAME" value="${project.name}"/>
+                </replacetokens>
+            </filterchain>
+        </loadresource>
+        <echo message="${download-page-head-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="false" />
+
+    </target>
+
+    <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.subdir}" else="binaries">
+          <isset property="commons.release.subdir"/>
+        </condition>
+        <condition property="SRCDIR" value="${commons.release.subdir}" else="source">
+          <isset property="commons.release.subdir"/>
+        </condition>
+
+        <!-- Load Body -->
+        <loadresource property="download-page-body-1-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="VERSION"       value="${commons.release.version}"/>
+                    <token key="RELDESC"       value="${commons.release.desc}"/>
+                    <token key="NAME"          value="${project.name}"/>
+                    <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>
+        <echo message="${download-page-body-1-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
+
+    </target>
+
+    <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.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>
+
+        <!-- Load Body -->
+        <loadresource property="download-page-body-2-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="VERSION"       value="${commons.release.2.version}"/>
+                    <token key="RELDESC"       value="${commons.release.2.desc}"/>
+                    <token key="NAME"          value="${project.name}"/>
+                    <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>
+        <echo message="${download-page-body-2-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
+
+    </target>
+
+    <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.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>
+
+        <!-- Load Body -->
+        <loadresource property="download-page-body-3-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="VERSION"       value="${commons.release.3.version}"/>
+                    <token key="RELDESC"       value="${commons.release.3.desc}"/>
+                    <token key="NAME"          value="${project.name}"/>
+                    <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>
+        <echo message="${download-page-body-3-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
+
+    </target>
+
+    <target name="load-download-page-body-4" if="commons.release.4.version">
+      <echo  level="info" message="*** loading download-page body(4) file***" />
+
+      <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>
+
+        <!-- Load Body -->
+        <loadresource property="download-page-body-4-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-body.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="VERSION"       value="${commons.release.4.version}"/>
+                    <token key="RELDESC"       value="${commons.release.4.desc}"/>
+                    <token key="NAME"          value="${project.name}"/>
+                    <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="BINDIR"        value="${BINDIR}"/>
+                    <token key="SRCDIR"        value="${SRCDIR}"/>
+                </replacetokens>
+            </filterchain>
+        </loadresource>
+        <echo message="${download-page-body-4-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
+
+    </target>
+
+    <target name="load-download-page-foot" if="commons.release.version">
+        <echo  level="info" message="*** loading download-page footer files ***" />
+
+        <!-- Load Footer -->
+        <loadresource property="download-page-foot-xml">
+            <javaresource name="${commonsMojoXdocDir}/download-page-foot.xml"/>
+            <filterchain>
+                <replacetokens>
+                    <token key="ID"            value="${commons.componentid}"/>
+                </replacetokens>
+            </filterchain>
+        </loadresource>
+        <echo message="${download-page-foot-xml}" file="${commonsMojoTempDir}/download_${commons.componentid}.xml" append="true" />
+
+    </target>
+
+    <target name="load-no-download-page-template" unless="commons.release.version">
+        <echo  level="info" message="*** copying no-download-page-template.xml ***" />
+        <loadresource property="no-downloadpage-xml">
+            <javaresource name="${commonsMojoXdocDir}/no-download-page-template.xml"/>
+        </loadresource>
+        <echo message="${no-downloadpage-xml}" file="${commonsMojoTempDir}/download-page-template.xml" append="false" />
+    </target>
+
+    <target name="copy-to-xdoc-dir">
+        <available file="xdocs"         type="dir" property="m1.xdocs.lib.present"/>
+        <available file="src/site/xdoc" type="dir" property="m2.xdocs.lib.present"/>
+        <antcall target="copy-to-m1-xdoc-dir"/>
+        <antcall target="copy-to-m2-xdoc-dir"/>
+    </target>
+
+    <target name="copy-to-m1-xdoc-dir" if="m1.xdocs.lib.present">
+        <echo level="info" message="*** Copying ${file.name} to m1 xdocs dir ***" />
+        <copy file="${commonsMojoTempDir}/${file.name}" tofile="xdocs/${file.name}" overwrite="true" filtering="true"/>
+    </target>
+
+    <target name="copy-to-m2-xdoc-dir" if="m2.xdocs.lib.present">
+        <echo level="info" message="*** Copying ${file.name} to m2 src/site/xdoc dir ***" />
+        <copy file="${commonsMojoTempDir}/${file.name}" tofile="src/site/xdoc/${file.name}" overwrite="true" filtering="true"/>
+    </target>
+
+    <!-- ========== Generate README.md file ================================ -->
+
+    <target name="readme-md" description="Generate README.md">
+
+        <echo level="${level}" message="----- commons:readme-md - Parameters - START -----" />
+        <echo level="${level}" message="project.name              : ${project.name}" />
+        <echo level="${level}" message="project.artifactId        : ${project.artifactId}" />
+        <echo level="${level}" message="project.groupId           : ${project.groupId}" />
+        <echo level="${level}" message="commons.jira.id           : ${commons.jira.id}" />
+        <echo level="${level}" message="commons.release.version   : ${commons.release.version}" />
+        <echo level="${level}" message="commons.componentid       : ${commons.componentid}" />
+        <echo level="${level}" message="----- commons:readme-md - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} README.md ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the readme-md template from mojo resources to temp directory -->
+        <loadresource property="readme-md">
+            <javaresource name="${commonsMojoXdocDir}/readme-md-template.md"/>
+        </loadresource>
+        <echo message="${readme-md}" file="${commonsMojoTempDir}/readme-md-template.md" append="false" />
+
+        <!-- Without using ant-contrib: remove "-project" for multi-module artifacts -->
+        <loadresource property="tmp.artifactId">
+            <propertyresource name="project.artifactId" />
+            <filterchain>
+                <tokenfilter>
+                    <filetokenizer/>
+                    <replacestring from="-project" to=""/>
+                </tokenfilter>
+            </filterchain>
+        </loadresource>
+
+        <!-- Copy the readme-md template filtering to replace properties -->
+        <copy file="${commonsMojoTempDir}/readme-md-template.md" tofile="README.md" overwrite="true">
+            <filterset>
+             <filter  token="NAME"           value="${project.name}"/>
+             <filter  token="ARTIFACTID"     value="${project.artifactId}"/>
+             <filter  token="ARTIFACTCOREID" value="${tmp.artifactId}"/>
+             <filter  token="GROUPID"        value="${project.groupId}"/>
+             <filter  token="JIRA_ID"        value="${commons.jira.id}"/>
+             <filter  token="VERSION"        value="${commons.release.version}"/>
+             <filter  token="DESCRIPTION"    value="${project.description}"/>
+             <filter  token="ID"             value="${commons.componentid}"/>
+            </filterset>
+        </copy>
+
+    </target>
+
+    <!-- ========== Generate CONTRIBUTING.md file ================================ -->
+
+    <target name="contributing-md" description="Generate CONTRIBUTING.md">
+
+        <echo level="${level}" message="----- commons:readme-md - Parameters - START -----" />
+        <echo level="${level}" message="project.name              : ${project.name}" />
+        <echo level="${level}" message="project.artifactId        : ${project.artifactId}" />
+        <echo level="${level}" message="commons.jira.id           : ${commons.jira.id}" />
+        <echo level="${level}" message="commons.componentid       : ${commons.componentid}" />
+        <echo level="${level}" message="----- commons:readme-md - Parameters - END   -----" />
+
+        <echo level="info" message="*** Generating ${project.name} CONTRIBUTING.md ***" />
+
+        <!-- Create a temporary directory to load the template files into -->
+        <mkdir dir="${commonsMojoTempDir}"/>
+
+        <!-- Load the contributing-md template from mojo resources to temp directory -->
+        <loadresource property="contributing-md">
+           <javaresource name="${commonsMojoXdocDir}/contributing-md-template.md"/>
+        </loadresource>
+        <echo message="${contributing-md}" file="${commonsMojoTempDir}/contributing-md-template.md" append="false" />
+
+        <!-- Without using ant-contrib: remove "-project" for multi-module artifacts -->
+        <loadresource property="tmp.artifactId">
+            <propertyresource name="project.artifactId" />
+            <filterchain>
+                <tokenfilter>
+                    <filetokenizer/>
+                    <replacestring from="-project" to=""/>
+                </tokenfilter>
+            </filterchain>
+        </loadresource>
+
+        <!-- Copy the mail-lists template filtering to replace properties -->
+        <copy file="${commonsMojoTempDir}/contributing-md-template.md" tofile="CONTRIBUTING.md" overwrite="true">
+            <filterset>
+                <filter  token="NAME"            value="${project.name}"/>
+                <filter  token="ARTIFACTID"      value="${project.artifactId}"/>
+                <filter  token="ARTIFACTCOREID"  value="${tmp.artifactId}"/>
+                <filter  token="JIRA_ID"         value="${commons.jira.id}"/>
+                <filter  token="ID"              value="${commons.componentid}"/>
+            </filterset>
+        </copy>
+
+    </target>
+
+</project>


Mime
View raw message