commit 02413367a83791463d0ab4a4f5b92b106c506be2ee83f5bae22ed6e2881513d9 Author: Fridrich Strba Date: Thu Mar 14 09:46:03 2019 +0000 OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-shared-utils?expand=0&rev=1 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-Restore-compatibility-with-current-maven.patch b/0001-Restore-compatibility-with-current-maven.patch new file mode 100644 index 0000000..96d04f3 --- /dev/null +++ b/0001-Restore-compatibility-with-current-maven.patch @@ -0,0 +1,82 @@ +From e3d2a29743e1b36beaf1063567da9dfd2e5a8aa8 Mon Sep 17 00:00:00 2001 +From: Michael Simacek +Date: Mon, 26 Feb 2018 16:21:04 +0100 +Subject: [PATCH] Restore compatibility with current maven + +--- + .../maven/shared/utils/logging/AnsiMessageBuilder.java | 18 ++++++++++++++++++ + .../maven/shared/utils/logging/MessageBuilder.java | 3 +++ + .../shared/utils/logging/PlainMessageBuilder.java | 18 ++++++++++++++++++ + 3 files changed, 39 insertions(+) + +diff --git a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java +index 0103a6b..23b6d14 100644 +--- a/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java ++++ b/src/main/java/org/apache/maven/shared/utils/logging/AnsiMessageBuilder.java +@@ -153,4 +153,22 @@ class AnsiMessageBuilder + { + return ansi.toString(); + } ++ ++ @Override ++ public MessageBuilder debug(Object message) { ++ a(message); ++ return this; ++ } ++ ++ @Override ++ public MessageBuilder info(Object message) { ++ a(message); ++ return this; ++ } ++ ++ @Override ++ public MessageBuilder error(Object message) { ++ a(message); ++ return this; ++ } + } +diff --git a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java +index b60bb4e..1dc2624 100644 +--- a/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java ++++ b/src/main/java/org/apache/maven/shared/utils/logging/MessageBuilder.java +@@ -26,6 +26,9 @@ package org.apache.maven.shared.utils.logging; + */ + public interface MessageBuilder + { ++ MessageBuilder debug( Object message ); ++ MessageBuilder info( Object message ); ++ MessageBuilder error( Object message ); + /** + * Append message content in success style. + * By default, bold green +diff --git a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java +index 2eec001..5236e99 100644 +--- a/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java ++++ b/src/main/java/org/apache/maven/shared/utils/logging/PlainMessageBuilder.java +@@ -139,4 +139,22 @@ class PlainMessageBuilder + { + return buffer.toString(); + } ++ ++ @Override ++ public MessageBuilder debug(Object message) { ++ a(message); ++ return this; ++ } ++ ++ @Override ++ public MessageBuilder info(Object message) { ++ a(message); ++ return this; ++ } ++ ++ @Override ++ public MessageBuilder error(Object message) { ++ a(message); ++ return this; ++ } + } +-- +2.14.3 + diff --git a/maven-shared-utils-3.2.1-source-release.zip b/maven-shared-utils-3.2.1-source-release.zip new file mode 100644 index 0000000..afbe793 --- /dev/null +++ b/maven-shared-utils-3.2.1-source-release.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c665632595d37e10fe3543dc1cdee15b2d7eca77d35468c6b29f35ce9191f5cf +size 269433 diff --git a/maven-shared-utils-build.xml b/maven-shared-utils-build.xml new file mode 100644 index 0000000..3157cdd --- /dev/null +++ b/maven-shared-utils-build.xml @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maven-shared-utils.changes b/maven-shared-utils.changes new file mode 100644 index 0000000..8d8f9e2 --- /dev/null +++ b/maven-shared-utils.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Thu Mar 14 09:37:53 UTC 2019 - Fridrich Strba + +- Initial packaging of maven-shared-utils 3.2.1 +- Generate and customize ant build.xml diff --git a/maven-shared-utils.spec b/maven-shared-utils.spec new file mode 100644 index 0000000..87dc436 --- /dev/null +++ b/maven-shared-utils.spec @@ -0,0 +1,112 @@ +# +# spec file for package maven-shared-utils +# +# 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-shared-utils +Version: 3.2.1 +Release: 0 +Summary: Maven shared utility classes +License: Apache-2.0 +Group: Development/Libraries/Java +URL: http://maven.apache.org/shared/maven-shared-utils +Source0: http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip +Source1: %{name}-build.xml +# XXX temporary for maven upgrade +Patch0: 0001-Restore-compatibility-with-current-maven.patch +BuildRequires: ant +BuildRequires: apache-commons-io +BuildRequires: fdupes +BuildRequires: jansi +BuildRequires: javapackages-local +BuildRequires: jsr-305 +BuildRequires: plexus-classworlds +BuildRequires: plexus-containers-container-default +BuildRequires: plexus-utils +BuildRequires: unzip +Requires: mvn(commons-io:commons-io) +BuildArch: noarch +%if %{with tests} +BuildRequires: ant-junit +BuildRequires: apache-commons-lang3 +BuildRequires: maven-lib +BuildRequires: maven-plugin-testing-harness +BuildRequires: maven-resolver-api +%endif + +%description +This project aims to be a functional replacement for plexus-utils in Maven. + +It is not a 100% API compatible replacement though but a replacement with +improvements: lots of methods got cleaned up, generics got added and we dropped +a lot of unused code. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +API documentation for %{name}. + +%prep +%setup -q +cp %{SOURCE1} build.xml + +%patch0 -p1 + +%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin + +%pom_remove_parent . +%pom_xpath_inject pom:project "org.apache.maven.shared" . + +%build +mkdir -p lib +build-jar-repository -s lib commons-io jansi/jansi jsr305 \ + plexus/classworlds plexus-containers/plexus-container-default plexus/utils +%if %{with tests} + build-jar-repository -s lib commons-lang3 maven/maven-artifact maven/maven-core \ + maven/maven-model maven-plugin-testing/maven-plugin-testing-harness \ + maven-resolver/maven-resolver-api +%endif + +%{ant} \ +%if %{without tests} + -Dtest.skip=true \ +%endif + jar javadoc + +%install +# jar +install -dm 0755 %{buildroot}%{_javadir}/%{name} +install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar +# pom +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} +install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%license LICENSE NOTICE + +%files javadoc +%license LICENSE NOTICE +%{_javadocdir}/%{name} + +%changelog