init plexus-bsh-factory
This commit is contained in:
parent
a15d06e282
commit
33f5f7e489
73
0001-Migrate-to-plexus-containers-container-default.patch
Normal file
73
0001-Migrate-to-plexus-containers-container-default.patch
Normal file
@ -0,0 +1,73 @@
|
||||
From e501d0ee85bb661173c4c5c3fd1c74fabe78c2e3 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <msrb@redhat.com>
|
||||
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
|
||||
|
||||
BIN
plexus-bsh-factory-1.0-alpha-7-SNAPSHOT.tar.gz
Normal file
BIN
plexus-bsh-factory-1.0-alpha-7-SNAPSHOT.tar.gz
Normal file
Binary file not shown.
26
plexus-bsh-factory-license.txt
Normal file
26
plexus-bsh-factory-license.txt
Normal file
@ -0,0 +1,26 @@
|
||||
From jason@maven.org Wed Jul 9 21:16:12 2008
|
||||
Return-Path: <dev-return-4811-tcallawa=redhat.com@plexus.codehaus.org>
|
||||
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.
|
||||
46
plexus-bsh-factory.spec
Normal file
46
plexus-bsh-factory.spec
Normal file
@ -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 <jiangkai20@huawei.com> - 1.0-1.20.a7
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user