You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2008/02/04 19:05:41 UTC
svn commit: r618352 - in /commons/sandbox/commons-build-plugin/src/main:
resources/commons-xdoc-templates/no-download-page-template.xml
scripts/generate-xdocs.build.xml
Author: niallp
Date: Mon Feb 4 10:05:39 2008
New Revision: 618352
URL: http://svn.apache.org/viewvc?rev=618352&view=rev
Log:
Generate a "No downloads available" page if the release version is not set
Added:
commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml (with props)
Modified:
commons/sandbox/commons-build-plugin/src/main/scripts/generate-xdocs.build.xml
Added: commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml?rev=618352&view=auto
==============================================================================
--- commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml (added)
+++ commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml Mon Feb 4 10:05:39 2008
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: download-page-template.xml |
+ | (see commons-build-plugin/src/main/resources/commons-xdoc-templates) |
+ +======================================================================+
+ | |
+ | 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.release.version (required) |
+ | - commons.binary.suffix (optional) |
+ | (defaults to "-bin", set to "" for pre-maven2 releases) |
+ | |
+ | 3) Example Properties |
+ | |
+ | <properties> |
+ | <commons.componentid>math</commons.componentid> |
+ | <commons.release.version>1.2</commons.release.version> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Download @NAME@</title>
+ <author email="dev@commons.apache.org">Commons Documentation Team</author>
+ </properties>
+ <body>
+ <section name="Download @NAME@">
+ <p>
+ There are currently no official releases of this component.
+ </p>
+ </section>
+ <section name="Sandbox Policy">
+ <p>
+ <strong>NOTE:</strong> For <i>Sandbox</i> components, releases are
+ NOT permitted. <i>Sandbox</i> components need to promoted to become
+ <i>proper</i> components before a release can be made.
+ </p>
+ </section>
+ </body>
+</document>
Propchange: commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: commons/sandbox/commons-build-plugin/src/main/resources/commons-xdoc-templates/no-download-page-template.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: commons/sandbox/commons-build-plugin/src/main/scripts/generate-xdocs.build.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/commons-build-plugin/src/main/scripts/generate-xdocs.build.xml?rev=618352&r1=618351&r2=618352&view=diff
==============================================================================
--- commons/sandbox/commons-build-plugin/src/main/scripts/generate-xdocs.build.xml (original)
+++ commons/sandbox/commons-build-plugin/src/main/scripts/generate-xdocs.build.xml Mon Feb 4 10:05:39 2008
@@ -84,10 +84,8 @@
<mkdir dir="${commonsMojoTempDir}"/>
<!-- Load the dowload-page template from mojo resources to temp directory -->
- <loadresource property="downloadpage-xml">
- <javaresource name="${commonsMojoXdocDir}/download-page-template.xml"/>
- </loadresource>
- <echo message="${downloadpage-xml}" file="${commonsMojoTempDir}/download-page-template.xml" append="false" />
+ <antcall target="load-no-download-page-template"/>
+ <antcall target="load-download-page-template"/>
<!-- Copy the download page template filtering to replace properties -->
<copy file="${commonsMojoTempDir}/download-page-template.xml" tofile="${commonsMojoTempDir}/download_${commons.componentid}.xml" overwrite="true">
@@ -104,6 +102,22 @@
<antcall target="copy-to-xdoc-dir">
<param name="file.name" value="download_${commons.componentid}.xml"/>
</antcall>
+ </target>
+
+ <target name="load-download-page-template" if="commons.release.version">
+ <echo level="info" message="*** copying download-page-template.xml ***" />
+ <loadresource property="downloadpage-xml">
+ <javaresource name="${commonsMojoXdocDir}/download-page-template.xml"/>
+ </loadresource>
+ <echo message="${downloadpage-xml}" file="${commonsMojoTempDir}/download-page-template.xml" append="false" />
+ </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">