incubator-rat-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r636144 [1/7] - in /incubator/rat/import: ./ rat/ rat/src/ rat/src/java/ rat/src/java/rat/ rat/src/java/rat/analysis/ rat/src/java/rat/analysis/generation/ rat/src/java/rat/analysis/license/ rat/src/java/rat/analysis/util/ rat/src/java/rat/...
Date Tue, 11 Mar 2008 23:09:27 GMT
Author: rdonkin
Date: Tue Mar 11 16:08:58 2008
New Revision: 636144

URL: http://svn.apache.org/viewvc?rev=636144&view=rev
Log:
Intial import to staging directory

Added:
    incubator/rat/import/
    incubator/rat/import/rat/
    incubator/rat/import/rat/LICENSE.txt
    incubator/rat/import/rat/NOTICE.txt
    incubator/rat/import/rat/RELEASE_NOTES.txt
    incubator/rat/import/rat/ant-task-examples.xml   (with props)
    incubator/rat/import/rat/build.xml
    incubator/rat/import/rat/pom.xml
    incubator/rat/import/rat/src/
    incubator/rat/import/rat/src/java/
    incubator/rat/import/rat/src/java/rat/
    incubator/rat/import/rat/src/java/rat/Defaults.java   (with props)
    incubator/rat/import/rat/src/java/rat/DirectoryWalker.java
    incubator/rat/import/rat/src/java/rat/FileNameComparator.java
    incubator/rat/import/rat/src/java/rat/Report.java
    incubator/rat/import/rat/src/java/rat/ReportFailedRuntimeException.java
    incubator/rat/import/rat/src/java/rat/ReportTransformer.java
    incubator/rat/import/rat/src/java/rat/analysis/
    incubator/rat/import/rat/src/java/rat/analysis/Claims.java
    incubator/rat/import/rat/src/java/rat/analysis/IHeaderMatcher.java
    incubator/rat/import/rat/src/java/rat/analysis/RatHeaderAnalysisException.java
    incubator/rat/import/rat/src/java/rat/analysis/generation/
    incubator/rat/import/rat/src/java/rat/analysis/generation/GeneratedLicenseNotRequired.java
    incubator/rat/import/rat/src/java/rat/analysis/generation/JavaDocLicenseNotRequired.java
    incubator/rat/import/rat/src/java/rat/analysis/license/
    incubator/rat/import/rat/src/java/rat/analysis/license/ApacheSoftwareLicense20.java
    incubator/rat/import/rat/src/java/rat/analysis/license/BaseLicense.java
    incubator/rat/import/rat/src/java/rat/analysis/license/DojoLicenseHeader.java
    incubator/rat/import/rat/src/java/rat/analysis/license/OASISLicense.java
    incubator/rat/import/rat/src/java/rat/analysis/license/TMF854LicenseHeader.java
    incubator/rat/import/rat/src/java/rat/analysis/license/W3CDocLicense.java
    incubator/rat/import/rat/src/java/rat/analysis/license/W3CLicense.java
    incubator/rat/import/rat/src/java/rat/analysis/util/
    incubator/rat/import/rat/src/java/rat/analysis/util/HeaderMatcherMultiplexer.java
    incubator/rat/import/rat/src/java/rat/anttasks/
    incubator/rat/import/rat/src/java/rat/anttasks/Report.java   (with props)
    incubator/rat/import/rat/src/java/rat/anttasks/ResourceCollectionContainer.java   (with props)
    incubator/rat/import/rat/src/java/rat/anttasks/antlib.xml   (with props)
    incubator/rat/import/rat/src/java/rat/document/
    incubator/rat/import/rat/src/java/rat/document/CompositeDocumentException.java
    incubator/rat/import/rat/src/java/rat/document/DocumentUtils.java
    incubator/rat/import/rat/src/java/rat/document/IDocument.java
    incubator/rat/import/rat/src/java/rat/document/IDocumentAnalyser.java
    incubator/rat/import/rat/src/java/rat/document/IDocumentCollection.java
    incubator/rat/import/rat/src/java/rat/document/IDocumentMatcher.java
    incubator/rat/import/rat/src/java/rat/document/IFileUnarchiver.java
    incubator/rat/import/rat/src/java/rat/document/IResource.java
    incubator/rat/import/rat/src/java/rat/document/RatDocumentAnalysisException.java
    incubator/rat/import/rat/src/java/rat/document/ToNameTransformer.java
    incubator/rat/import/rat/src/java/rat/document/UnreadableArchiveException.java
    incubator/rat/import/rat/src/java/rat/document/UnsuitableDocumentException.java
    incubator/rat/import/rat/src/java/rat/document/impl/
    incubator/rat/import/rat/src/java/rat/document/impl/CompositeDocument.java
    incubator/rat/import/rat/src/java/rat/document/impl/DocumentImplUtils.java
    incubator/rat/import/rat/src/java/rat/document/impl/FileDocument.java
    incubator/rat/import/rat/src/java/rat/document/impl/MonolithicFileDocument.java
    incubator/rat/import/rat/src/java/rat/document/impl/guesser/
    incubator/rat/import/rat/src/java/rat/document/impl/guesser/ArchiveGuesser.java
    incubator/rat/import/rat/src/java/rat/document/impl/guesser/BinaryGuesser.java
    incubator/rat/import/rat/src/java/rat/document/impl/guesser/GuessUtils.java
    incubator/rat/import/rat/src/java/rat/document/impl/guesser/NoteGuesser.java
    incubator/rat/import/rat/src/java/rat/document/impl/util/
    incubator/rat/import/rat/src/java/rat/document/impl/util/ConditionalAnalyser.java
    incubator/rat/import/rat/src/java/rat/document/impl/util/DocumentAnalyserMultiplexer.java
    incubator/rat/import/rat/src/java/rat/document/impl/util/DocumentMatcherMultiplexer.java
    incubator/rat/import/rat/src/java/rat/document/impl/util/MatchNegator.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipDirectory.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipDocument.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipDocumentCollection.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipDocumentFactory.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipFileDocument.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipFileUnarchiver.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipRootDirectory.java
    incubator/rat/import/rat/src/java/rat/document/impl/zip/ZipUtils.java
    incubator/rat/import/rat/src/java/rat/document/report/
    incubator/rat/import/rat/src/java/rat/document/report/impl/
    incubator/rat/import/rat/src/java/rat/element/
    incubator/rat/import/rat/src/java/rat/element/comparator/
    incubator/rat/import/rat/src/java/rat/element/visitor/
    incubator/rat/import/rat/src/java/rat/engine/
    incubator/rat/import/rat/src/java/rat/engine/component/
    incubator/rat/import/rat/src/java/rat/entry/
    incubator/rat/import/rat/src/java/rat/glue/
    incubator/rat/import/rat/src/java/rat/header/
    incubator/rat/import/rat/src/java/rat/header/ArrayCharFilter.java
    incubator/rat/import/rat/src/java/rat/header/CharFilter.java
    incubator/rat/import/rat/src/java/rat/header/FilteringSequenceFactory.java
    incubator/rat/import/rat/src/java/rat/header/HeaderBean.java
    incubator/rat/import/rat/src/java/rat/header/HeaderMatcher.java
    incubator/rat/import/rat/src/java/rat/license/
    incubator/rat/import/rat/src/java/rat/license/AcademicFree21LicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/Apache20LicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/ILicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/ModifiedBSDLicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/OASISLicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/W3CDocumentLicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/W3CSoftwareLicenseFamily.java
    incubator/rat/import/rat/src/java/rat/license/util/
    incubator/rat/import/rat/src/java/rat/plain-rat.xsl
    incubator/rat/import/rat/src/java/rat/policy/
    incubator/rat/import/rat/src/java/rat/policy/DefaultPolicy.java
    incubator/rat/import/rat/src/java/rat/report/
    incubator/rat/import/rat/src/java/rat/report/IReportable.java
    incubator/rat/import/rat/src/java/rat/report/RatReport.java
    incubator/rat/import/rat/src/java/rat/report/RatReportFailedException.java
    incubator/rat/import/rat/src/java/rat/report/analyser/
    incubator/rat/import/rat/src/java/rat/report/analyser/AbstractSingleClaimAnalyser.java
    incubator/rat/import/rat/src/java/rat/report/analyser/ConstantClaimAnalyser.java
    incubator/rat/import/rat/src/java/rat/report/analyser/DefaultAnalyserFactory.java
    incubator/rat/import/rat/src/java/rat/report/analyser/DocumentHeaderAnalyser.java
    incubator/rat/import/rat/src/java/rat/report/analyser/HeaderCheckWorker.java
    incubator/rat/import/rat/src/java/rat/report/analyser/RatReportAnalysisResultException.java
    incubator/rat/import/rat/src/java/rat/report/analyser/ReadableArchiveAnalyser.java
    incubator/rat/import/rat/src/java/rat/report/claim/
    incubator/rat/import/rat/src/java/rat/report/claim/IClaimReporter.java
    incubator/rat/import/rat/src/java/rat/report/claim/impl/
    incubator/rat/import/rat/src/java/rat/report/claim/impl/xml/
    incubator/rat/import/rat/src/java/rat/report/claim/impl/xml/SimpleXmlClaimReporter.java
    incubator/rat/import/rat/src/java/rat/report/claim/util/
    incubator/rat/import/rat/src/java/rat/report/claim/util/ClaimReporterMultiplexer.java
    incubator/rat/import/rat/src/java/rat/report/impl/
    incubator/rat/import/rat/src/java/rat/report/text/
    incubator/rat/import/rat/src/java/rat/report/xml/
    incubator/rat/import/rat/src/java/rat/report/xml/XmlReport.java
    incubator/rat/import/rat/src/java/rat/report/xml/XmlReportFactory.java
    incubator/rat/import/rat/src/java/rat/report/xml/visitor/
    incubator/rat/import/rat/src/java/rat/report/xml/visitor/report/
    incubator/rat/import/rat/src/java/rat/report/xml/visitor/report/archive/
    incubator/rat/import/rat/src/java/rat/report/xml/visitor/report/license/
    incubator/rat/import/rat/src/java/rat/report/xml/writer/
    incubator/rat/import/rat/src/java/rat/report/xml/writer/IXmlWriter.java
    incubator/rat/import/rat/src/java/rat/report/xml/writer/InvalidXmlException.java
    incubator/rat/import/rat/src/java/rat/report/xml/writer/OperationNotAllowedException.java
    incubator/rat/import/rat/src/java/rat/report/xml/writer/XmlWriterUtils.java
    incubator/rat/import/rat/src/java/rat/report/xml/writer/impl/
    incubator/rat/import/rat/src/java/rat/report/xml/writer/impl/base/
    incubator/rat/import/rat/src/java/rat/report/xml/writer/impl/base/XmlWriter.java
    incubator/rat/import/rat/src/python/
    incubator/rat/import/rat/src/python/recursive-rat.py
    incubator/rat/import/rat/src/style/
    incubator/rat/import/rat/src/test/
    incubator/rat/import/rat/src/test/antunit/
    incubator/rat/import/rat/src/test/antunit/report-bad-configurations.xml   (with props)
    incubator/rat/import/rat/src/test/antunit/report-normal-operation.xml   (with props)
    incubator/rat/import/rat/src/test/artifacts/
    incubator/rat/import/rat/src/test/artifacts/dummy.tar.gz   (with props)
    incubator/rat/import/rat/src/test/binaries/
    incubator/rat/import/rat/src/test/binaries/Image-png.not   (with props)
    incubator/rat/import/rat/src/test/elements/
    incubator/rat/import/rat/src/test/elements/Image.png   (with props)
    incubator/rat/import/rat/src/test/elements/LICENSE
    incubator/rat/import/rat/src/test/elements/NOTICE
    incubator/rat/import/rat/src/test/elements/Source.java
    incubator/rat/import/rat/src/test/elements/Text.txt
    incubator/rat/import/rat/src/test/elements/Xml.xml
    incubator/rat/import/rat/src/test/elements/dummy.jar   (with props)
    incubator/rat/import/rat/src/test/elements/sub/
    incubator/rat/import/rat/src/test/elements/sub/Empty.txt
    incubator/rat/import/rat/src/test/javadocs/
    incubator/rat/import/rat/src/test/javadocs/ArchiveElement.html
    incubator/rat/import/rat/src/test/javadocs/index.html
    incubator/rat/import/rat/src/test/javadocs/notjavadoc.html
    incubator/rat/import/rat/src/test/rat/
    incubator/rat/import/rat/src/test/rat/FileNameComparatorTest.java
    incubator/rat/import/rat/src/test/rat/ReportTest.java
    incubator/rat/import/rat/src/test/rat/ReportTransformerTest.java
    incubator/rat/import/rat/src/test/rat/analysis/
    incubator/rat/import/rat/src/test/rat/analysis/MockLicenseMatcher.java
    incubator/rat/import/rat/src/test/rat/analysis/generation/
    incubator/rat/import/rat/src/test/rat/analysis/generation/GeneratedLicenseNotRequiredTest.java
    incubator/rat/import/rat/src/test/rat/analysis/generation/JavaDocLicenseNotRequiredTest.java
    incubator/rat/import/rat/src/test/rat/analysis/license/
    incubator/rat/import/rat/src/test/rat/analysis/license/ApacheSoftwareLicense20Test.java
    incubator/rat/import/rat/src/test/rat/analysis/license/MockStandardLicense.java
    incubator/rat/import/rat/src/test/rat/analysis/license/OASISLicenseTest.java
    incubator/rat/import/rat/src/test/rat/analysis/license/W3CLicenseTest.java
    incubator/rat/import/rat/src/test/rat/analysis/util/
    incubator/rat/import/rat/src/test/rat/analysis/util/MatcherMultiplexerTest.java
    incubator/rat/import/rat/src/test/rat/document/
    incubator/rat/import/rat/src/test/rat/document/DocumentUtilsTest.java
    incubator/rat/import/rat/src/test/rat/document/MockArchiveDocument.java
    incubator/rat/import/rat/src/test/rat/document/MockDocument.java
    incubator/rat/import/rat/src/test/rat/document/MockDocumentAnalyser.java
    incubator/rat/import/rat/src/test/rat/document/MockDocumentCollection.java
    incubator/rat/import/rat/src/test/rat/document/MockDocumentMatcher.java
    incubator/rat/import/rat/src/test/rat/document/MockLocation.java
    incubator/rat/import/rat/src/test/rat/document/ToNameTransformerTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/
    incubator/rat/import/rat/src/test/rat/document/impl/SingularFileDocumentTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/guesser/
    incubator/rat/import/rat/src/test/rat/document/impl/guesser/ArchiveGuesserTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/guesser/BinaryGuesserTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/guesser/GuessUtilsTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/guesser/NoteGuesserTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/util/
    incubator/rat/import/rat/src/test/rat/document/impl/util/ConditionalAnalyserTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentAnalyserMultiplexerTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/util/DocumentMatcherMultiplexerTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/util/MatchNegatorTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/zip/
    incubator/rat/import/rat/src/test/rat/document/impl/zip/ZipDirectoryTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/zip/ZipDocumentFactoryTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/zip/ZipDocumentTest.java
    incubator/rat/import/rat/src/test/rat/document/impl/zip/ZipUtilsTest.java
    incubator/rat/import/rat/src/test/rat/document/report/
    incubator/rat/import/rat/src/test/rat/document/report/impl/
    incubator/rat/import/rat/src/test/rat/element/
    incubator/rat/import/rat/src/test/rat/element/comparator/
    incubator/rat/import/rat/src/test/rat/element/visitor/
    incubator/rat/import/rat/src/test/rat/engine/
    incubator/rat/import/rat/src/test/rat/header/
    incubator/rat/import/rat/src/test/rat/header/ArrayCharFilterTest.java
    incubator/rat/import/rat/src/test/rat/header/FilteringSequenceFactoryTest.java
    incubator/rat/import/rat/src/test/rat/header/HeaderMatcherTest.java
    incubator/rat/import/rat/src/test/rat/header/HeaderMatcherWithBeansTest.java
    incubator/rat/import/rat/src/test/rat/header/SimpleCharFilter.java
    incubator/rat/import/rat/src/test/rat/license/
    incubator/rat/import/rat/src/test/rat/license/util/
    incubator/rat/import/rat/src/test/rat/policy/
    incubator/rat/import/rat/src/test/rat/policy/DefaultPolicyTest.java
    incubator/rat/import/rat/src/test/rat/report/
    incubator/rat/import/rat/src/test/rat/report/analyser/
    incubator/rat/import/rat/src/test/rat/report/analyser/AnalyserFactoryTest.java
    incubator/rat/import/rat/src/test/rat/report/analyser/ConstantClaimAnalyserTest.java
    incubator/rat/import/rat/src/test/rat/report/analyser/HeaderCheckWorkerTest.java
    incubator/rat/import/rat/src/test/rat/report/analyser/ReadableArchiveAnalyserAnalyseTest.java
    incubator/rat/import/rat/src/test/rat/report/analyser/ReadableArchiveAnalyserTest.java
    incubator/rat/import/rat/src/test/rat/report/claim/
    incubator/rat/import/rat/src/test/rat/report/claim/impl/
    incubator/rat/import/rat/src/test/rat/report/claim/impl/xml/
    incubator/rat/import/rat/src/test/rat/report/claim/impl/xml/MockClaimReporter.java
    incubator/rat/import/rat/src/test/rat/report/claim/impl/xml/SimpleXmlClaimReporterTest.java
    incubator/rat/import/rat/src/test/rat/report/claim/util/
    incubator/rat/import/rat/src/test/rat/report/claim/util/ClaimReporterMultiplexerTest.java
    incubator/rat/import/rat/src/test/rat/report/xml/
    incubator/rat/import/rat/src/test/rat/report/xml/MockXmlWriter.java
    incubator/rat/import/rat/src/test/rat/report/xml/XmlReportFactoryTest.java
    incubator/rat/import/rat/src/test/rat/report/xml/XmlReportTest.java
    incubator/rat/import/rat/src/test/rat/report/xml/XmlUtils.java
    incubator/rat/import/rat/src/test/rat/report/xml/visitor/
    incubator/rat/import/rat/src/test/rat/report/xml/visitor/report/
    incubator/rat/import/rat/src/test/rat/report/xml/visitor/report/archive/
    incubator/rat/import/rat/src/test/rat/report/xml/visitor/report/license/
    incubator/rat/import/rat/src/test/rat/report/xml/writer/
    incubator/rat/import/rat/src/test/rat/report/xml/writer/XmlWriterUtilsTest.java
    incubator/rat/import/rat/src/test/rat/report/xml/writer/impl/
    incubator/rat/import/rat/src/test/rat/report/xml/writer/impl/base/
    incubator/rat/import/rat/src/test/rat/report/xml/writer/impl/base/XmlWriterTest.java
    incubator/rat/import/rat/src/test/rat/test/
    incubator/rat/import/rat/src/test/rat/test/utils/
    incubator/rat/import/rat/src/test/rat/test/utils/RATCase.java
    incubator/rat/import/rat/src/test/violations/
    incubator/rat/import/rat/src/test/violations/bad.txt

