From ced6331f4396023a0d4995c16f5afb1bc41e64e3b8ff159ac09eb8d92ab0c808 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 11 Jun 2024 21:50:00 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/java-comment-preprocessor?expand=0&rev=4 --- java-comment-preprocessor-logger.patch | 43 ++++++++++++++++++++++++++ java-comment-preprocessor.spec | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 java-comment-preprocessor-logger.patch diff --git a/java-comment-preprocessor-logger.patch b/java-comment-preprocessor-logger.patch new file mode 100644 index 0000000..8d3d3c0 --- /dev/null +++ b/java-comment-preprocessor-logger.patch @@ -0,0 +1,43 @@ +--- java-comment-preprocessor-6.1.4/src/main/java/com/igormaznitsa/jcp/maven/PreprocessorClearMojo.java 2024-06-11 23:04:17.976211259 +0200 ++++ java-comment-preprocessor-6.1.4/src/main/java/com/igormaznitsa/jcp/maven/PreprocessorClearMojo.java 2024-06-11 23:48:13.937250479 +0200 +@@ -23,11 +23,12 @@ + + import org.apache.commons.io.FileUtils; + import org.apache.maven.plugin.*; +-import org.apache.maven.plugin.logging.Log; + import org.apache.maven.plugins.annotations.*; + import org.apache.maven.plugins.annotations.Mojo; + import org.apache.maven.shared.model.fileset.FileSet; + import org.apache.maven.shared.model.fileset.util.FileSetManager; ++import org.slf4j.Logger; ++import org.slf4j.LoggerFactory; + + import com.igormaznitsa.meta.annotation.MustNotContainNull; + +@@ -69,7 +70,7 @@ + @Parameter(alias = "fileSets", required = false) + private List fileSets; + +- private void processPredefinedFolders(@Nonnull final Log log) throws MojoFailureException { ++ private void processPredefinedFolders(@Nonnull final Logger log) throws MojoFailureException { + if (this.preprocessedSources != null) { + final String path = preprocessedSources.getAbsolutePath(); + log.info("Removing preprocessed source folder '" + path + '\''); +@@ -101,7 +102,7 @@ + + @Override + public void execute() throws MojoExecutionException, MojoFailureException { +- final Log log = getLog(); ++ final Logger log = LoggerFactory.getLogger(PreprocessorClearMojo.class); + + log.info("Cleaning has been started"); + if (this.fileSets == null) { +@@ -112,7 +113,7 @@ + log.info("Cleaning has been completed"); + } + +- private void processFileSet(@Nonnull @MustNotContainNull final List fileSets, @Nonnull final Log log) throws MojoExecutionException { ++ private void processFileSet(@Nonnull @MustNotContainNull final List fileSets, @Nonnull final Logger log) throws MojoExecutionException { + final FileSetManager manager = new FileSetManager(log, true); + for (final FileSet fs : fileSets) { + try { diff --git a/java-comment-preprocessor.spec b/java-comment-preprocessor.spec index ae5dbe2..cea12ac 100644 --- a/java-comment-preprocessor.spec +++ b/java-comment-preprocessor.spec @@ -23,6 +23,7 @@ Summary: The Most Powerful Multi-Pass Java Preprocessor License: Apache-2.0 URL: https://github.com/raydac/java-comment-preprocessor Source0: https://github.com/raydac/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: java-comment-preprocessor-logger.patch BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: maven-local @@ -52,6 +53,7 @@ This package contains the API Documentation for %{name}. %prep %setup -q +%patch -P 0 -p1 # remove unpackaged and dangerous deps %pom_remove_plugin :animal-sniffer-maven-plugin