Run RAT, fixing the RAT report.
diff --git a/.travis.yml b/.travis.yml
index baf9ed4..73cf3d0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,4 +24,5 @@
script:
- export JDK10=$JAVA_HOME
- jdk_switcher use oraclejdk8
+ - (cd cmdline; ant rat)
- (cd cmdline; ant -Dnbplatform.default.harness.dir=$HOME/netbeans/harness -DNETBEANS_PLATFORM=$HOME/netbeans -DJDK10=$JDK10 build-and-test)
diff --git a/cmdline/build.xml b/cmdline/build.xml
index 033893e..e62563e 100644
--- a/cmdline/build.xml
+++ b/cmdline/build.xml
@@ -67,4 +67,48 @@
</exec>
</target>
+ <target name="rat">
+ <mkdir dir="build" />
+ <get src="https://search.maven.org/remotecontent?filepath=org/apache/rat/apache-rat/0.12/apache-rat-0.12.jar"
+ dest="build/apache-rat-0.12.jar"
+ skipexisting="true" />
+
+ <taskdef uri="antlib:org.apache.rat.anttasks" resource="org/apache/rat/anttasks/antlib.xml">
+ <classpath>
+ <pathelement location="build/apache-rat-0.12.jar"/>
+ </classpath>
+ </taskdef>
+
+ <fileset dir="${basedir}" id="rat.files">
+ <excludesfile name="rat-exclusions.txt" />
+ </fileset>
+
+ <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" reportfile="build/rat-report.txt">
+ <rat:fullTextMatcher licenseFamilyCategory="AL" licenseFamilyName="Apache License 2.0 Short header">
+ Licensed to the Apache Software Foundation (ASF) under one or more contributor
+ license agreements; and to You under the Apache License, Version 2.0.
+ </rat:fullTextMatcher>
+ <rat:approvedLicense familyName="Apache License 2.0 Short header"/>
+
+ <resources refid="rat.files" />
+ </rat:report>
+
+ <resourcecount property="rat.content.elements">
+ <fileset file="build/rat-report.txt">
+ <and>
+ <contains text="Binaries: 0" />
+ <contains text="Archives: 0" />
+ <contains text="0 Unknown Licenses" />
+ </and>
+ </fileset>
+ </resourcecount>
+
+ <condition property="rat.failed">
+ <not>
+ <equals arg1="${rat.content.elements}" arg2="1" />
+ </not>
+ </condition>
+
+ <fail if="${rat.failed}">RAT failed.</fail>
+ </target>
</project>
diff --git a/cmdline/rat-exclusions.txt b/cmdline/rat-exclusions.txt
new file mode 100644
index 0000000..a6b4fc2
--- /dev/null
+++ b/cmdline/rat-exclusions.txt
@@ -0,0 +1,35 @@
+###### 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.
+
+#build artifacts, not part of the distribution:
+build/**
+ant/build/**
+ant/dist/**
+lib/build/**
+tool/build/**
+
+#private NB data, not part of the distribution:
+nbproject/private/**
+ant/nbproject/private/**
+lib/nbproject/private/**
+tool/nbproject/private/**
+
+#manifests, typically trivial and problems with comments:
+*/manifest.mf
+
+#golden test output, does not support comments:
+maven/tests/**/golden
diff --git a/cmdline/tool/build.xml b/cmdline/tool/build.xml
index 191c89d..19f6ab1 100644
--- a/cmdline/tool/build.xml
+++ b/cmdline/tool/build.xml
@@ -24,16 +24,11 @@
<import file="nbproject/build-impl.xml"/>
<!--<import file="${suite.dir}/../findbugs-import.xml"/>-->
- <target name="-check-joptsimple">
- <condition property="has.joptsimple">
- <available file="lib/jopt-simple-3.2.jar" />
- </condition>
- </target>
-
- <target name="-download-joptsimple" depends="-check-joptsimple" unless="has.joptsimple">
- <mkdir dir="lib" />
+ <target name="-download-joptsimple">
+ <mkdir dir="build" />
<get src="http://central.maven.org/maven2/net/sf/jopt-simple/jopt-simple/3.2/jopt-simple-3.2.jar"
- dest="lib/jopt-simple-3.2.jar" usetimestamp="true"/>
+ dest="build/jopt-simple-3.2.jar"
+ skipexisting="true"/>
</target>
<target name="build-init" depends="harness.build-init,-download-joptsimple" />
diff --git a/cmdline/tool/nbproject/project.properties b/cmdline/tool/nbproject/project.properties
index 2c863ee..72ed17b 100644
--- a/cmdline/tool/nbproject/project.properties
+++ b/cmdline/tool/nbproject/project.properties
@@ -15,6 +15,6 @@
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
-cp.extra=lib/jopt-simple-3.2.jar:${tools.jar}
+cp.extra=build/jopt-simple-3.2.jar:${tools.jar}
spec.version.base=1.16.0
test.timeout=6000000
diff --git a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml
index 76c8954..efed288 100644
--- a/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml
+++ b/cmdline/tool/src/org/netbeans/modules/jackpot30/cmdline/cfg_hints.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<!DOCTYPE configuration PUBLIC "-//NetBeans//DTD Tool Configuration 1.0//EN" "http://www.netbeans.org/dtds/ToolConfiguration-1_0.dtd">
<configuration>
<tool kind="hints" type="text/x-java">