Overview
The commons-build:download-page
goal generates a custom Download page for the latest release of a component.
Execute the goal using the following command:
mvn commons-build:download-page
The above command generates an xdoc page named download_componentid.xml in either the xdocs
or src/site/xdoc
directory (depending on which exists), which should be checked into subversion.
This will cause a download_componentid.html page to be generated when the mvn site
is run.
Remember to add a Download link to download_componentid.cgi to the maven site.xml
.
Note: The Download page should only need to be re-generated after a new release of the component
or if the download page template changes.
This goal uses the following:
Configuration
To generate a Download page, the following properties are configured in the component's pom.xml
- commons.componentid - Commons component id
- commons.release.version - The version number of the latest release of the component
- commons.release.name - (optional - defaults to
${commons.release.name}
) The name of the latest release of the component
- commons.release.desc - (optional) 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
- commons.binary.suffix - (optional - defaults to
-bin
) The suffix for the binary release
(some components use "-bin", others have no suffix)
- commons.release.subdir - The subdirectory to use. This defaults to using separate source/binaries folders; it set it will be used as the directory for both.
Example configuration for Commons Text:
<properties>
<commons.componentid>text</commons.componentid>
<commons.release.version>1.10.0</commons.release.version>
</properties>
Sometimes there is a requirement to list two versions on the download page. This can be achieved using the following properties:
- commons.release.2.version - The version number of the alternative release of the component
- commons.release.2.name - (optional - defaults to
${commons.release.2.name}
) The name of the alternative release of the component
- commons.release.2.desc - (optional) Additional text to append to the section name of the alternative release
- commons.release.2.binary.suffix - (optional - defaults to
-bin
) The suffix for the alternative
binary release (some components use "-bin", others have no suffix)
- commons.release.2.subdir - The subdirectory to use. This defaults to using separate source/binaries folders; it set it will be used as the directory for both.
You can have a third version on the download page. This can be achieved using the following properties:
- commons.release.3.version - The version number of the alternative release of the component
- commons.release.3.name - (optional - defaults to
${commons.release.3.name}
) The name of the alternative release of the component
- commons.release.3.desc - (optional) Additional text to append to the section name of the alternative release
- commons.release.3.binary.suffix - (optional - defaults to
-bin
) The suffix for the alternative
binary release (some components use "-bin", others have no suffix)
- commons.release.3.subdir - The subdirectory to use. This defaults to using separate source/binaries folders; it set it will be used as the directory for both.
You can have a fourth version on the download page. This can be achieved using the following properties:
- commons.release.4.version - The version number of the alternative release of the component
- commons.release.4.name - (optional - defaults to
${commons.release.4.name}
) The name of the alternative release of the component
- commons.release.4.desc - (optional) Additional text to append to the section name of the alternative release
- commons.release.4.binary.suffix - (optional - defaults to
-bin
) The suffix for the alternative
binary release (some components use "-bin", others have no suffix)
- commons.release.4.subdir - The subdirectory to use. This defaults to using separate source/binaries folders; it set it will be used as the directory for both.
Example configuration for Commons DBCP with two releases:
<properties>
<commons.componentid>dbcp</commons.componentid>
<commons.release.version>1.4</commons.release.version>
<commons.release.desc>for JDBC 4 (JDK 1.6)</commons.release.desc>
<commons.release.2.version>1.3</commons.release.2.version>
<commons.release.2.desc> for JDBC 3 (JDK 1.4-1.5)</commons.release.2.desc>
</properties>
The above configuration generates a download page for two releases shown below: