Merge remote-tracking branch 'apache/main' into main-tmp
diff --git a/bin/build.sh b/build/build.sh
similarity index 100%
rename from bin/build.sh
rename to build/build.sh
diff --git a/bin/change-scala-version.sh b/build/change-scala-version.sh
similarity index 100%
rename from bin/change-scala-version.sh
rename to build/change-scala-version.sh
diff --git a/build/check-license.sh b/build/check-license.sh
new file mode 100755
index 0000000..f38f89d
--- /dev/null
+++ b/build/check-license.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+################################################################################
+##
+##  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.
+##
+################################################################################
+
+# set the variables
+BASE=$(cd "$(dirname "$0")/.." | pwd)
+VERSION_RAT="0.14"
+RAT_HOME=${BASE}/.rat/apache-rat-${VERSION_RAT}
+RAT_JAR=${RAT_HOME}/apache-rat-${VERSION_RAT}.jar
+RAT_EXCLUSION=$1
+
+# Validate if the folder is created
+if [[ ! -f "${BASE}/.rat" ]]; then
+  mkdir -p ${BASE}/.rat
+fi
+
+# download the elements required
+if [[ ! -f "$RAT_JAR" ]]; then
+  cd ${BASE}/.rat
+  wget https://dlcdn.apache.org/creadur/apache-rat-${VERSION_RAT}/apache-rat-${VERSION_RAT}-bin.tar.gz
+  tar -xvf apache-rat-${VERSION_RAT}-bin.tar.gz
+fi
+
+cd ${BASE}
+# Set the parameters for rat
+rat_opts=("-jar" "${RAT_JAR}" "-d" "${BASE}")
+
+#add the default exclusion for the project
+rat_opts+=("-e" "target/*")
+rat_opts+=("-e" "^.*.input")
+rat_opts+=("-e" "^.*.md")
+rat_opts+=("-e" "^.*.iml")
+rat_opts+=("-e" "^.*_pb2.py") # code generated by protocol buffer
+rat_opts+=("-e" "Gemfile.lock")
+rat_opts+=("-e" ".gitignore")
+rat_opts+=("-e" ".gitmodules")
+rat_opts+=("-e" ".rat-excludes")
+if [[ ! -z "$RAT_EXCLUSION" ]]; then
+   rat_opts+=("-E")
+   rat_opts+=($RAT_EXCLUSION)
+fi
+
+# execute the validation using rat
+java "${rat_opts[@]}"  2>&1 | grep "== File:"
\ No newline at end of file
diff --git a/bin/check-release.sh b/build/check-release.sh
similarity index 100%
rename from bin/check-release.sh
rename to build/check-release.sh
diff --git a/bin/contains-scala-dependencies.sh b/build/contains-scala-dependencies.sh
similarity index 100%
rename from bin/contains-scala-dependencies.sh
rename to build/contains-scala-dependencies.sh
diff --git a/bin/create_scala_structure.sh b/build/create_scala_structure.sh
similarity index 100%
rename from bin/create_scala_structure.sh
rename to build/create_scala_structure.sh
diff --git a/bin/detect-scala-dependent-projects.sh b/build/detect-scala-dependent-projects.sh
similarity index 100%
rename from bin/detect-scala-dependent-projects.sh
rename to build/detect-scala-dependent-projects.sh
diff --git a/bin/rename_org.sh b/build/rename_org.sh
similarity index 100%
rename from bin/rename_org.sh
rename to build/rename_org.sh
diff --git a/bin/rm-pom-backups.sh b/build/rm-pom-backups.sh
similarity index 100%
rename from bin/rm-pom-backups.sh
rename to build/rm-pom-backups.sh
diff --git a/bin/rollback_release.sh b/build/rollback_release.sh
similarity index 100%
rename from bin/rollback_release.sh
rename to build/rollback_release.sh