Added: incubator/rat/import/rat/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/LICENSE.txt?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/LICENSE.txt (added)
+++ incubator/rat/import/rat/LICENSE.txt Tue Mar 11 16:08:58 2008
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
\ No newline at end of file

Added: incubator/rat/import/rat/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/NOTICE.txt?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/NOTICE.txt (added)
+++ incubator/rat/import/rat/NOTICE.txt Tue Mar 11 16:08:58 2008
@@ -0,0 +1,7 @@
+=========================================================================
+==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
+==  Version 2.0.                                                       ==
+=========================================================================
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file

Added: incubator/rat/import/rat/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/RELEASE_NOTES.txt?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/RELEASE_NOTES.txt (added)
+++ incubator/rat/import/rat/RELEASE_NOTES.txt Tue Mar 11 16:08:58 2008
@@ -0,0 +1,87 @@
+                            Release Audit Tool
+                            ==================
+      
+Release Audit Tool (RAT) is a tool to improve accuracy and efficiency when checking
+releases. It is heuristic in nature: making guesses about possible problems. It
+will produce false positives and cannot find every possible issue with a release.
+It's reports require interpretation.
+
+RAT was developed in response to a need felt in the Apache Incubator to be able to
+review releases for the most common faults less labour intensively. It is therefore
+highly tuned to the Apache style of releases.
+
+RAT is intended to be self documenting: reports should include introductory material
+describing their function. Building RAT describes how to run RAT. Running RAT 
+describes the options available. These release notes describe the current state of
+RAT.
+
+A good way to use RAT is to through the source. This allows the code base to be
+easily patched for example to add new generated file matchers. The main jar is 
+runnable and self-documenting. This jar is available as a standard alone binary.
+
+RAT includes a task library for Ant 1.7. This allows RAT reports to be run against
+a wide variety of resources. See ant-task-examples.xml. To use the Ant tasks, 
+Apache Ant 1.7 is required. See http://ant.apache.org/.
+
+Projects using Maven are directed to the RAT plugin 
+http://mojo.codehaus.org/rat-maven-plugin.
+
+In response to demands from project quality tool developers, RAT is available as a 
+library (rat-lib jar) suitable for inclusion in tools. Note that binary compatibility 
+is not gauranteed between 0.x releases. The XML output format is not yet in it's 
+final form and so library users are recommended to either use the supplied 
+stylesheets or keep in close touch with the code.
+
+RAT is kindly hosted by googlecode: http://code.google.com/p/arat/. Read (even) more
+on http://groups.google.com/group/discuss-a-release-audit-tool. 
+
+Artifacts
+=========
+ rat-0.5.1.jar combines the application (java -jar rat-0.5.1.jar) and Antlib 
+ rat-lib-0.5.1.jar is a library distribution aimed at tool makers
+
+ * Support for TMF header
+ * Comprehend PEM, CRL file endings
+
+After 0.5.1
+===========
+ * Added reporting capability to recursive rat script
+
+RAT 0.5.1
+=========
+ * Fixed file closing bug
+ * Fixed XML bad character bug
+ 
+RAT 0.5
+=======
+ * Added header matcher for DoJo.
+ * Refactoring existing codebase to separate concerns and use 
+   resource pipeline.
+ * New header matching library.
+
+RAT 0.4.1
+=========
+RAT 0.4.1 is the first release with distributions. The release was cut
+for this purpose. 
+
+RAT 0.4.1 Notes
+===============
+ * Created POM for use with RAT library.
+ * Ant task switched to use Xml based report.
+
+RAT 0.4 Notes
+=============
+ * Ant tasks added. These allow RAT reports to be run against a wide variety
+   of resources from within Ant.
+ * Legacy report is now deprecated. It will be removed before the next release.
+ * Created stylesheet for xml reports which produce output similar to the legacy 
+   plain text report. Application now uses the xml report with that stylesheet.
+ * Revised xml output format
+ * Improve support for binary recognition by adding code that tastes files
+
+RAT 0.3 Notes
+=============
+ * This is the last release with the original hacked together plain test report. 
+   The new XML reporting code is present but is not yet the default.
+ * RAT 0.3 is the first release with release notes. All previous releases are
+   now consigned to Ancient History. No record of them will be found here.
\ No newline at end of file

