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..a095fb4 --- /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-1.0-alpha-7-SNAPSHOT.tar.gz b/plexus-bsh-factory-1.0-alpha-7-SNAPSHOT.tar.gz new file mode 100644 index 0000000..07116a8 Binary files /dev/null and b/plexus-bsh-factory-1.0-alpha-7-SNAPSHOT.tar.gz differ diff --git a/plexus-bsh-factory-license.txt b/plexus-bsh-factory-license.txt new file mode 100644 index 0000000..9c833b0 --- /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.spec b/plexus-bsh-factory.spec new file mode 100644 index 0000000..93e75d0 --- /dev/null +++ b/plexus-bsh-factory.spec @@ -0,0 +1,46 @@ +Name: plexus-bsh-factory +Version: 1.0 +Release: 1.20.a7 +Epoch: 0 +Summary: Plexus Bsh component factory +License: MIT +URL: https://github.com/codehaus/plexus +BuildArch: noarch +Source0: https://github.com/codehaus/plexus/archive/plexus-bsh-factory-1.0-alpha-7-SNAPSHOT.tar.gz +Source1: plexus-bsh-factory-license.txt + +Patch0001: 0001-Migrate-to-plexus-containers-container-default.patch + +BuildRequires: maven-local mvn(bsh:bsh) mvn(classworlds:classworlds) mvn(org.codehaus.plexus:plexus-container-default) mvn(org.codehaus.plexus:plexus-utils) + +%description +Bsh component class creator for Plexus. + +%package help +Summary: Helpful information for plexus-bsh-factory +Provides: %{name}-javadoc = %{version}-%{release} +Obsoletes: %{name}-javadoc < %{version}-%{release} + +%description help +Documents and helpful information for plexus-bsh-factory. + +%prep +%autosetup -n plexus-plexus-bsh-factory-1.0-alpha-7-SNAPSHOT -p1 +cp release-pom.xml pom.xml +cp -p %{SOURCE1} . + +%build +%mvn_file : plexus/bsh-factory +%mvn_build -f + +%install +%mvn_install + +%files -f .mfiles +%doc plexus-bsh-factory-license.txt + +%files help -f .mfiles-javadoc + +%changelog +* Thu Mar 12 2020 Jiang Kai - 1.0-1.20.a7 +- Package init