1
0

Accepting request 961013 from Java:packages

fix building with the new maven-reporting-api

OBS-URL: https://build.opensuse.org/request/show/961013
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/antlr-maven-plugin?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2022-03-11 20:41:20 +00:00 committed by Git OBS Bridge
commit b91931b6e7
3 changed files with 26 additions and 2 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Mar 11 07:10:16 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* new-reporting-api.patch
+ fix building with the new maven-reporting-api
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 5 14:50:16 UTC 2019 - Fridrich Strba <fstrba@suse.com> Fri Apr 5 14:50:16 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package antlr-maven-plugin # spec file for package antlr-maven-plugin
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -30,8 +30,10 @@ Patch0: maven-antlr-plugin-2.2-modello-issue.patch
Patch2: maven-antlr-plugin-2.1-sinkfix.patch Patch2: maven-antlr-plugin-2.1-sinkfix.patch
# Fix grammar processing bug (bz 1020312) # Fix grammar processing bug (bz 1020312)
Patch3: 0001-MANTLR-34-Fix-NPE-when-building-Jenkins.patch Patch3: 0001-MANTLR-34-Fix-NPE-when-building-Jenkins.patch
Patch4: new-reporting-api.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: maven-local BuildRequires: maven-local
BuildRequires: unzip
BuildRequires: mvn(org.apache.commons:commons-exec) BuildRequires: mvn(org.apache.commons:commons-exec)
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl) BuildRequires: mvn(org.apache.maven.reporting:maven-reporting-impl)
@ -42,7 +44,6 @@ BuildRequires: mvn(org.codehaus.modello:modello-maven-plugin)
BuildRequires: mvn(org.codehaus.mojo:mojo-parent:pom:) BuildRequires: mvn(org.codehaus.mojo:mojo-parent:pom:)
BuildRequires: mvn(org.codehaus.plexus:plexus-i18n) BuildRequires: mvn(org.codehaus.plexus:plexus-i18n)
BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
BuildRequires: unzip
BuildArch: noarch BuildArch: noarch
%description %description
@ -63,6 +64,7 @@ This package contains the API documentation for %{name}.
%patch0 -p1 -b .modello %patch0 -p1 -b .modello
%patch2 -b .sink %patch2 -b .sink
%patch3 -p1 -b .fixnpe %patch3 -p1 -b .fixnpe
%patch4 -p1
# reporting eventually pulls in another antlr and we'd break with weird errors # reporting eventually pulls in another antlr and we'd break with weird errors
%pom_xpath_inject "pom:dependency[pom:artifactId[text()='maven-reporting-impl']]/pom:exclusions" " %pom_xpath_inject "pom:dependency[pom:artifactId[text()='maven-reporting-impl']]/pom:exclusions" "

15
new-reporting-api.patch Normal file
View File

@ -0,0 +1,15 @@
--- antlr-maven-plugin-2.2/src/main/java/org/codehaus/mojo/antlr/AntlrHtmlReport.java 2010-11-16 16:59:34.000000000 +0100
+++ antlr-maven-plugin-2.2/src/main/java/org/codehaus/mojo/antlr/AntlrHtmlReport.java 2022-03-10 21:12:43.366027036 +0100
@@ -128,6 +128,12 @@
arguments.add( "-html" );
}
+ public void generate(
+ final org.apache.maven.doxia.sink.Sink sink,
+ final Locale locale) throws MavenReportException {
+ generate( (Sink) sink, locale);
+ }
+
/**
* @see org.apache.maven.reporting.MavenReport#generate(org.codehaus.doxia.sink.Sink, java.util.Locale)
*/