Claudenw commented on code in PR #233:
URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1566000528


##########
src/site/apt/license_def.apt.vm:
##########
@@ -0,0 +1,143 @@
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~   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.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+                   --------------------------
+                   How to define new licenses
+                   --------------------------
+
+How to define licenses in Apache Rat
+
+ All licenses in Apache Rat are defined in configuration files.  There is a 
default 
+ 
{{{https://github.com/apache/creadur-rat/blob/master/apache-rat-core/src/main/resources/org/apache/rat/default.xml}
+ XML based configuration file}} that can server as a good example of various 
definitions.
+
+ It is possible to create new parsers for different configuration formats.  
But that task is beyone the 
+ scope of this document.  In this document we will address how to define 
licenses in the default XML format.
+ 
+ The XML document has a root node named "rat-config" which comprises 4 major 
sections: "Families", 
+ "Licenses", "Approved" and "Matchers".
+ 
+* Families
+ 
+ Families are groups that define licenses that share similarities.  Each 
family has an id and a name, and example
+ of an entry in this section is
+ 
++------------------------------------------+
+ <rat-config>
+    <families>
+        <family id="AL" name="Apache License Version 2.0" />
+    </families>
+ </rat-config>
++------------------------------------------+
+ 
+* Matchers
+
+ Matchers define tests that check the contents of files for specific patterns. 
 Matchers are defined in Java
+ code and are required to have Builder classes that build them.  There is 
{{{./matcher_def.html}additional documentation 
+ explaining how to create new Matchers}}.  In the XML document Matchers are 
identified by the "matcher" element that has
+ a single "class" property.  The value of the "class" property is the fully 
qualified class name that 
+ identifies a Builder class.  An example of a matchers entry is
+ 
++------------------------------------------+
+ <rat-config>
+    <matchers>
+        <matcher class="org.apache.rat.configuration.builders.AnyBuilder" />
+        <matcher class="org.apache.rat.configuration.builders.SpdxBuilder" />
+        <matcher class="org.apache.rat.configuration.builders.TextBuilder" />
+    </matcher>
+ </rat-config>
++------------------------------------------+
+ 
+* Licenses
+
+ License elements have three properties: "family", "id", and "name". The 
family property must refer to
+ the "id" of a family element.  The family element can be defined in the 
current document or in another
+ included document.  It has to exist by the time all the configuration files 
are read.  The "id" element
+ is optional, if it is not provided the id will be set to the id of the 
associated family.  However, the 
+ "id" property must be unique across all licenses.  The "name" property is 
also optional.  If not specified
+ the name of the associated family will be used.  It is recommened that each 
license have a unique name

Review Comment:
   "license have" is the future perfect tense (I think that is what it is 
called. "license has" would be past perfect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to