Added: incubator/rat/import/rat/ant-task-examples.xml
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/ant-task-examples.xml?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/ant-task-examples.xml (added)
+++ incubator/rat/import/rat/ant-task-examples.xml Tue Mar 11 16:08:58 2008
@@ -0,0 +1,85 @@
+<?xml version='1.0'?>
+<!--
+
+ Licensed 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.
+
+-->
+
+<project default="javasources" name="Ant task examples">
+  <description>
+    A few examples of using the Ant task, for more examples see the AntUnit tests
+  </description>
+
+  <target name="javasources" depends="-taskdef"
+    description="runs the tasks over src/java excluding the license directory">
+    <rat:report xmlns:rat="antlib:rat.anttasks">
+      <fileset dir="src/java">
+        <exclude name="rat/license/"/>
+      </fileset>
+    </rat:report>
+  </target>
+
+  <target name="jar" depends="-taskdef"
+    description="runs the task over rat-0.3.jar">
+    <rat:report xmlns:rat="antlib:rat.anttasks">
+      <zipfileset src="rat-0.3.jar"/>
+    </rat:report>
+  </target>
+
+  <target name="tarball" depends="-taskdef"
+    description="creates a tarball of rat's source tree and runs the task over the tarball">
+    <tar destfile="ratsrc.tar.gz" compression="gzip">
+      <fileset dir="src/java"/>
+    </tar>
+    <rat:report xmlns:rat="antlib:rat.anttasks">
+      <tarfileset>
+        <gzipresource>
+          <file file="ratsrc.tar.gz"/>
+        </gzipresource>
+      </tarfileset>
+    </rat:report>
+    <delete file="ratsrc.tar.gz"/>
+  </target>
+
+  <target name="javasources-w3c" depends="-taskdef"
+    description="runs the tasks over src/java accepting only the W3C license">
+    <rat:report xmlns:rat="antlib:rat.anttasks"
+      addDefaultLicenseMatchers="false">
+      <fileset dir="src/java"/>
+
+      <rat:w3c/>
+
+    </rat:report>
+  </target>
+
+  <target name="url" depends="-taskdef"
+    description="runs the task on the ASF's homepage">
+    <rat:report xmlns:rat="antlib:rat.anttasks">
+      <url url="http://www.apache.org/"/>
+    </rat:report>
+  </target>
+
+  <target name="run-on-rat" depends="-taskdef">
+    <rat:report xmlns:rat="antlib:rat.anttasks">
+      <fileset dir="."/>
+    </rat:report>
+  </target>
+
+  <target name="-taskdef">
+    <typedef resource="rat/anttasks/antlib.xml" uri="antlib:rat.anttasks">
+      <classpath>
+        <fileset dir="." includes="rat*.jar"/>
+      </classpath>
+    </typedef>
+  </target>
+</project>
\ No newline at end of file

