| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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. |
| --> |
| <document> |
| |
| <properties> |
| <title>Generating NOTICE.txt</title> |
| <author email="dev@commons.apache.org">Apache Commons Documentation Team</author> |
| </properties> |
| |
| <body> |
| |
| |
| <section name="commons-build:readme-md" href="readme-md"> |
| |
| <subsection name="Overview"> |
| <p> |
| The <code>commons-build:notice-txt</code> goal generates a README.md file for a component. |
| Execute the goal using the following command: <source>mvn commons-build:notice-txt</source> |
| </p> |
| |
| <p> |
| <strong>Note:</strong> The README.md should be regenerated after every release of the |
| component since it contains the maven coordinates of the latest release. |
| </p> |
| |
| <p> |
| This goal uses the following: |
| <ul> |
| <li>The goal is mapped to the ant script/target using the <code>notice-txt</code> mojo definition in the |
| <a href="https://gitbox.apache.org/repos/asf?p=commons-build-plugin.git;a=tree;f=src/main/scripts/generate-xdocs.mojos.xml">generate-xdocs.mojos.xml</a> mapping document</li> |
| <li>Executes the <code>notice-txt</code> target in |
| <a href="https://gitbox.apache.org/repos/asf?p=commons-build-plugin.git;a=tree;f=src/main/scripts/generate-xdocs.build.xml">generate-xdocs.build.xml</a> |
| ant script</li> |
| <li>Uses the <a href="https://gitbox.apache.org/repos/asf?p=commons-build-plugin.git;a=tree;f=src/main/resources/commons-xdoc-templates/notice-txt-template.txt">notice-txt-template.txt</a> |
| template</li> |
| <li>Uses the <a href="notice-txt-mojo.html">goal's (i.e. mojo's) parameters</a> to filter values in the template</li> |
| </ul> |
| </p> |
| </subsection> |
| |
| <subsection name="Configuration"> |
| <p> |
| To generate a README.md, the following <a href="notice-txt-mojo.html">properties</a> are configured in the component's <code>pom.xml</code> |
| <ul> |
| <li><b>project.inceptionYear</b> - The year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational.</li> |
| </ul> |
| </p> |
| <p> |
| Example configuration for Commons Text: |
| <source><![CDATA[ |
| <project> |
| <inceptionYear>2014</inceptionYear> |
| </project> |
| ]]></source> |
| </p> |
| </subsection> |
| |
| </section> |
| |
| </body> |
| </document> |