This is an automated email from the ASF dual-hosted git repository. ppkarwasz pushed a commit to branch apply-logging-parent in repository https://gitbox.apache.org/repos/asf/logging-flume.git
commit c4cbb1e7e914f5d168bae815ab86b7503362f428 Author: Piotr P. Karwasz <[email protected]> AuthorDate: Thu May 28 16:04:56 2026 +0200 Use `logging-parent` Reparent `flume-project` and `flume-parent` to `org.apache.logging:logging-parent:12.1.1` to align Flume's build with the shared Apache Logging Services parent. A few checks inherited from `logging-parent` are temporarily disabled (`-Dspotless.skip -Denforcer.skip -Dspotbugs.skip`) and Error Prone is turned off via `-Xlint:all` in the compiler config: * Spotless / Enforcer: blocked until Spotless is applied across the codebase. * Error Prone: not previously used by Flume; findings will be fixed in a follow-up. * SpotBugs: the stricter ruleset surfaces new findings to address later. A Maven toolchain is also configured temporarily, since several Maven plugins now require Java 17 while some tests still fail on Java 8+. --- .github/workflows/build.yml | 6 ++- .github/workflows/codeql-analysis.yml | 22 +++++---- .gitignore | 2 + .mvn/jvm.config | 11 +++++ flume-parent/pom.xml | 93 +++++++++-------------------------- pom.xml | 21 ++++++-- 6 files changed, 72 insertions(+), 83 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0984074a3..9ab11caad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,14 +56,18 @@ jobs: uses: actions/setup-java@v5 with: distribution: ${{ matrix.java-distribution }} - java-version: 8 + java-version: | + 8 + 17 cache: maven - name: Build with Maven timeout-minutes: 120 shell: bash run: | + # Temporarily disable spotless ./mvnw clean verify -DredirectTestOutput=true \ + -Dspotless.skip -Denforcer.skip -Dspotbugs.skip \ --show-version --batch-mode --errors --no-transfer-progress \ -DtrimStackTrace=false \ -Dsurefire.rerunFailingTestsCount=2 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5b7f168a6..a01b0e50d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,14 +1,18 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. +# 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 # -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. +# 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. + name: "CodeQL" on: diff --git a/.gitignore b/.gitignore index 9a0a932f5..a1afde08b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ nb-configuration.xml .DS_Store /.mvn/wrapper/maven-wrapper.jar **/metastore_db +# Flatten plugin +.flattened-pom.xml diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 000000000..f3b9f7db5 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,11 @@ +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED +-Dfile.encoding=UTF-8 diff --git a/flume-parent/pom.xml b/flume-parent/pom.xml index 5997b66c4..07c8dcef2 100644 --- a/flume-parent/pom.xml +++ b/flume-parent/pom.xml @@ -19,9 +19,9 @@ limitations under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> - <groupId>org.apache</groupId> - <artifactId>apache</artifactId> - <version>23</version> + <groupId>org.apache.logging</groupId> + <artifactId>logging-parent</artifactId> + <version>12.1.1</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -38,10 +38,6 @@ limitations under the License. <!-- Set default encoding to UTF-8 to remove maven complaints --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <!-- Java compiler configuration --> - <sourceJavaVersion>1.8</sourceJavaVersion> - <targetJavaVersion>1.8</targetJavaVersion> - <!-- Signing User for release --> <GPGSigningUserName>[email protected]</GPGSigningUserName> @@ -106,8 +102,6 @@ limitations under the License. <mvn-paranamer-plugin.version>2.8</mvn-paranamer-plugin.version> <mvn-pmd-plugin.version>3.15.0</mvn-pmd-plugin.version> <mvn-site-plugin.version>3.9.0</mvn-site-plugin.version> - <mvn-spotbugs-plugin.version>4.2.0</mvn-spotbugs-plugin.version> - <mvn-surefire-plugin.version>2.22.2</mvn-surefire-plugin.version> <!--<netty.version>3.10.6.Final</netty.version>--> <netty-all.version>4.1.86.Final</netty-all.version> <parquet.version>1.11.2</parquet.version> @@ -119,6 +113,7 @@ limitations under the License. <scala-library.version>2.13.9</scala-library.version> <snappy-java.version>1.1.8.4</snappy-java.version> <solr-global.version>4.3.0</solr-global.version> + <spotbugs-annotations.version>4.2.0</spotbugs-annotations.version> <slf4j.version>1.7.32</slf4j.version> <system-rules.version>1.17.0</system-rules.version> <twitter-source.version>2.0.0</twitter-source.version> @@ -417,6 +412,18 @@ limitations under the License. </extensions> <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <!-- Overrides the parent arguments that enable Error Prone --> + <compilerArgs> + <arg>-Xlint:all</arg> + </compilerArgs> + </configuration> + </plugin> + <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> @@ -433,63 +440,7 @@ limitations under the License. <pluginManagement> <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <version>${mvn-antrun-plugin.version}</version> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>${mvn-gpg-plugin.version}</version> - <configuration> - <excludes> - <exclude>**/*.sha512</exclude> - </excludes> - <keyname>${GPGSigningUserName}</keyname> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>${mvn-compiler-plugin.version}</version> - <configuration> - <source>${sourceJavaVersion}</source> - <target>${targetJavaVersion}</target> - </configuration> - </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>${mvn-jar-plugin.version}</version> - <executions> - <execution> - <id>default-jar</id> - <goals> - <goal>jar</goal> - </goals> - <configuration> - <archive> - <manifestEntries> - <Specification-Title>${project.name}</Specification-Title> - <Specification-Version>${project.version}</Specification-Version> - <Specification-Vendor>${project.organization.name}</Specification-Vendor> - <Implementation-Title>${project.name}</Implementation-Title> - <Implementation-Version>${project.version}</Implementation-Version> - <Implementation-Vendor>${project.organization.name}</Implementation-Vendor> - <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id> - <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK> - <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK> - <Automatic-Module-Name>${module.name}</Automatic-Module-Name> - </manifestEntries> - </archive> - </configuration> - </execution> - </executions> - </plugin> <plugin> <groupId>org.xolstice.maven.plugins</groupId> <artifactId>protobuf-maven-plugin</artifactId> @@ -498,7 +449,6 @@ limitations under the License. <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>${mvn-surefire-plugin.version}</version> <configuration> <reuseForks>false</reuseForks> <forkCount>1</forkCount> @@ -513,6 +463,9 @@ limitations under the License. <exclude>**/*$*</exclude> <exclude>${test.exclude.pattern}</exclude> </excludes> + <jdkToolchain> + <version>[1.8, 9)</version> + </jdkToolchain> </configuration> </plugin> @@ -521,7 +474,8 @@ limitations under the License. <artifactId>apache-rat-plugin</artifactId> <version>${rat.version}</version> <configuration> - <excludes> + <excludes combine.children="append"> + <!-- <exclude>**/.idea/</exclude> <exclude>**/*.iml</exclude> <exclude>src/main/resources/META-INF/services/**/*</exclude> @@ -532,7 +486,6 @@ limitations under the License. <exclude>**/*.yml</exclude> <exclude>**/*.yaml</exclude> <exclude>**/*.json</exclude> - <!-- ASF jenkins box puts the Maven repo in our root directory. --> <exclude>.repository/</exclude> <exclude>**/*.diff</exclude> <exclude>**/*.patch</exclude> @@ -548,6 +501,7 @@ limitations under the License. <exclude>**/metastore_db/</exclude> <exclude>.mvn/**</exclude> <exclude>**/exclude-pmd.properties</exclude> + --> </excludes> <consoleOutput>true</consoleOutput> </configuration> @@ -612,7 +566,6 @@ limitations under the License. <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>${mvn-spotbugs-plugin.version}</version> <executions> <execution> <id>verify.spotbugs</id> @@ -1404,7 +1357,7 @@ limitations under the License. <dependency> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-annotations</artifactId> - <version>${mvn-spotbugs-plugin.version}</version> + <version>${spotbugs-annotations.version}</version> <optional>true</optional> </dependency> <dependency> diff --git a/pom.xml b/pom.xml index 903c23a3a..b29164ead 100644 --- a/pom.xml +++ b/pom.xml @@ -19,9 +19,9 @@ limitations under the License. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> - <groupId>org.apache</groupId> - <artifactId>apache</artifactId> - <version>23</version> + <groupId>org.apache.logging</groupId> + <artifactId>logging-parent</artifactId> + <version>12.1.1</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -55,4 +55,19 @@ limitations under the License. <module>build-support</module> </modules> + <build> + <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes combine.children="append"> + // JSON file + <exclude>**/*.avsc</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + </project>