Propchange: incubator/rat/import/rat/ant-task-examples.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rat/import/rat/build.xml
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/build.xml?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/build.xml (added)
+++ incubator/rat/import/rat/build.xml Tue Mar 11 16:08:58 2008
@@ -0,0 +1,287 @@
+<?xml version='1.0'?>
+<!--
+
+ Copyright 2006-2007 Robert Burrell Donkin
+
+ Licensed 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.
+
+-->
+
+<project name='RAT' default='build' >
+        <property name='src' value='src/java'/>
+        <property name='src.tests' value='src/test'/>
+    <property name='build.base' value='target'/>
+    <property name='build.lib' value='lib'/>
+        <property name='bin' value='${build.base}/classes'/>
+        <property name='bin.doc' value='${build.base}/docs'/>
+        <property name='bin.test' value='${build.base}/test-classes'/>
+        <property name='minor.version' value='0.5'/>
+        <property name='point.version' value='2-SNAPSHOT'/>
+        <property name='version' value='${minor.version}.${point.version}'/>
+        <property name='vendor.name' value='aRAT'/>
+        <property name='vendor.id' value='code.google.com/p/arat'/>
+        <property name='jar.name' value='rat-${version}.jar'/>
+        <property name='lib.jar.name' value='rat-lib-${version}.jar'/>
+        <property name='lib.all.jar.name' value='rat-lib-all-${version}.jar'/>
+	    <property name='src.dist.prefix' value='rat-${version}-src'/>
+        <property name='main-class' value='rat.Report'/>
+        <property name='bin.meta' value='${bin}/META-INF'/>
+        <available property='Ant-1.7.0-or-later'
+                   classname='org.apache.tools.ant.types.ResourceCollection'/>
+
+    <property name='commons.lang.jar' value='commons-lang-2.1.jar'/>
+    <property name='commons.lang.url' value='http://repo1.maven.org/maven2/commons-lang/commons-lang/2.1/commons-lang-2.1.jar'/>
+        <property name='commons.collections.jar' value='commons-collections-3.2.jar'/>
+        <property name='commons.collections.url' value='http://repo1.maven.org/maven2/commons-collections/commons-collections/3.2/commons-collections-3.2.jar'/>
+        <property name='junit.jar' value='junit-3.8.2.jar'/>
+        <property name='junit.url' value='http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar'/>
+    <property name='ant.jar' value='ant-1.7.0.jar'/>
+    <property name='ant.url' value='http://repo1.maven.org/maven2/org/apache/ant/ant/1.7.0/ant-1.7.0.jar'/>
+    <property name='ant.launcher.jar' value='ant-launcher-1.7.0.jar'/>
+    <property name='ant.launcher.url' value='http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar'/>
+
+        <available property='commons.lang.available' file='${build.lib}/${commons.lang.jar}'/>
+    <available property='commons.collections.available' file='${build.lib}/${commons.collections.jar}'/>
+    <available property='junit.available' file='${build.lib}/${junit.jar}'/>
+        <condition property="ant.available">
+                <and>
+            <available file='${build.lib}/${ant.jar}'/>
+            <available file='${build.lib}/${ant.launcher.jar}'/>
+            </and>
+        </condition>
+
+	<condition property="running.windows">
+		<os family="windows"/>
+	</condition>
+
+    <zipfileset id="src.files" prefix="${src.dist.prefix}" dir="${basedir}">
+       <include name="LICENSE.txt"/>
+       <include name="NOTICE.txt"/>
+       <include name="RELEASE_NOTES.txt"/>
+       <include name="ant-task-examples.xml"/>
+       <include name="build.xml"/>
+       <include name="pom.xml"/>
+       <include name="src/**/*"/>
+    </zipfileset>
+
+    <target name='setup.proxy' if='http.proxyHost'>
+        <setproxy proxyhost='${http.proxyHost}' proxyport='${http.proxyPort}'
+                proxyuser='${http.proxyUser}' proxypassword='${http.proxyPassword}'/>
+        </target>
+
+        <macrodef name='download'>
+                <attribute name='jar'/>
+                <attribute name='url'/>
+                <sequential>
+                <mkdir dir='${build.lib}'/>
+            <get dest='${build.lib}/@{jar}' src='@{url}'/>
+                </sequential>
+        </macrodef>
+
+        <target name='commons.lang.download' unless='commons.lang.available'>
+                <download jar='${commons.lang.jar}' url='${commons.lang.url}'/>
+        </target>
+
+    <target name='commons.collections.download' unless='commons.collections.available'>
+        <download jar='${commons.collections.jar}' url='${commons.collections.url}'/>
+        </target>
+
+    <target name='junit.download' unless='junit.available'>
+        <download jar='${junit.jar}' url='${junit.url}'/>
+    </target>
+
+    <target name='ant.download' unless='ant.available'>
+        <download jar='${ant.jar}' url='${ant.url}'/>
+        <download jar='${ant.launcher.jar}' url='${ant.launcher.url}'/>
+    </target>
+
+    <target name='prerequisites' depends='setup.proxy,commons.lang.download,commons.collections.download,junit.download,ant.download'/>
+        
+        <target name='clean'>
+                <delete dir='${build.base}'/>
+                <mkdir dir='${build.base}'/>
+                <mkdir dir='${bin}'/>
+                <mkdir dir='${bin.test}'/>
+                <mkdir dir='${bin.doc}'/>
+                <delete file='${jar.name}'/>
+                <delete file='${lib.jar.name}'/>
+                <delete file='${src.dist.prefix}.zip'/>   
+                <delete file='${src.dist.prefix}.tar.gz'/>
+                <delete file='${src.dist.prefix}.tar.bz2'/>   
+                <delete file='${lib.all.jar.name}'/>
+        </target>
+
+        <target name='manifest'>
+
+        </target>
+
+        <target name='compile' depends='prerequisites'>
+        <path id='rat.compile.path'>
+            <pathelement location='${build.lib}/${commons.collections.jar}'/>
+            <pathelement location='${build.lib}/${commons.lang.jar}'/>
+            <pathelement location='${build.lib}/${ant.jar}'/>
+            <pathelement location='${build.lib}/${ant.launcher.jar}'/>
+        </path>
+                <mkdir dir='${bin}'/>
+                <javac srcdir="${src}" destdir="${bin}" source="1.4"
+                       target="1.4" debug="on" classpathref="rat.compile.path"/>
+                <mkdir dir='${bin.meta}' />
+                <copy file="LICENSE.txt" todir="${bin.meta}" />
+                <copy file="NOTICE.txt" todir="${bin.meta}" />
+                <copy todir="${bin}">
+                        <fileset dir="${src}" includes="**/antlib.xml" />
+                        <fileset dir="${src}" includes="**/*.xsl" />
+                </copy>
+        </target>
+
+        <target name='compile-tests' depends='compile'>
+            <path id='rat.test.path'>
+                <path refid='rat.compile.path'/>
+                <pathelement location='${build.lib}/${junit.jar}'/>
+            </path>
+                <mkdir dir='${bin.test}'/>
+                <javac srcdir="${src.tests}" destdir="${bin.test}" source="1.4"
+                       target="1.4" debug="on" classpath="${bin}" classpathref="rat.test.path"/>
+        </target>
+        
+        <target name='run-unit-tests' depends='compile-tests'>
+                <junit printsummary='true' haltonfailure='true'>
+                        <classpath>
+                                <pathelement location='${bin}'/>
+                                <pathelement location='${bin.test}'/>
+                                <path refid='rat.test.path'/>
+                        </classpath>
+                        <batchtest>
+                                <fileset dir='${bin.test}'>
+                                        <include name='**/*Test.class'/>
+                                </fileset>
+                        </batchtest>
+                        <formatter type="brief" usefile="false"/>
+                </junit>
+        </target>
+
+	    <target name="runAntWin" if="running.windows">
+	    	<macrodef name="runAnt">
+	    		<attribute name="buildfile"/>
+	    		<sequential>
+	                <exec executable="cmd">
+	                	<arg value="/c"/>
+	                	<arg file="${ant.home}/bin/ant.bat"/>
+	                    <arg value="-buildfile"/>
+	                    <arg value="@{buildfile}"/>
+	                    <arg value="-lib"/>
+	                    <arg value="${jar.name}"/>
+	                </exec>
+	    	    </sequential>
+	    	</macrodef>
+	    </target>
+
+        <target name="runAntNonWin" unless="running.windows">
+            <macrodef name="runAnt">
+                <attribute name="buildfile"/>
+                <sequential>
+                    <exec executable="ant">
+                        <arg value="-buildfile"/>
+                        <arg value="@{buildfile}"/>
+                        <arg value="-lib"/>
+                        <arg value="${jar.name}"/>
+                    </exec>
+                </sequential>
+            </macrodef>
+        </target>
+
+        <target name='run-task-tests' depends='build,runAntWin,runAntNonWin' 
+                if='Ant-1.7.0-or-later' 
+                description='Runs Ant task tests'>
+        	<runAnt buildfile="${src.tests}/antunit/report-bad-configurations.xml"/>
+            <runAnt buildfile="${src.tests}/antunit/report-normal-operation.xml"/>
+        </target>
+        
+        <target name='run-tests' depends='run-unit-tests, run-task-tests'>
+        </target>
+        
+        <target name='javadoc'>
+                <javadoc sourcepath="${src}" packagenames="rat.*" destdir="${bin.doc}">
+                </javadoc>
+        </target>
+
+        <target name='build' depends='compile, manifest'>
+                <jar destfile='${jar.name}' basedir="${bin}">
+                        <manifest>
+                                <attribute name="Main-Class" value="${main-class}"/>
+                                <attribute name="Extension-Name" value="rat"/>
+                                <attribute name="Specification-Title" value="Release Audit Tool"/>
+                                <attribute name="Specification-Vendor" value="${vendor.name}"/>
+                                <attribute name="Specification-Version" value="${minor.version}"/>
+                                <attribute name="Implementation-Vendor-Id" value="${vendor.id}"/>
+                                <attribute name="Implementation-Title" value="Release Audit Tool"/>
+                                <attribute name="Implementation-Vendor" value="${vendor.name}"/>
+                                <attribute name="Implementation-Version" value="${version}"/>
+                        </manifest>
+            <zipfileset src='${build.lib}/${commons.collections.jar}'/>
+            <zipfileset src='${build.lib}/${commons.lang.jar}'/>         
+                </jar>
+                <echo>To run RAT: java -jar ${jar.name} </echo>
+        </target>
+
+        <target name='clean-build' depends='clean, build'/>
+        
+        <target name='dist' description='Please run before checking in' depends='clean,build,run-tests,package'/>
+
+        <target name='package' depends='build'>
+                <jar destfile='${lib.jar.name}'>
+                        <fileset dir='${bin}'>
+                                <exclude name='**/antlib.xml'/>
+                                <exclude name='rat/anttasks/**/*.*'/>
+                                <exclude name='org/apache/commons/**/*.*'/>
+                        </fileset>
+                        <manifest>
+                                <attribute name="Extension-Name" value="rat-lib"/>
+                                <attribute name="Specification-Title" value="Release Audit Tool, Library"/>
+                                <attribute name="Specification-Vendor" value="${vendor.name}"/>
+                                <attribute name="Specification-Version" value="${minor.version}"/>
+                                <attribute name="Implementation-Vendor-Id" value="${vendor.id}"/>
+                                <attribute name="Implementation-Title" value="Release Audit Tool, Library"/>
+                                <attribute name="Implementation-Vendor" value="${vendor.name}"/>
+                                <attribute name="Implementation-Version" value="${version}"/>
+                        </manifest>
+                </jar>
+                <jar destfile='${lib.all.jar.name}'>
+                    <zipfileset src='${lib.jar.name}'/>
+                    <zipfileset src='${build.lib}/${commons.collections.jar}'/>
+                    <zipfileset src='${build.lib}/${commons.lang.jar}'/>
+                    <manifest>
+                            <attribute name="Extension-Name" value="rat-lib"/>
+                            <attribute name="Specification-Title" value="Release Audit Tool, Library"/>
+                            <attribute name="Specification-Vendor" value="${vendor.name}"/>
+                            <attribute name="Specification-Version" value="${minor.version}"/>
+                            <attribute name="Implementation-Vendor-Id" value="${vendor.id}"/>
+                            <attribute name="Implementation-Title" value="Release Audit Tool, Library"/>
+                            <attribute name="Implementation-Vendor" value="${vendor.name}"/>
+                            <attribute name="Implementation-Version" value="${version}"/>
+                    </manifest>
+                </jar>
+
+        	<zip destfile="${src.dist.prefix}.zip">
+        		<zipfileset refid="src.files"/>
+        	</zip>
+
+        	<tar destfile="${src.dist.prefix}.tar.gz" compression="gzip">
+                <zipfileset refid="src.files"/>
+            </tar>
+
+        	<tar destfile="${src.dist.prefix}.tar.bz2" compression="bzip2">
+                <zipfileset refid="src.files"/>
+            </tar>
+        </target>
+</project>
\ No newline at end of file

