Add editted copies of CLI and ANT docs from website
[One day this might be automated]
git-svn-id: https://svn.apache.org/repos/asf/creadur/rat/trunk@1502026 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/apache-rat/README-ANT.txt b/apache-rat/README-ANT.txt
new file mode 100644
index 0000000..f47bd97
--- /dev/null
+++ b/apache-rat/README-ANT.txt
@@ -0,0 +1,63 @@
+Apache Rat Ant Task Library
+===========================
+
+The Ant Task Library provides a single Ant task and a few supporting Ant types to run Rat,
+the Release Audit Tool from inside Apache Ant.
+
+Using Ant's resource abstraction the task can be used to check files on disk as well as tarballs
+or even URLs directly.
+
+Requirements
+------------
+
+The Rat Ant Task Library requires Apache Ant 1.7.1 or higher (it works well with 1.8.x)
+It also requires at least Java 1.5.
+
+Installation
+------------
+
+There are several ways to use the Antlib:
+
+ The traditional way:
+
+ <taskdef
+ resource="org/apache/rat/anttasks/antlib.xml">
+ <classpath>
+ <pathelement location="YOUR-PATH-TO/apache-rat-${project.version}.jar"/>
+ </classpath>
+ </taskdef>
+
+ With this you can use the report task like plain Ant tasks, they'll live in the default namespace.
+ I.e. if you can run exec without any namespace prefix, you can do so for report as well.
+ Similar, but assigning a namespace URI
+
+ <taskdef
+ uri="antlib:org.apache.rat.anttasks"
+ resource="org/apache/rat/anttasks/antlib.xml">
+ <classpath>
+ <pathelement location="YOUR-PATH-TO/apache-rat-${project.version}.jar"/>
+ </classpath>
+ </taskdef>
+
+ This puts your task into a separate namespace than Ant's namespace. You would use the tasks like
+
+ <project
+ xmlns:rat="antlib:org.apache.rat.anttasks"
+ xmlns="antlib:org.apache.tools.ant">
+ ...
+ <rat:report>
+ <fileset dir="src"/>
+ </rat:report>
+
+ or a variation thereof.
+ Using Ant's autodiscovery. Place apache-rat-tasks.jar and all dependencies into a directory
+ and use ant -lib YOUR-PATH-TO/apache-rat-${project.version}.jar
+ or copy apache-rat-${project.version}.jar into ANT_HOME/lib.
+
+ Then in your build file, simply declare the namespace on the project tag:
+
+ <project
+ xmlns:rat="antlib:org.apache.rat.anttasks"
+ xmlns="antlib:org.apache.tools.ant">
+
+ All tasks of this library will automatically be available in the rat namespace without any taskdef.
diff --git a/apache-rat/README-CLI.txt b/apache-rat/README-CLI.txt
new file mode 100644
index 0000000..3d76d85
--- /dev/null
+++ b/apache-rat/README-CLI.txt
@@ -0,0 +1,81 @@
+About Apache Rat™
+================
+
+Rat audits software distributions, with a special interest in headers.
+If this isn't quite what you're looking for then take a look at the
+other products developed by Apache Creadur™,
+including Apache Whisker™ which audits and generates legal (for example LICENSE)
+documents for complex software distributions.
+
+Running from the Command Line
+-----------------------------
+
+Run from the command line with:
+
+java -jar apache-rat-${project.version}.jar --help
+
+This will output a help message detailing the command line options available to you.
+
+Adding licence headers
+----------------------
+
+Rat can be used to automatically add licence headers to files that do not currently have them.
+Only files that are not excluded by the Rat configurations will be affected.
+
+To add licence headers use a command such as:
+
+java -jar apache-rat-${project.version}.jar --addLicence
+ --copyright "Copyright 2008 Foo" --force
+ /path/to/project
+
+This command will add the licence header directly to the source files.
+If you prefer to see which files will be changed and how then remove the "--force" option.
+Using multiple excludes from a file
+
+It is common to use the Rat with the maven or ant plugins and specify a series of files to exclude
+(such as a README or version control files).
+If you are using the Rat application instead of a plugin you can specify a series of regex excludes
+in a file and specify that with the -E option.
+
+java -jar apache-rat-${project.version}.jar
+ -E /path/to/project/.rat-excludes
+ -d /path/to/project
+
+Command Line Options
+====================
+
+usage: java rat.report [options] [DIR|TARBALL]
+Options
+ -A,--addLicense Add the default licence header to any file
+ with an unknown licence that is not in the
+ exclusion list. By default new files will
+ be created with the licence header, to
+ force the modification of existing files
+ use the --force option.
+ -a,--addLicence Add the default licence header to any file
+ with an unknown licence that is not in the
+ exclusion list. By default new files will
+ be created with the licence header, to
+ force the modification of existing files
+ use the --force option.
+ -c,--copyright <arg> The copyright message to use in the
+ licence headers, usually in the form of
+ "Copyright 2008 Foo"
+ -d,--dir Used to indicate source when using
+ --exclude
+ -E,--exclude-file <fileName> Excludes files matching regular expression
+ in <file> Note that --dir is required when
+ using this parameter.
+ -e,--exclude <expression> Excludes files matching wildcard
+ <expression>. Note that --dir is required
+ when using this parameter. Allows multiple
+ arguments.
+ -f,--force Forces any changes in files to be written
+ directly to the source files (i.e. new
+ files are not created)
+ -h,--help Print help for the Rat command line
+ interface and exit
+ -s,--stylesheet <arg> XSLT stylesheet to use when creating the
+ report. Not compatible with -x
+ -x,--xml Output the report in raw XML format. Not
+ compatible with -s
diff --git a/apache-rat/README.txt b/apache-rat/README.txt
index ab3f289..66cae99 100644
--- a/apache-rat/README.txt
+++ b/apache-rat/README.txt
@@ -10,7 +10,7 @@
java -jar apache-rat-${project.version}.jar --help
-For more details, please see the website:
+For more details, please see the file README-CLI.txt or the website:
http://creadur.apache.org/rat/apache-rat/index.html
@@ -21,6 +21,6 @@
ant -lib apache-rat-${project.version}.jar ...
-For more details, please see the website:
+For more details, please see the file README-ANT.txt or the website:
http://creadur.apache.org/rat/apache-rat-tasks/index.html
\ No newline at end of file
diff --git a/apache-rat/src/main/assembly/bin.xml b/apache-rat/src/main/assembly/bin.xml
index 0e6e0a1..21c9fa9 100644
--- a/apache-rat/src/main/assembly/bin.xml
+++ b/apache-rat/src/main/assembly/bin.xml
@@ -42,7 +42,7 @@
<fileSet>
<filtered>true</filtered>
<includes>
- <include>README.txt</include>
+ <include>README*.txt</include>
</includes>
</fileSet>
<!-- The combined CLI jar we built earlier -->