This is an automated email from the ASF dual-hosted git repository. martinzink pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 1c5538f85aa9722993c7b88412f79c1a1d1a580b Author: Gabor Gyimesi <[email protected]> AuthorDate: Mon Apr 14 16:34:05 2025 +0200 MINIFICPP-2559 Remove Apache RAT dependency Closes #1960 Signed-off-by: Martin Zink <[email protected]> --- .dockerignore | 1 - .gitignore | 1 - CMakeLists.txt | 7 ------- cmake/RunApacheRAT.cmake | 49 ------------------------------------------------ 4 files changed, 58 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9a2b1aaa1..ab5c47d28 100644 --- a/.dockerignore +++ b/.dockerignore @@ -52,7 +52,6 @@ logs compile_commands.json thirdparty/uuid/tst_uuid* -thirdparty/apache-rat/apache-rat* thirdparty/**/*.o thirdparty/**/*.a libminifi/test/**/*.a diff --git a/.gitignore b/.gitignore index 7b2ed8170..8a57ba1c0 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ thirdparty/**/*.a libminifi/test/**/*.a libminifi/test/corecomponentstate/ docs/generated -thirdparty/apache-rat/apache-rat* /compile_commands.json __pycache__/ /corecomponentstate diff --git a/CMakeLists.txt b/CMakeLists.txt index 298e189c9..f9f94363e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -570,7 +570,6 @@ set(CPACK_SOURCE_IGNORE_FILES "content_repository" "provenance_repository" "corecomponentstate" - "thirdparty/apache-rat/apache-rat" "compile_commands\\\\.json" "/venv/" "__pycache__" @@ -785,12 +784,6 @@ add_custom_target(flake8 COMMAND ${CMAKE_SOURCE_DIR}/run_flake8.sh ${CMAKE_SOURCE_DIR}) endif(NOT WIN32) -# Custom target to download and run Apache Release Audit Tool (RAT) -add_custom_target( - apache-rat - ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/cmake/RunApacheRAT.cmake - COMMAND java -jar ${CMAKE_SOURCE_DIR}/thirdparty/apache-rat/apache-rat-0.13/apache-rat-0.13.jar -E ${CMAKE_SOURCE_DIR}/thirdparty/apache-rat/.rat-excludes -d ${CMAKE_SOURCE_DIR} | grep -B 1 -A 15 Summary ) - feature_summary(WHAT ALL FILENAME ${CMAKE_BINARY_DIR}/all.log) if (MINIFI_ADVANCED_CODE_COVERAGE) diff --git a/cmake/RunApacheRAT.cmake b/cmake/RunApacheRAT.cmake deleted file mode 100644 index 362a43bf8..000000000 --- a/cmake/RunApacheRAT.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# 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. - -# This file is invoked in CMake script mode from the source root of the overall project - -# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred' -execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1 - COMMAND grep preferred - COMMAND awk "{print $2}" - COMMAND tr -d "\"" - TIMEOUT 10 - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE MIRROR_URL ) - -# Make use of parent thirdparty by adjusting relative to the source of this CMake file -set(PARENT_THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/../thirdparty") -set(RAT_BASENAME "apache-rat-0.13") -set(RAT_DIR "${PARENT_THIRDPARTY_DIR}/apache-rat") -set(RAT_BINARY "${RAT_DIR}/${RAT_BASENAME}-bin/${RAT_BASENAME}.jar") - -file(DOWNLOAD - "${MIRROR_URL}creadur/${RAT_BASENAME}/${RAT_BASENAME}-bin.tar.gz" - "${RAT_DIR}/${RAT_BASENAME}-bin.tar.gz" - EXPECTED_HASH SHA512=2C1E12EACE7B80A9B6373C2F5080FBF63D3FA8D9248F3A17BD05DE961CD3CA3C4549817B8B7320A84F0C323194EDAD0ABDB86BDFEC3976227A228E2143E14A54 ) - - - -execute_process( - COMMAND tar xf "${RAT_DIR}/${RAT_BASENAME}-bin.tar.gz" -C "${RAT_DIR}" - COMMAND grep preferred - COMMAND awk "{print $2}" - COMMAND tr -d "\"" - TIMEOUT 10 - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE MIRROR_URL ) \ No newline at end of file