Added: incubator/rat/import/rat/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/pom.xml?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/pom.xml (added)
+++ incubator/rat/import/rat/pom.xml Tue Mar 11 16:08:58 2008
@@ -0,0 +1,136 @@
+<?xml version='1.0'?>
+<!--
+
+ Copyright 2006-2007 Robert Burrell Donkin
+
+ Licensed 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.
+
+-->
+<!--
+NOTE:
+This pom is provided for meta-data purposes only. 
+RAT cannot be built from this pom.
+-->
+<project 
+	xmlns="http://maven.apache.org/POM/4.0.0" 
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.google.code.p.arat</groupId>
+  <artifactId>rat-lib</artifactId>
+  <packaging>jar</packaging>
+  <version>0.5.2-SNAPSHOT</version>
+  <name>A Release Audit Tool, Library</name>
+  <url>http://code.google.com/p/arat/</url>
+  <description>
+Release Audit Tool (RAT) is a tool to improve accuracy and efficiency when checking
+releases. It is heuristic in nature: making guesses about possible problems. It
+will produce false positives and cannot find every possible issue with a release.
+It's reports require interpretation.
+
+In response to demands from project quality tool developers, RAT is available as a 
+library suitable for inclusion in tools. This POM describes that library.
+Note that binary compatibility is not gauranteed between 0.x releases.
+  </description>
+  <inceptionYear>2006</inceptionYear>
+  <licenses>
+  	<license>
+  		<name>The Apache License Version 2.0</name>
+  		<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+    	<distribution>repo</distribution>
+  	</license>
+  </licenses>
+  <dependencies>
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.2</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.7.0</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>src/java</sourceDirectory>
+    <testSourceDirectory>src/test</testSourceDirectory>
+    <resources>
+      <resource>
+        <directory>src/java</directory>
+        <includes>
+          <include>**/*.xsl</include>
+          <include>**/*.xml</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>${basedir}</directory>
+        <includes>
+          <include>LICENSE.txt</include>
+          <include>NOTICE.txt</include>
+        </includes>
+        <targetPath>META-INF</targetPath>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.4</source>
+          <target>1.4</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.0.3</version>
+      </plugin>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestEntries>
+              <Main-Class>rat.Report</Main-Class>
+              <Extension-Name>rat</Extension-Name>
+              <Specification-Title>Release Audit Tool</Specification-Title>
+              <Specification-Vendor>aRAT</Specification-Vendor>
+              <Specification-Version>${project.version}</Specification-Version>
+              <Implementation-Vendor-Id>code.google.com/p/arat</Implementation-Vendor-Id>
+              <Implementation-Title>Release Audit Tool</Implementation-Title>
+              <Implementation-Vendor>aRAT</Implementation-Vendor>
+              <Implementation-Version>${project.version}</Implementation-Version>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <scm>
+    <connection>scm:svn:http://arat.googlecode.com/svn/trunk/</connection>
+    <developerConnection>scm:svn:https://arat.googlecode.com/svn/trunk/</developerConnection>
+    <url>http://arat.googlecode.com/svn/</url>
+  </scm>
+</project>

