From af524006f6bea970e34b997fb8d27dadc936b496c981d9c08fdc88fc2d48fd96 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 29 Mar 2019 13:49:04 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-reporting-impl?expand=0&rev=1 --- .gitattributes | 23 ++ .gitignore | 1 + 0001-Remove-dependency-on-junit-addons.patch | 72 ++++++ maven-reporting-impl-3.0.0-source-release.zip | 3 + maven-reporting-impl-build.xml | 233 ++++++++++++++++++ maven-reporting-impl.changes | 5 + maven-reporting-impl.spec | 112 +++++++++ 7 files changed, 449 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0001-Remove-dependency-on-junit-addons.patch create mode 100644 maven-reporting-impl-3.0.0-source-release.zip create mode 100644 maven-reporting-impl-build.xml create mode 100644 maven-reporting-impl.changes create mode 100644 maven-reporting-impl.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0001-Remove-dependency-on-junit-addons.patch b/0001-Remove-dependency-on-junit-addons.patch new file mode 100644 index 0000000..c1fb584 --- /dev/null +++ b/0001-Remove-dependency-on-junit-addons.patch @@ -0,0 +1,72 @@ +From 2f414c5566febf44beb77c43340eafccad1547e2 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 17 Jul 2018 11:57:16 +0200 +Subject: [PATCH] Remove dependency on junit-addons + +--- + pom.xml | 6 ------ + .../apache/maven/reporting/AbstractMavenReportRenderer.java | 2 +- + .../maven/reporting/AbstractMavenReportRendererTest.java | 10 ++-------- + 3 files changed, 3 insertions(+), 15 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 239742e..dc75ecd 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -135,12 +135,6 @@ + 3.8.2 + test + +- +- junit-addons +- junit-addons +- 1.4 +- test +- + + + +diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java +index 6f954ae..c11acd3 100644 +--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java ++++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java +@@ -597,7 +597,7 @@ public abstract class AbstractMavenReportRenderer + * @param text a text with or without the pattern {text, url} + * @return a map of text/href + */ +- private static List applyPattern( String text ) ++ static List applyPattern( String text ) + { + if ( StringUtils.isEmpty( text ) ) + { +diff --git a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java +index cdb9299..e8dce8f 100644 +--- a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java ++++ b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java +@@ -24,7 +24,8 @@ import java.util.List; + + import junit.framework.Assert; + import junit.framework.TestCase; +-import junitx.util.PrivateAccessor; ++ ++import static org.apache.maven.reporting.AbstractMavenReportRenderer.applyPattern; + + /** + * Test case for some public method in AbstractMavenReportRenderer. +@@ -32,13 +33,6 @@ import junitx.util.PrivateAccessor; + public class AbstractMavenReportRendererTest + extends TestCase + { +- private static List applyPattern( String pattern ) +- throws Throwable +- { +- return (List) PrivateAccessor.invoke( AbstractMavenReportRenderer.class, "applyPattern", +- new Class[] { String.class }, new Object[] { pattern } ); +- } +- + private static void checkPattern( String pattern, String[] expectedResult ) throws Throwable + { + List result = applyPattern( pattern ); +-- +2.14.3 + diff --git a/maven-reporting-impl-3.0.0-source-release.zip b/maven-reporting-impl-3.0.0-source-release.zip new file mode 100644 index 0000000..5c59810 --- /dev/null +++ b/maven-reporting-impl-3.0.0-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d9fab3ffa5271f569262b1fdc752d64021854a5f9be163293add5c51b32f0c2 +size 43634 diff --git a/maven-reporting-impl-build.xml b/maven-reporting-impl-build.xml new file mode 100644 index 0000000..ea73464 --- /dev/null +++ b/maven-reporting-impl-build.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven-reporting-impl.changes b/maven-reporting-impl.changes new file mode 100644 index 0000000..3b47469 --- /dev/null +++ b/maven-reporting-impl.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Fri Mar 29 13:44:55 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-reporting-impl 3.0.0 +- Generate and customize ant build.xml file diff --git a/maven-reporting-impl.spec b/maven-reporting-impl.spec new file mode 100644 index 0000000..f43d0bf --- /dev/null +++ b/maven-reporting-impl.spec @@ -0,0 +1,112 @@ +# +# spec file for package maven-reporting-impl +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%bcond_with tests +Name: maven-reporting-impl +Version: 3.0.0 +Release: 0 +Summary: Abstract classes to manage report generation +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://maven.apache.org/shared/%{name} +Source0: http://repo1.maven.org/maven2/org/apache/maven/reporting/%{name}/%{version}/%{name}-%{version}-source-release.zip +Source1: %{name}-build.xml +Patch0: 0001-Remove-dependency-on-junit-addons.patch +BuildRequires: ant +BuildRequires: fdupes +BuildRequires: javapackages-local +BuildRequires: maven-doxia-core +BuildRequires: maven-doxia-logging-api +BuildRequires: maven-doxia-module-xhtml +BuildRequires: maven-doxia-sink-api +BuildRequires: maven-doxia-sitetools +BuildRequires: maven-lib +BuildRequires: maven-plugin-annotations +BuildRequires: maven-reporting-api +BuildRequires: maven-shared-utils +BuildRequires: plexus-utils +BuildRequires: unzip +BuildRequires: xmvn-install +BuildRequires: xmvn-resolve +BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:) +BuildArch: noarch +%if %{with tests} +BuildRequires: ant-junit +%endif + +%description +Abstract classes to manage report generation, which can be run both: + +* as part of a site generation (as a maven-reporting-api's MavenReport), +* or as a direct standalone invocation (as a maven-plugin-api's Mojo). + +This is a replacement package for maven-shared-reporting-impl + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q +cp %{SOURCE1} build.xml +%patch0 -p1 + +# integration tests try to download stuff from the internet +# and therefore they don't work in Build Service +%pom_remove_plugin :maven-invoker-plugin + +%build +mkdir -p lib +build-jar-repository -s lib \ + maven-doxia/doxia-core \ + maven-doxia/doxia-logging-api \ + maven-doxia/doxia-module-xhtml \ + maven-doxia/doxia-sink-api \ + maven-doxia-sitetools/doxia-decoration-model \ + maven-doxia-sitetools/doxia-site-renderer \ + maven/maven-core \ + maven/maven-plugin-api \ + maven-plugin-tools/maven-plugin-annotations \ + maven-reporting-api/maven-reporting-api \ + maven-shared-utils/maven-shared-utils \ + plexus/utils + +%{ant} \ +%if %{without tests} + -Dtest.skip=true \ +%endif + jar javadoc + +%{mvn_artifact} pom.xml target/%{name}-%{version}.jar + +%install +%mvn_install +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%license LICENSE +%doc NOTICE + +%files javadoc -f .mfiles-javadoc +%license LICENSE +%doc NOTICE + +%changelog