Skip to content

Commit

Permalink
HDDS-10498. Improved configuration for license compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Maksim Myskov committed Mar 9, 2024
1 parent f16b1af commit 54722b4
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 134 deletions.
55 changes: 55 additions & 0 deletions dev-support/rat/rat-exclusions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
###### 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.

.github/*
CONTRIBUTING.md
README.md
SECURITY.md
.gitattributes
src/main/resources/proto.lock
**/output.xml
**/log.html
**/report.html
**/.ssh/id_rsa*
src/test/resources/*.log
src/test/resources/ssl/*
**/dependency-reduced-pom.xml
**/pnpm-lock.yaml
src/test/resources/prometheus-test-response.txt
src/main/license/**
src/main/resources/proto.lock
src/test/resources/test.db.ini
tools/fault-injection-service/README.md
**/webapps/static/angular-nvd3-1.0.9.min.js
**/webapps/static/angular-route-1.8.0.min.js
**/webapps/static/bootstrap-3.4.1/**
**/webapps/static/d3-3.5.17.min.js
**/webapps/static/jquery-3.5.1.min.js
**/webapps/static/nvd3-1.8.5.min.css.map
**/webapps/static/nvd3-1.8.5.min.css
**/webapps/static/nvd3-1.8.5.min.js.map
**/webapps/static/nvd3-1.8.5.min.js
**/webapps/static/angular-1.8.0.min.js
src/test/resources/additionalfields.container
src/test/resources/incorrect.checksum.container
src/test/resources/incorrect.container
src/test/resources/test.db.ini
src/test/resources/123-dn-container.db/**
src/test/resources/123.container
static/slides/*
**/themes/ozonedoc/**
**/*.json
24 changes: 0 additions & 24 deletions hadoop-hdds/docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>static/slides/*</exclude>
<exclude>themes/ozonedoc/static/js/bootstrap.min.js</exclude>
<exclude>themes/ozonedoc/static/js/jquery-3.5.1.min.js</exclude>
<exclude>themes/ozonedoc/static/js/swagger-ui-bundle.js</exclude>
<exclude>themes/ozonedoc/static/css/bootstrap-theme.min.css
</exclude>
<exclude>themes/ozonedoc/static/css/bootstrap.min.css.map</exclude>
<exclude>themes/ozonedoc/static/css/bootstrap.min.css</exclude>
<exclude>themes/ozonedoc/static/css/bootstrap-theme.min.css.map
</exclude>
<exclude>themes/ozonedoc/static/css/swagger-ui.css</exclude>
<exclude>
themes/ozonedoc/static/fonts/glyphicons-halflings-regular.svg
</exclude>
<exclude>themes/ozonedoc/layouts/index.html</exclude>
<exclude>themes/ozonedoc/theme.toml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
39 changes: 0 additions & 39 deletions hadoop-hdds/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,45 +234,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
</execution>
</executions>
</plugin>
<plugin>

<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.json</exclude>
<exclude>**/hs_err*.log</exclude>
<exclude>**/.attach_*</exclude>
<exclude>**/**.rej</exclude>
<exclude>**/.factorypath</exclude>
<exclude>public</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/target/**</exclude>
<exclude>**/output.xml</exclude>
<exclude>**/log.html</exclude>
<exclude>**/report.html</exclude>
<exclude>.gitattributes</exclude>
<exclude>.idea/**</exclude>
<exclude>src/main/resources/webapps/static/angular-1.8.0.min.js</exclude>
<exclude>src/main/resources/webapps/static/angular-nvd3-1.0.9.min.js</exclude>
<exclude>src/main/resources/webapps/static/angular-route-1.8.0.min.js</exclude>
<exclude>src/main/resources/webapps/static/d3-3.5.17.min.js</exclude>
<exclude>src/main/resources/webapps/static/nvd3-1.8.5.min.css.map</exclude>
<exclude>src/main/resources/webapps/static/nvd3-1.8.5.min.css</exclude>
<exclude>src/main/resources/webapps/static/nvd3-1.8.5.min.js.map</exclude>
<exclude>src/main/resources/webapps/static/nvd3-1.8.5.min.js</exclude>
<exclude>src/main/resources/webapps/static/jquery-3.5.1.min.js</exclude>
<exclude>src/main/resources/webapps/static/bootstrap-3.4.1/**</exclude>
<exclude>src/test/resources/additionalfields.container</exclude>
<exclude>src/test/resources/incorrect.checksum.container</exclude>
<exclude>src/test/resources/incorrect.container</exclude>
<exclude>src/test/resources/test.db.ini</exclude>
<exclude>src/test/resources/123-dn-container.db/**</exclude>
<exclude>src/test/resources/123.container</exclude>
<exclude>src/main/resources/proto.lock</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
8 changes: 1 addition & 7 deletions hadoop-ozone/dev-support/checks/rat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@ mkdir -p "$REPORT_DIR"

REPORT_FILE="$REPORT_DIR/summary.txt"

dirs="hadoop-hdds hadoop-ozone"

for d in $dirs; do
pushd "$d" || exit 1
mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:0.13:check
popd
done
mvn -B --no-transfer-progress -fn org.apache.rat:apache-rat-plugin:0.13:check

grep -r --include=rat.txt "!????" $dirs | tee "$REPORT_FILE"

Expand Down
4 changes: 0 additions & 4 deletions hadoop-ozone/httpfsgateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
Expand Down
60 changes: 0 additions & 60 deletions hadoop-ozone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,66 +305,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.json</exclude>
<exclude>**/hs_err*.log</exclude>
<exclude>**/target/**</exclude>
<exclude>.gitattributes</exclude>
<exclude>**/.attach_*</exclude>
<exclude>**/**.rej</exclude>
<exclude>**/.factorypath</exclude>
<exclude>public</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/output.xml</exclude>
<exclude>**/log.html</exclude>
<exclude>**/report.html</exclude>
<exclude>**/.idea/**</exclude>
<exclude>**/.ssh/id_rsa*</exclude>
<exclude>dev-support/*tests</exclude>
<exclude>dev-support/checkstyle*</exclude>
<exclude>dev-support/jdiff/**</exclude>
<exclude>src/contrib/**</exclude>
<exclude>src/main/webapps/datanode/robots.txt</exclude>
<exclude>src/main/webapps/hdfs/robots.txt</exclude>
<exclude>src/main/webapps/journal/robots.txt</exclude>
<exclude>src/main/webapps/router/robots.txt</exclude>
<exclude>src/main/webapps/secondary/robots.txt</exclude>
<exclude>src/site/resources/images/*</exclude>
<exclude>src/test/all-tests</exclude>
<exclude>src/test/empty-file</exclude>
<exclude>src/test/resources/*.log</exclude>
<exclude>src/test/resources/*.tgz</exclude>
<exclude>src/test/resources/data*</exclude>
<exclude>src/test/resources/empty-file</exclude>
<exclude>src/test/resources/ssl/*</exclude>
<exclude>src/main/compose/ozonesecure/docker-image/runner/build/apache-rat-0.12/README-CLI.txt</exclude>
<exclude>src/main/compose/ozonesecure/docker-image/runner/build/apache-rat-0.12/README-ANT.txt</exclude>
<exclude>webapps/static/angular-1.8.0.min.js</exclude>
<exclude>webapps/static/angular-nvd3-1.0.9.min.js</exclude>
<exclude>webapps/static/angular-route-1.8.0.min.js</exclude>
<exclude>webapps/static/bootstrap-3.4.1/**</exclude>
<exclude>webapps/static/d3-3.5.17.min.js</exclude>
<exclude>webapps/static/jquery-3.5.1.min.js</exclude>
<exclude>webapps/static/jquery.dataTables.min.js</exclude>
<exclude>webapps/static/nvd3-1.8.5.min.css.map</exclude>
<exclude>webapps/static/nvd3-1.8.5.min.css</exclude>
<exclude>webapps/static/nvd3-1.8.5.min.js.map</exclude>
<exclude>webapps/static/nvd3-1.8.5.min.js</exclude>
<exclude>**/dependency-reduced-pom.xml</exclude>
<exclude>**/node_modules/**</exclude>
<exclude>**/yarn.lock</exclude>
<exclude>**/pnpm-lock.yaml</exclude>
<exclude>**/ozone-recon-web/build/**</exclude>
<exclude>src/test/resources/prometheus-test-response.txt</exclude>
<exclude>src/main/license/**</exclude>
<exclude>src/main/resources/proto.lock</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludesFile>dev-support/rat/rat-exclusions.txt</excludesFile>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 54722b4

Please sign in to comment.