Added: incubator/rat/import/rat/src/java/rat/Defaults.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/Defaults.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/Defaults.java (added)
+++ incubator/rat/import/rat/src/java/rat/Defaults.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2006-2007 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat;
+
+import java.io.InputStream;
+
+import rat.analysis.IHeaderMatcher;
+import rat.analysis.generation.GeneratedLicenseNotRequired;
+import rat.analysis.generation.JavaDocLicenseNotRequired;
+import rat.analysis.license.ApacheSoftwareLicense20;
+import rat.analysis.license.DojoLicenseHeader;
+import rat.analysis.license.OASISLicense;
+import rat.analysis.license.TMF854LicenseHeader;
+import rat.analysis.license.W3CDocLicense;
+import rat.analysis.license.W3CLicense;
+import rat.analysis.util.HeaderMatcherMultiplexer;
+
+
+
+/**
+ * Utility class that holds constants shared by the CLI tool and the Ant tasks.
+ */
+public class Defaults {
+    /** no instances */
+    private Defaults() {}
+
+    /**
+     * The standard liest of licenses to include in the reports.
+     */
+    public static final IHeaderMatcher[] DEFAULT_MATCHERS =
+        new IHeaderMatcher[] {
+            new ApacheSoftwareLicense20(),
+            new W3CLicense(), 
+            new W3CDocLicense(), 
+            new OASISLicense(),
+            new JavaDocLicenseNotRequired(), 
+            new GeneratedLicenseNotRequired(),
+            new DojoLicenseHeader(),
+            new TMF854LicenseHeader()
+    };
+    
+    public static final String PLAIN_STYLESHEET = "rat/plain-rat.xsl";
+    
+    public static final InputStream getPlainStyleSheet() {
+        InputStream result = Defaults.class.getClassLoader().getResourceAsStream(Defaults.PLAIN_STYLESHEET);
+        return result;
+    }
+    
+    public static final InputStream getDefaultStyleSheet() {
+        InputStream result = getPlainStyleSheet();
+        return result;
+    }
+    
+    public static final IHeaderMatcher createDefaultMatcher() {
+        return new HeaderMatcherMultiplexer(Defaults.DEFAULT_MATCHERS);
+    }
+}

Propchange: incubator/rat/import/rat/src/java/rat/Defaults.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/rat/import/rat/src/java/rat/DirectoryWalker.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/DirectoryWalker.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/DirectoryWalker.java (added)
+++ incubator/rat/import/rat/src/java/rat/DirectoryWalker.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,126 @@
+/*
+ *     Copyright 2006 Robert Burrell Donkin
+ *  
+ *   Licensed 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.
+ */
+
+package rat;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.regex.Pattern;
+
+import rat.document.IDocument;
+import rat.document.impl.FileDocument;
+import rat.document.impl.zip.ZipFileUnarchiver;
+import rat.report.IReportable;
+import rat.report.RatReport;
+import rat.report.RatReportFailedException;
+
+/**
+ * Walks directories.
+ */
+public class DirectoryWalker implements IReportable {
+
+    private static final ZipFileUnarchiver UNARCHIVER = new ZipFileUnarchiver();
+    private static final FileNameComparator COMPARATOR = new FileNameComparator();
+    
+    protected final File file;
+    protected final String name;
+
+    private final Pattern ignoreNameRegex;;
+    
+	public DirectoryWalker(File file) {
+            this(file, null);
+	}
+	
+    public DirectoryWalker(File file, final Pattern ignoreNameRegex) {
+        this(file.getPath(), file, ignoreNameRegex);
+    }
+
+    private DirectoryWalker(final String name, final File file, final Pattern ignoreNameRegex) {
+        this.name = name;
+        this.file = file;
+        this.ignoreNameRegex = ignoreNameRegex;
+    }
+	
+    public boolean isRestricted() {
+        return false;
+    }
+
+    protected final boolean ignored(final String name) {
+        boolean result = false;
+        if (ignoreNameRegex != null) {
+            result = ignoreNameRegex.matcher(name).matches();
+        }
+        return result;
+    }
+
+	
+	boolean isRestricted(File file) {
+		String name = file.getName();
+		boolean result = name.startsWith(".");
+		return result;
+	}
+    
+    private void processDirectory(RatReport  report, final File file) throws RatReportFailedException {
+        if (!isRestricted(file)) {
+            process(report, file);
+        }
+    }
+    
+    public void run(final RatReport report) throws RatReportFailedException {
+        process(report, file);
+    }
+
+    private void process(final RatReport report, final File file) throws RatReportFailedException {
+        final File[] files = file.listFiles();
+        Arrays.sort(files, COMPARATOR);
+        if (files != null) {
+            // breadth first traversal
+            processNonDirectories(report, files);
+            processDirectories(report, files);
+        }
+    }
+
+    private void processDirectories(final RatReport report, final File[] files) throws RatReportFailedException {
+        for (int i = 0; i < files.length; i++) {
+            final File file = files[i];
+            final String name = file.getName();
+            if (!ignored(name)) {
+                if (file.isDirectory()) {
+                    processDirectory(report, file);
+                }
+            }
+        }
+    }
+
+    private void processNonDirectories(final RatReport report, final File[] files) throws RatReportFailedException {
+        for (int i = 0; i < files.length; i++) {
+            final File file = files[i];
+            final String name = file.getName();
+            if (!ignored(name)) {
+                if (!file.isDirectory()) {
+                    report(report, file);
+                }
+            }
+        }
+    }
+
+    private void report(final RatReport report, File file) throws RatReportFailedException {
+
+        IDocument document = new FileDocument(file, UNARCHIVER);
+        report.report(document);
+
+    }
+}

