From a40255afd872bbb93513b66761e7d00b0cfac324aa0e31b5ca6df93df7006d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 19:23:21 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main plexus-bsh-factory revision 966179eceaa6c3a6f876f370a2ee1f27 --- .gitattributes | 23 ++++ ...-plexus-containers-container-default.patch | 73 +++++++++++ plexus-bsh-factory-build.xml | 124 ++++++++++++++++++ plexus-bsh-factory-encodingfix.patch | 11 ++ plexus-bsh-factory-license.txt | 26 ++++ plexus-bsh-factory-src.tar.gz | 3 + plexus-bsh-factory.changes | 10 ++ plexus-bsh-factory.spec | 97 ++++++++++++++ 8 files changed, 367 insertions(+) create mode 100644 .gitattributes create mode 100644 0001-Migrate-to-plexus-containers-container-default.patch create mode 100644 plexus-bsh-factory-build.xml create mode 100644 plexus-bsh-factory-encodingfix.patch create mode 100644 plexus-bsh-factory-license.txt create mode 100644 plexus-bsh-factory-src.tar.gz create mode 100644 plexus-bsh-factory.changes create mode 100644 plexus-bsh-factory.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/0001-Migrate-to-plexus-containers-container-default.patch b/0001-Migrate-to-plexus-containers-container-default.patch new file mode 100644 index 0000000..5fe7ecc --- /dev/null +++ b/0001-Migrate-to-plexus-containers-container-default.patch @@ -0,0 +1,73 @@ +From e501d0ee85bb661173c4c5c3fd1c74fabe78c2e3 Mon Sep 17 00:00:00 2001 +From: Michal Srb +Date: Wed, 10 Apr 2013 11:30:35 +0200 +Subject: [PATCH] Migrate to plexus-containers-container-default + +--- + .../component/factory/bsh/BshComponentFactory.java | 26 +++++++++++++++++----- + 1 file changed, 20 insertions(+), 6 deletions(-) + +diff --git a/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java b/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java +index f2f3437..5e39fcf 100644 +--- a/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java ++++ b/src/main/java/org/codehaus/plexus/component/factory/bsh/BshComponentFactory.java +@@ -8,6 +8,8 @@ import org.codehaus.plexus.PlexusContainer; + import org.codehaus.plexus.component.factory.AbstractComponentFactory; + import org.codehaus.plexus.component.factory.ComponentInstantiationException; + import org.codehaus.plexus.component.repository.ComponentDescriptor; ++import org.codehaus.plexus.component.repository.exception.ComponentLookupException; ++import org.codehaus.plexus.logging.Logger; + import org.codehaus.plexus.util.IOUtil; + + import java.io.FileNotFoundException; +@@ -68,24 +70,31 @@ public class BshComponentFactory + catch ( EvalError evalError ) + { + containerRealm.display(); +- +- container.getLogger().info( "Error text: " + evalError.getErrorText() ); +- ++ ++ try ++ { ++ container.lookup( Logger.class ).info( "Error text: " + evalError.getErrorText() ); ++ } ++ catch ( ComponentLookupException e ) ++ { ++ throw new ComponentInstantiationException( e ); ++ } ++ + throw new ComponentInstantiationException( "Cannot build component for: " + +- componentDescriptor.getComponentKey() + ++ componentDescriptor.toString() + + "; unable to read BeanShell script", evalError ); + } + catch ( FileNotFoundException e ) + { + containerRealm.display(); + throw new ComponentInstantiationException( "Cannot build component for: " + +- componentDescriptor.getComponentKey() + ++ componentDescriptor.toString() + + "; unable to read BeanShell script", e ); + } + catch ( IOException e ) + { + throw new ComponentInstantiationException( "Cannot build component for: " + +- componentDescriptor.getComponentKey() + ++ componentDescriptor.toString() + + "; unable to read BeanShell script", e ); + } + finally +@@ -96,4 +105,9 @@ public class BshComponentFactory + return result; + } + ++ public String getId() ++ { ++ return getClass().toString(); ++ } ++ + } +-- +1.8.1.4 + diff --git a/plexus-bsh-factory-build.xml b/plexus-bsh-factory-build.xml new file mode 100644 index 0000000..19561fa --- /dev/null +++ b/plexus-bsh-factory-build.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plexus-bsh-factory-encodingfix.patch b/plexus-bsh-factory-encodingfix.patch new file mode 100644 index 0000000..c75952b --- /dev/null +++ b/plexus-bsh-factory-encodingfix.patch @@ -0,0 +1,11 @@ +--- ./release-pom.xml.sav 2006-09-12 14:19:08.000000000 -0400 ++++ ./release-pom.xml 2006-09-12 14:19:13.000000000 -0400 +@@ -112,7 +112,7 @@ + + + trygvis +- Trygve Laugstøl ++ Trygve Laugstol + trygvis@codehaus.org + + Developer diff --git a/plexus-bsh-factory-license.txt b/plexus-bsh-factory-license.txt new file mode 100644 index 0000000..e5fe7ce --- /dev/null +++ b/plexus-bsh-factory-license.txt @@ -0,0 +1,26 @@ +From jason@maven.org Wed Jul 9 21:16:12 2008 +Return-Path: +To: dev@plexus.codehaus.org + +No one uses it anyway, so you can safely remove it. But the license is MIT if not stated, though it's all switching to ASL. + +***** + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plexus-bsh-factory-src.tar.gz b/plexus-bsh-factory-src.tar.gz new file mode 100644 index 0000000..fa59b96 --- /dev/null +++ b/plexus-bsh-factory-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f490a14679f7e3599a1ad940dbe7aefd61132e1eaf2aede0e59d199b7cb1451 +size 4915 diff --git a/plexus-bsh-factory.changes b/plexus-bsh-factory.changes new file mode 100644 index 0000000..fc1b50f --- /dev/null +++ b/plexus-bsh-factory.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Sun Mar 20 17:56:04 UTC 2022 - Fridrich Strba + +- Build with source and target levels 8 + +------------------------------------------------------------------- +Fri Mar 8 09:43:38 UTC 2019 - Fridrich Strba + +- Initial packaging of plexus-bsh-factory 1.0-alpha-7 +- Generate and customize ant build.xml file diff --git a/plexus-bsh-factory.spec b/plexus-bsh-factory.spec new file mode 100644 index 0000000..58844ca --- /dev/null +++ b/plexus-bsh-factory.spec @@ -0,0 +1,97 @@ +# +# spec file +# +# Copyright (c) 2022 SUSE LLC +# +# 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/ +# + + +%define parent plexus +%define subname bsh-factory +%define base_ver 1.0 +%define alpha_ver 7 +%define namedversion %{base_ver}-alpha-%{alpha_ver} +Name: %{parent}-%{subname} +Version: 1.0~a7 +Release: 0 +Summary: Plexus Bsh component factory +License: MIT +Group: Development/Libraries/Java +URL: http://plexus.codehaus.org/ +# svn export svn://svn.plexus.codehaus.org/plexus/tags/plexus-bsh-factory-1.0-alpha-7-SNAPSHOT plexus-bsh-factory/ +# tar czf plexus-bsh-factory-src.tar.gz plexus-bsh-factory/ +Source0: %{name}-src.tar.gz +Source1: %{name}-build.xml +Source3: plexus-bsh-factory-license.txt +Patch1: %{name}-encodingfix.patch +Patch2: 0001-Migrate-to-plexus-containers-container-default.patch +BuildRequires: ant +BuildRequires: bsh2 +BuildRequires: fdupes +BuildRequires: javapackages-local +BuildRequires: plexus-classworlds >= 2 +BuildRequires: plexus-containers-container-default +BuildRequires: plexus-utils +Requires: mvn(bsh:bsh) +Requires: mvn(classworlds:classworlds) +Requires: mvn(org.codehaus.plexus:plexus-container-default) +Requires: mvn(org.codehaus.plexus:plexus-utils) +BuildArch: noarch + +%description +Bsh component class creator for Plexus. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -n %{name} + +%patch1 -b .sav +%patch2 -p1 +cp release-pom.xml pom.xml +cp %{SOURCE1} build.xml +cp -p %{SOURCE3} . + +%build +mkdir -p lib + +build-jar-repository -s lib plexus/classworlds plexus/utils plexus-containers/plexus-container-default bsh2/bsh +%{ant} \ + jar javadoc + +%install +# jar +install -dm 0755 %{buildroot}%{_javadir}/%{parent} +install -pm 0644 target/%{name}-%{namedversion}.jar %{buildroot}%{_javadir}/%{parent}/%{subname}.jar +# pom +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{parent} +install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{parent}/%{subname}.pom +%add_maven_depmap %{parent}/%{subname}.pom %{parent}/%{subname}.jar +# javadoc +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/ +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles +%license plexus-bsh-factory-license.txt + +%files javadoc +%license plexus-bsh-factory-license.txt +%{_javadocdir}/%{name} + +%changelog