Added: incubator/rat/import/rat/src/java/rat/FileNameComparator.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/FileNameComparator.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/FileNameComparator.java (added)
+++ incubator/rat/import/rat/src/java/rat/FileNameComparator.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat;
+
+import java.io.File;
+import java.util.Comparator;
+
+class FileNameComparator implements Comparator {
+
+    public int compare(Object first, Object second) {
+        int result = 0;
+        File firstFile = (File) first;
+        File secondFile = (File) second;
+        if (firstFile == null) {
+            if (secondFile != null) {
+                result = 1;
+            }
+        } else {
+            if (secondFile == null) {
+                result = -1;
+            } else {
+                final String firstName = firstFile.getName();
+                final String secondName = secondFile.getName();
+                result = firstName.compareTo(secondName);
+            }
+        }
+        return result;
+    }
+
+}

Added: incubator/rat/import/rat/src/java/rat/Report.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/Report.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/Report.java (added)
+++ incubator/rat/import/rat/src/java/rat/Report.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.PipedReader;
+import java.io.PipedWriter;
+import java.io.PrintStream;
+import java.io.Writer;
+
+import javax.xml.transform.TransformerConfigurationException;
+
+import rat.analysis.IHeaderMatcher;
+import rat.license.ILicenseFamily;
+import rat.report.IReportable;
+import rat.report.RatReport;
+import rat.report.RatReportFailedException;
+import rat.report.xml.XmlReportFactory;
+import rat.report.xml.writer.IXmlWriter;
+import rat.report.xml.writer.impl.base.XmlWriter;
+
+public class Report {
+
+	public static final void main(String args[]) throws Exception {
+		if (args == null || args.length != 1) {
+			printUsage();
+		} else {
+			Report report = new Report(args[0]);
+			//report.report(System.out);
+            report.styleReport(System.out);
+		} 		
+	}
+	
+	private static final void printUsage() {
+		System.out.println("Usage: <directory>");
+		System.out.println("       where ");
+        System.out.println(           "<directory> is the base directory to be audited.");
+        System.out.println("NOTE: RAT is really little more than a grep ATM");
+		System.out.println("      RAT is also rather memory hungry ATM");
+		System.out.println("      RAT is very basic ATM");
+        System.out.println("      RAT ATM runs on unpacked releases");
+        System.out.println("      RAT highlights possible issues");
+        System.out.println("      RAT reports require intepretation");
+        System.out.println("      RAT often requires some tuning before it runs well against a project");
+        System.out.println("      RAT relies on heuristics: it may miss issues");
+	}
+	
+	private final String baseDirectory;
+	
+	private Report(String baseDirectory) {
+		this.baseDirectory = baseDirectory;
+	}
+	
+	public void report(PrintStream out) throws Exception {
+        DirectoryWalker base = getDirectory(out);
+        if (base != null) {
+            report(base, new OutputStreamWriter(out), Defaults.createDefaultMatcher(), null);
+        }
+	}
+    
+    private DirectoryWalker getDirectory(PrintStream out) {
+        DirectoryWalker result = null;
+        File base = new File(baseDirectory);
+        if (!base.exists()) {
+            out.print("ERROR: ");
+            out.print(baseDirectory);
+            out.print(" does not exist.\n");
+        } else if (!base.isDirectory()) {
+            out.print("ERROR: ");
+            out.print(baseDirectory);
+            out.print(" must be a directory.\n");
+        } else {
+            result = new DirectoryWalker(base);
+        }
+        return result;
+    }
+    
+    public void styleReport(PrintStream out) throws Exception {
+        DirectoryWalker base = getDirectory(out);
+        if (base != null) {
+            InputStream style = Defaults.getDefaultStyleSheet();
+            report(out, base, style, Defaults.createDefaultMatcher(), null);
+        }
+    }
+
+    public static void report(PrintStream out, IReportable base, final InputStream style, final IHeaderMatcher matcher,
+            final ILicenseFamily[] approvedLicenseNames) 
+           throws IOException, TransformerConfigurationException, 
+           InterruptedException, RatReportFailedException {
+        report(new OutputStreamWriter(out), base, style, matcher, approvedLicenseNames);
+    }
+
+    public static void report(Writer out, IReportable base, final InputStream style, 
+            final IHeaderMatcher matcher, final ILicenseFamily[] approvedLicenseNames) 
+                throws IOException, TransformerConfigurationException, FileNotFoundException, InterruptedException, RatReportFailedException {
+        PipedReader reader = new PipedReader();
+        PipedWriter writer = new PipedWriter(reader);
+        ReportTransformer transformer = new ReportTransformer(out, style, reader);
+        Thread transformerThread = new Thread(transformer);
+        transformerThread.start();
+        report(base, writer, matcher, approvedLicenseNames);
+        writer.flush();
+        writer.close();
+        transformerThread.join();
+    }
+    
+    
+    public static void report(final IReportable container, final Writer out, final IHeaderMatcher matcher,
+             final ILicenseFamily[] approvedLicenseNames) throws IOException, RatReportFailedException {
+        IXmlWriter writer = new XmlWriter(out);
+        RatReport report = XmlReportFactory.createStandardReport(writer, matcher, approvedLicenseNames);  
+        report.startReport();
+        container.run(report);
+        report.endReport();
+        writer.closeDocument();
+    }
+}

Added: incubator/rat/import/rat/src/java/rat/ReportFailedRuntimeException.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/ReportFailedRuntimeException.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/ReportFailedRuntimeException.java (added)
+++ incubator/rat/import/rat/src/java/rat/ReportFailedRuntimeException.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat;
+
+/**
+ * Indicates that a report has failed in a fatal manner.
+ */
+class ReportFailedRuntimeException extends RuntimeException {
+    
+    private static final long serialVersionUID = -7605175211996815712L;
+
+    public ReportFailedRuntimeException() {
+        super();
+    }
+
+    public ReportFailedRuntimeException(String message, Throwable t) {
+        super(message, t);
+    }
+
+    public ReportFailedRuntimeException(String message) {
+        super(message);
+    }
+
+    public ReportFailedRuntimeException(Throwable t) {
+        super(t);
+    }    
+}

Added: incubator/rat/import/rat/src/java/rat/ReportTransformer.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/ReportTransformer.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/ReportTransformer.java (added)
+++ incubator/rat/import/rat/src/java/rat/ReportTransformer.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.Writer;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+
+class ReportTransformer implements Runnable {
+
+    private final Writer out;
+    private final Transformer transformer;
+    private final Reader in;
+    
+    public ReportTransformer(final Writer out, final Reader style, 
+            final Reader in) throws TransformerConfigurationException {
+        this.out = out;
+        transformer = TransformerFactory.newInstance().newTransformer(
+                new StreamSource(style));
+        this.in = in;
+    }
+    
+    public ReportTransformer(final Writer out, final InputStream style, 
+            final Reader in) throws TransformerConfigurationException {
+        this.out = out;
+        transformer = TransformerFactory.newInstance().newTransformer(
+                new StreamSource(style));
+        this.in = in;
+    }
+    
+    public void run() {
+        try {
+            transform();
+        } catch (TransformerException e) {
+            throw new ReportFailedRuntimeException(e.getMessage(), e);
+        }
+    }
+
+    public void transform() throws TransformerException {
+        transformer.transform(new StreamSource(in), new StreamResult(out));
+    }
+
+}

Added: incubator/rat/import/rat/src/java/rat/analysis/Claims.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/analysis/Claims.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/analysis/Claims.java (added)
+++ incubator/rat/import/rat/src/java/rat/analysis/Claims.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat.analysis;
+
+import rat.report.RatReportFailedException;
+import rat.report.claim.IClaimReporter;
+
+public class Claims {
+
+    public static final String LICENSE_APPROVAL_PREDICATE = "license-approval";
+    public static final String LICENSE_FAMILY_PREDICATE = "license-family";
+    public static final String HEADER_SAMPLE_PREDICATE = "header-sample";
+    public static final String HEADER_TYPE_PREDICATE = "header-type";
+    
+    public static void reportHeaderSampleClaim(final String sample, final String subject, IClaimReporter reporter) throws RatReportFailedException {
+        reporter.claim(subject, HEADER_SAMPLE_PREDICATE, sample, true);
+    }
+    
+    public static void reportGeneratedHeaderTypeClaim(final String subject, IClaimReporter reporter) throws RatReportFailedException {
+        reportHeaderTypeClaim("GEN  ", subject, reporter);
+    }
+    
+    public static void reportHeaderTypeClaim(final String type, final String subject, IClaimReporter reporter) throws RatReportFailedException {
+        reporter.claim(subject, HEADER_TYPE_PREDICATE, type, false);
+    }
+    
+    public static void reportGeneratedClaims(final String subject, final String notes, final IClaimReporter reporter) throws RatReportFailedException {
+        Claims.reportHeaderSampleClaim(notes, subject, reporter);
+        Claims.reportGeneratedHeaderTypeClaim(subject, reporter);
+    }
+    
+    public static void reportStandardClaims(final String subject, final String notes, final String code, final String name, final IClaimReporter reporter) throws RatReportFailedException {
+        Claims.reportHeaderTypeClaim(code, subject, reporter);
+        Claims.reportHeaderSampleClaim(notes, subject, reporter);
+
+        reporter.claim(subject, LICENSE_FAMILY_PREDICATE, name, false);
+    }
+    
+    public static void reportLicenseApprovalClaim(final CharSequence subject, final boolean isAcceptable, final IClaimReporter reporter) throws RatReportFailedException {
+        // TODO: replace with more finely grained system
+        final String approvalValue = Boolean.toString(isAcceptable);
+        // TODO: not very readable; 
+        // TODO: replace when license approval factored into separate phase
+        // TODO: probably name='ASF'
+        reporter.claim(subject, LICENSE_APPROVAL_PREDICATE, approvalValue, false);
+    }
+
+    public static final String ASL_CODE = "AL   ";
+    public static final String OASIS_CODE = "OASIS";
+    public static final String W3CD_CODE = "W3CD ";
+    public static final String W3C_CODE = "W3C  ";
+    public static final String DOJO = "DOJO ";
+    public static final String TMF854 = "TMF  ";
+}

Added: incubator/rat/import/rat/src/java/rat/analysis/IHeaderMatcher.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/analysis/IHeaderMatcher.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/analysis/IHeaderMatcher.java (added)
+++ incubator/rat/import/rat/src/java/rat/analysis/IHeaderMatcher.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat.analysis;
+
+import rat.report.claim.IClaimReporter;
+
+/**
+ * Matches text headers to known licenses.
+ *
+ */
+public interface IHeaderMatcher {
+
+	/**
+	 * Resets this matches.
+	 * Subsequent calls to {@link #match} will accumulate new text.
+	 */
+	public void reset();
+	
+	/**
+	 * Matches the text accumulated to licenses.
+     * TODO probably a poor design choice - hope to fix later
+	 * @param subject TODO
+	 * @param line next line of text, not null
+	 * @param reporter TODO
+	 * @return TODO
+	 */
+	public boolean match(String subject, String line, IClaimReporter reporter) throws RatHeaderAnalysisException;
+	
+}

Added: incubator/rat/import/rat/src/java/rat/analysis/RatHeaderAnalysisException.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/analysis/RatHeaderAnalysisException.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/analysis/RatHeaderAnalysisException.java (added)
+++ incubator/rat/import/rat/src/java/rat/analysis/RatHeaderAnalysisException.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat.analysis;
+
+import org.apache.commons.lang.exception.NestableException;
+
+/**
+ * Indicates exceptional condition during header analysis.
+ *
+ */
+public class RatHeaderAnalysisException extends NestableException {
+
+    private static final long serialVersionUID = 7613577476983281387L;
+
+    public RatHeaderAnalysisException() {
+        super();
+    }
+
+    public RatHeaderAnalysisException(String msg, Throwable cause) {
+        super(msg, cause);
+    }
+
+    public RatHeaderAnalysisException(String msg) {
+        super(msg);
+    }
+
+    public RatHeaderAnalysisException(Throwable cause) {
+        super(cause);
+    }
+}

Added: incubator/rat/import/rat/src/java/rat/analysis/generation/GeneratedLicenseNotRequired.java
URL: http://svn.apache.org/viewvc/incubator/rat/import/rat/src/java/rat/analysis/generation/GeneratedLicenseNotRequired.java?rev=636144&view=auto
==============================================================================
--- incubator/rat/import/rat/src/java/rat/analysis/generation/GeneratedLicenseNotRequired.java (added)
+++ incubator/rat/import/rat/src/java/rat/analysis/generation/GeneratedLicenseNotRequired.java Tue Mar 11 16:08:58 2008
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2006 Robert Burrell Donkin
+ *
+ * Licensed 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.
+ */ 
+package rat.analysis.generation;
+
+import java.util.regex.Pattern;
+
+import rat.analysis.Claims;
+import rat.analysis.IHeaderMatcher;
+import rat.analysis.RatHeaderAnalysisException;
+import rat.report.RatReportFailedException;
+import rat.report.claim.IClaimReporter;
+
+public class GeneratedLicenseNotRequired implements IHeaderMatcher {
+
+    private static final Pattern[] DEFAULT_PATTERNS = {Pattern.compile(".*generated by Cayenne.*"),
+        Pattern.compile(".*Generated By:JJTree:.*"), 
+        Pattern.compile(".*THIS FILE IS AUTOMATICALLY GENERATED.*"),
+        Pattern.compile(".*NOTE: this file is autogenerated by XBeans.*"),
+        Pattern.compile(".*This file was automatically generated by .*"),
+        Pattern.compile(".*# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!.*"),
+        Pattern.compile(".*# Microsoft Developer Studio Generated NMAKE File.*"),
+        Pattern.compile(".*# Microsoft Developer Studio Generated Build File.*"),
+        Pattern.compile(".*Generated from configure.ac by autoheader.*"),
+        Pattern.compile(".*generated automatically by aclocal.*"),
+        Pattern.compile(".*build.xml generated by maven from project.xml.*"),
+        Pattern.compile(".*This file was generated by.*"),
+        Pattern.compile(".*This file has been automatically generated..*"),
+        Pattern.compile(".*Automatically generated - do not modify!.*"),
+        Pattern.compile(".*Javadoc style sheet.*"),
+        Pattern.compile(".*SOURCE FILE GENERATATED.*"),
+        Pattern.compile(".*Generated by the Batik.*"),
+        Pattern.compile(".*this file is autogenerated.*"),
+        Pattern.compile(".*This class was autogenerated.*"),
+        Pattern.compile(".*Generated by Maven.*"),
+        Pattern.compile(".*This class was generated by.*")};
+    
+    
+    private final Pattern[] linePatterns;
+    private final int numberOfPatterns;
+    
+    public GeneratedLicenseNotRequired() {
+        this(DEFAULT_PATTERNS);
+    }
+    
+    public GeneratedLicenseNotRequired(final Pattern[] linePatterns) {
+        this.linePatterns = linePatterns;
+        this.numberOfPatterns = linePatterns.length;
+    }
+
+    public boolean match(String subject, String line, IClaimReporter reporter) throws RatHeaderAnalysisException {
+        boolean result = false;
+        for (int i=0;i<numberOfPatterns;i++) {
+            if (linePatterns[i].matcher(line).matches()) {
+                result = true;
+                reportOnLicense(subject, reporter);
+                break;
+            }
+        }
+        return result;
+    }
+
+    private void reportOnLicense(String subject, IClaimReporter reporter) throws RatHeaderAnalysisException {
+        try {
+            Claims.reportGeneratedClaims(subject, "Generated files do not required license headers", reporter);
+        } catch (RatReportFailedException e) {
+            throw new RatHeaderAnalysisException("Cannot write claims", e);
+        }
+    }
+
+    public void reset() {
+        // stateless
+    }
+
+}



Mime
View raw message