From 93bd9e06bc7dabac2f8774d22d21a8d019709300 Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Sun, 29 Oct 2023 23:37:04 +0100 Subject: [PATCH] Drop plexus-container-default --- ReleaseNotes.md | 8 + plexus-container-default/pom.xml | 113 --- .../src/it/multi-plexus.xml/pom.xml | 27 - .../plexus/test/it/multiplx/Component.java | 26 - .../test/it/multiplx/ComponentImpl.java | 28 - .../main/resources/META-INF/plexus/plexus.xml | 8 - .../test/it/multiplx/ComponentLookupTest.java | 34 - .../src/it/plexus-its/pom.xml | 40 - .../java/org/codehaus/plexus/its/App.java | 12 - .../org/codehaus/plexus/its/DefaultApp.java | 27 - .../plexus/its/DefaultLogEnabledApp.java | 26 - .../java/org/codehaus/plexus/its/AppTest.java | 28 - .../component-with-plexus.xml/pom.xml | 6 - .../test/fodder/withplx/TestComponent.java | 24 - .../fodder/withplx/TestComponentImpl.java | 28 - .../main/resources/META-INF/plexus/plexus.xml | 8 - .../org/codehaus/plexus/ClassRealmUtil.java | 72 -- .../codehaus/plexus/ComponentRegistry.java | 64 -- .../plexus/ContainerConfiguration.java | 109 --- .../plexus/DefaultComponentRegistry.java | 526 ----------- .../plexus/DefaultContainerConfiguration.java | 317 ------- .../plexus/DefaultPlexusContainer.java | 788 ---------------- .../DuplicateChildContainerException.java | 40 - .../plexus/MutablePlexusContainer.java | 65 -- .../org/codehaus/plexus/PlexusConstants.java | 25 - .../org/codehaus/plexus/PlexusContainer.java | 435 --------- .../plexus/PlexusContainerException.java | 43 - .../codehaus/plexus/PlexusJUnit4TestCase.java | 250 ------ .../org/codehaus/plexus/PlexusTestCase.java | 230 ----- .../codehaus/plexus/component/CastUtils.java | 69 -- .../component/MapOrientedComponent.java | 30 - .../AbstractComponentBuildListener.java | 27 - .../builder/ComponentBuildListener.java | 28 - .../component/builder/ComponentBuilder.java | 27 - .../builder/XBeanComponentBuilder.java | 522 ----------- .../AbstractComponentCollection.java | 165 ---- .../component/collections/ComponentList.java | 223 ----- .../component/collections/ComponentMap.java | 196 ---- .../composition/CompositionResolver.java | 58 -- ...ycleDetectedInComponentGraphException.java | 46 - .../DefaultCompositionResolver.java | 76 -- .../UndefinedComponentComposerException.java | 34 - .../AbstractComponentConfigurator.java | 116 --- .../BasicComponentConfigurator.java | 57 -- .../ComponentConfigurationException.java | 48 - .../configurator/ComponentConfigurator.java | 54 -- .../configurator/ConfigurationListener.java | 48 - .../MapOrientedComponentConfigurator.java | 48 - .../AbstractConfigurationConverter.java | 183 ---- .../converters/ComponentValueSetter.java | 219 ----- .../converters/ConfigurationConverter.java | 77 -- .../basic/AbstractBasicConverter.java | 121 --- .../converters/basic/BooleanConverter.java | 36 - .../converters/basic/ByteConverter.java | 36 - .../converters/basic/CharConverter.java | 36 - .../converters/basic/ClassConverter.java | 36 - .../converters/basic/Converter.java | 44 - .../converters/basic/DateConverter.java | 60 -- .../converters/basic/DoubleConverter.java | 36 - .../converters/basic/EnumConverter.java | 72 -- .../converters/basic/FileConverter.java | 67 -- .../converters/basic/FloatConverter.java | 36 - .../converters/basic/IntConverter.java | 42 - .../converters/basic/LongConverter.java | 36 - .../converters/basic/ShortConverter.java | 36 - .../basic/StringBufferConverter.java | 35 - .../converters/basic/StringConverter.java | 35 - .../converters/basic/UriConverter.java | 44 - .../converters/basic/UrlConverter.java | 47 - .../converters/composite/ArrayConverter.java | 134 --- .../composite/CollectionConverter.java | 174 ---- .../converters/composite/MapConverter.java | 81 -- .../composite/ObjectWithFieldsConverter.java | 129 --- .../PlexusConfigurationConverter.java | 55 -- .../composite/PropertiesConverter.java | 99 -- .../converters/lookup/ConverterLookup.java | 35 - .../lookup/DefaultConverterLookup.java | 158 ---- .../special/ClassRealmConverter.java | 81 -- .../DefaultExpressionEvaluator.java | 40 - .../ExpressionEvaluationException.java | 32 - .../expression/ExpressionEvaluator.java | 45 - .../TypeAwareExpressionEvaluator.java | 37 - ...tractResourceBasedComponentDiscoverer.java | 90 -- .../AnnotationBasedComponentDiscoverer.java | 8 - .../discovery/ComponentDiscoverer.java | 32 - .../discovery/ComponentDiscovererManager.java | 38 - .../discovery/ComponentDiscoveryEvent.java | 56 -- .../discovery/ComponentDiscoveryListener.java | 28 - .../discovery/DefaultComponentDiscoverer.java | 80 -- .../DefaultComponentDiscovererManager.java | 68 -- .../DiscoveryListenerDescriptor.java | 35 - .../PlexusXmlComponentDiscoverer.java | 69 -- .../ResourceBasedComponentDiscoverer.java | 11 - .../factory/AbstractComponentFactory.java | 47 - .../component/factory/ComponentFactory.java | 38 - .../factory/ComponentFactoryManager.java | 27 - .../ComponentInstantiationException.java | 37 - .../DefaultComponentFactoryManager.java | 50 -- .../UndefinedComponentFactoryException.java | 37 - .../factory/java/JavaComponentFactory.java | 96 -- .../manager/AbstractComponentManager.java | 203 ----- .../component/manager/ComponentManager.java | 81 -- .../manager/ComponentManagerFactory.java | 31 - .../manager/PerLookupComponentManager.java | 55 -- .../PerLookupComponentManagerFactory.java | 21 - .../manager/SingletonComponentManager.java | 63 -- .../SingletonComponentManagerFactory.java | 21 - .../UndefinedComponentManagerException.java | 26 - .../repository/ComponentDependency.java | 118 --- .../repository/ComponentDescriptor.java | 628 ------------- .../repository/ComponentRepository.java | 39 - .../repository/ComponentRequirement.java | 167 ---- .../repository/ComponentRequirementList.java | 34 - .../repository/ComponentSetDescriptor.java | 148 --- .../DefaultComponentRepository.java | 215 ----- .../ComponentConfigurationException.java | 44 - ...onentDescriptorUnmarshallingException.java | 44 - ...ponentImplementationNotFoundException.java | 45 - .../ComponentLifecycleException.java | 44 - .../exception/ComponentLookupException.java | 99 -- .../ComponentLookupRuntimeException.java | 33 - ...anagerImplementationNotFoundException.java | 44 - .../exception/ComponentProfileException.java | 44 - .../ComponentRepositoryException.java | 44 - .../component/repository/io/PlexusTools.java | 258 ------ .../DefaultPlexusConfiguration.java | 211 ----- .../PlexusComponentDescriptorMerger.java | 105 --- .../configuration/PlexusConfiguration.java | 176 ---- .../PlexusConfigurationException.java | 42 - .../PlexusConfigurationMerger.java | 309 ------- .../PlexusConfigurationResourceException.java | 23 - .../io/PlexusConfigurationReader.java | 14 - .../io/PlexusConfigurationWriter.java | 13 - .../io/XmlPlexusConfigurationReader.java | 31 - .../io/XmlPlexusConfigurationWriter.java | 100 --- .../source/ChainedConfigurationSource.java | 40 - .../source/ConfigurationSource.java | 18 - .../source/ContainerConfigurationSource.java | 15 - .../xml/XmlPlexusConfiguration.java | 75 -- .../AbstractContainerInitializationPhase.java | 22 - ...tractCoreComponentInitializationPhase.java | 27 - .../ContainerInitializationContext.java | 75 -- .../ContainerInitializationException.java | 34 - .../ContainerInitializationPhase.java | 26 - ...ializeComponentDiscovererManagerPhase.java | 51 -- ...nitializeComponentFactoryManagerPhase.java | 47 - .../InitializeComponentRegistryPhase.java | 83 -- ...lizeContainerConfigurationSourcePhase.java | 41 - .../InitializeLoggerManagerPhase.java | 69 -- .../InitializeSystemPropertiesPhase.java | 46 - ...nitializeUserConfigurationSourcePhase.java | 89 -- .../org/codehaus/plexus/context/Context.java | 77 -- .../plexus/context/ContextException.java | 50 -- .../plexus/context/ContextMapAdapter.java | 41 - .../plexus/context/DefaultContext.java | 145 --- .../lifecycle/AbstractLifecycleHandler.java | 117 --- .../lifecycle/BasicLifecycleHandler.java | 32 - .../DefaultLifecycleHandlerManager.java | 54 -- .../plexus/lifecycle/LifecycleHandler.java | 77 -- .../lifecycle/LifecycleHandlerManager.java | 31 - .../UndefinedLifecycleHandlerException.java | 23 - .../plexus/lifecycle/phase/AbstractPhase.java | 37 - .../plexus/lifecycle/phase/Phase.java | 32 - .../plexus/logging/AbstractLogEnabled.java | 53 -- .../plexus/logging/AbstractLogger.java | 114 --- .../plexus/logging/AbstractLoggerManager.java | 57 -- .../plexus/logging/BaseLoggerManager.java | 165 ---- .../codehaus/plexus/logging/LogEnabled.java | 23 - .../org/codehaus/plexus/logging/Logger.java | 79 -- .../plexus/logging/LoggerManager.java | 68 -- .../plexus/logging/console/ConsoleLogger.java | 92 -- .../logging/console/ConsoleLoggerManager.java | 226 ----- .../lifecycle/phase/AutoConfigurePhase.java | 61 -- .../plexus/lifecycle/phase/Configurable.java | 29 - .../lifecycle/phase/ConfigurablePhase.java | 36 - .../lifecycle/phase/Contextualizable.java | 27 - .../lifecycle/phase/ContextualizePhase.java | 42 - .../plexus/lifecycle/phase/Disposable.java | 27 - .../plexus/lifecycle/phase/DisposePhase.java | 29 - .../plexus/lifecycle/phase/Initializable.java | 27 - .../phase/InitializationException.java | 32 - .../lifecycle/phase/InitializePhase.java | 34 - .../lifecycle/phase/LogDisablePhase.java | 36 - .../lifecycle/phase/LogEnablePhase.java | 40 - .../phase/PhaseExecutionException.java | 28 - .../phase/PlexusContainerLocator.java | 73 -- .../plexus/lifecycle/phase/ResumePhase.java | 29 - .../lifecycle/phase/ServiceLocator.java | 60 -- .../plexus/lifecycle/phase/Serviceable.java | 26 - .../lifecycle/phase/ServiceablePhase.java | 32 - .../plexus/lifecycle/phase/StartPhase.java | 34 - .../plexus/lifecycle/phase/Startable.java | 23 - .../lifecycle/phase/StartingException.java | 32 - .../plexus/lifecycle/phase/StopPhase.java | 34 - .../lifecycle/phase/StoppingException.java | 32 - .../plexus/lifecycle/phase/SuspendPhase.java | 29 - .../plexus/lifecycle/phase/Suspendable.java | 23 - .../src/main/mdo/components.mdo | 245 ----- .../src/main/mdo/plexus.mdo | 190 ---- .../resources/META-INF/plexus/components.xml | 14 - .../src/site/apt/index.apt | 43 - plexus-container-default/src/site/site.xml | 45 - .../DefaultComponentLookupManagerTest.java | 30 - .../plexus/DyanamicComponentKungFuTest.java | 97 -- .../plexus/PlexusJUnit4TestCaseTest.java | 27 - .../codehaus/plexus/PlexusTestCaseTest.java | 98 -- .../MapOrientedComponentProcessingTest.java | 76 -- .../plexus/component/PlexusTestCaseTest.java | 24 - .../component/TestMapOrientedComponent.java | 41 - .../composition/AbstractComponent.java | 31 - .../AbstractCompositionResolverTest.java | 208 ----- .../component/composition/Component.java | 25 - .../component/composition/ComponentA.java | 29 - .../component/composition/ComponentB.java | 27 - .../component/composition/ComponentC.java | 25 - .../component/composition/ComponentD.java | 25 - .../component/composition/ComponentE.java | 25 - .../component/composition/ComponentF.java | 71 -- .../ComponentRealmCompositionTest.java | 133 --- ...mponentWithSeveralFieldsOfTheSameType.java | 34 - .../composition/DefaultComponent.java | 25 - .../composition/DefaultComponentA.java | 36 - .../composition/DefaultComponentB.java | 35 - .../composition/DefaultComponentC.java | 25 - .../DefaultComponentComposerManagerTest.java | 42 - .../DefaultCompositionResolverTest.java | 29 - .../configurator/AbstractComponent.java | 39 - .../AbstractComponentConfiguratorTest.java | 850 ------------------ .../component/configurator/AbstractThing.java | 27 - .../BasicComponentConfiguratorTest.java | 31 - .../component/configurator/Component.java | 33 - .../ComponentWithArrayFields.java | 75 -- .../ComponentWithCollectionFields.java | 72 -- .../ComponentWithCompositeFields.java | 44 - .../configurator/ComponentWithEnumFields.java | 51 -- .../configurator/ComponentWithMapField.java | 40 - .../ComponentWithPropertiesField.java | 40 - .../configurator/ComponentWithSetters.java | 127 --- .../configurator/ConfigurableComponent.java | 111 --- .../configurator/DefaultComponent.java | 39 - .../configurator/ImportantThing.java | 39 - .../configurator/ThingInterface.java | 29 - .../XBeanComponentConfiguratorTest.java | 68 -- .../discovery/ComponentDiscovererTest.java | 75 -- .../discovery/DefaultDiscoveredComponent.java | 25 - .../discovery/DiscoveredComponent.java | 27 - .../plexus/component/factory/Component.java | 23 - .../component/factory/ComponentImplA.java | 25 - .../component/factory/ComponentImplB.java | 23 - .../component/factory/ComponentImplC.java | 23 - .../DiscoveredComponentFactoryTest.java | 58 -- .../factory/TestComponentFactory1.java | 33 - .../factory/TestComponentFactory2.java | 33 - .../factory/TestFactoryResultComponent.java | 30 - .../java/JavaComponentFactoryTest.java | 104 --- .../nonjava/NonJavaComponentFactory.java | 19 - .../nonjava/NonJavaComponentFactoryTest.java | 13 - .../ClassicSingletonComponentManagerTest.java | 24 - .../plexus/component/manager/Component.java | 6 - .../component/manager/DefaultComponent.java | 4 - .../component/manager/SlowComponent.java | 42 - ...tClassicSingletonComponentManagerTest.java | 99 -- .../DefaultComponentRegistryTest.java | 47 - .../registry/TestSynchronizedComponent.java | 25 - .../repository/ComponentDescriptorTest.java | 91 -- .../repository/ComponentRequirementTest.java | 33 - .../repository/ComponentSetTest.java | 100 --- .../DefaultComponentRepositoryTest.java | 31 - .../ConfigurationResourceExceptionTest.java | 33 - .../ConfigurationTestHelper.java | 73 -- .../DefaultPlexusConfigurationTest.java | 113 --- .../io/XmlPlexusConfigurationReaderTest.java | 19 - .../io/XmlPlexusConfigurationWriterTest.java | 30 - .../source/ADummyConfigurationSource.java | 11 - .../AnotherDummyConfigurationSource.java | 13 - .../DefaultConfigurationSourceTest.java | 18 - .../ExtendingConfigurationSourceTest.java | 28 - .../OverridingConfigurationSourceTest.java | 17 - .../xml/XmlPlexusConfigurationTest.java | 90 -- .../plexus/context/ContextMapAdapterTest.java | 68 -- .../plexus/context/DefaultContextTest.java | 110 --- .../plexus/hierarchy/PlexusHierarchyTest.java | 0 .../plexus/hierarchy/PlexusTestService.java | 0 .../plexus/hierarchy/TestServiceImpl.java | 0 .../logging/AbstractLoggerManagerTest.java | 213 ----- .../logging/CustomLoggerManagerTest.java | 34 - .../plexus/logging/LogEnabledTest.java | 72 -- .../plexus/logging/MockLogEnabled.java | 24 - .../codehaus/plexus/logging/MockLogger.java | 84 -- .../plexus/logging/MockLoggerManager.java | 58 -- .../console/ConsoleLoggerManagerTest.java | 45 - .../logging/console/ConsoleLoggerTest.java | 129 --- .../test/AbstractStartableComponent.java | 59 -- .../java/org/codehaus/plexus/test/Action.java | 25 - .../codehaus/plexus/test/AddUserAction.java | 25 - .../plexus/test/CircularComponent.java | 5 - .../org/codehaus/plexus/test/Component.java | 35 - .../org/codehaus/plexus/test/ComponentA.java | 29 - .../org/codehaus/plexus/test/ComponentB.java | 21 - .../org/codehaus/plexus/test/ComponentC.java | 23 - .../org/codehaus/plexus/test/ComponentD.java | 23 - .../plexus/test/ComponentManager.java | 27 - .../plexus/test/ComponentWithRoleDefault.java | 19 - .../codehaus/plexus/test/ConcreteThing.java | 19 - .../plexus/test/CountInstancesComponent.java | 40 - .../plexus/test/DefaultCircularComponent.java | 24 - .../plexus/test/DefaultComponent.java | 39 - .../plexus/test/DefaultComponentA.java | 51 -- .../plexus/test/DefaultComponentB.java | 22 - .../plexus/test/DefaultComponentC.java | 25 - .../plexus/test/DefaultComponentD.java | 25 - .../plexus/test/DefaultComponentManager.java | 35 - ...faultComponentWithOptionalRequirement.java | 22 - .../test/DefaultLoadOnStartService.java | 35 - ...DefaultLoadOnStartServiceWithRoleHint.java | 25 - .../codehaus/plexus/test/DefaultServiceB.java | 57 -- .../codehaus/plexus/test/DefaultServiceC.java | 32 - .../codehaus/plexus/test/DefaultServiceD.java | 19 - .../codehaus/plexus/test/DefaultServiceE.java | 59 -- .../codehaus/plexus/test/DefaultServiceH.java | 58 -- .../test/DefaultStartableComponentA.java | 3 - .../test/DefaultStartableComponentB.java | 3 - .../test/DefaultStartableComponentC.java | 3 - .../test/DefaultStartableComponentD.java | 3 - .../test/DefaultStartableComponentE.java | 3 - .../plexus/test/DefaultThingUser.java | 22 - .../codehaus/plexus/test/LiveComponent.java | 19 - .../plexus/test/LoadOnStartService.java | 27 - .../test/LoadOnStartServiceWithRoleHint.java | 27 - .../plexus/test/PlexusContainerTest.java | 792 ---------------- .../org/codehaus/plexus/test/ServiceB.java | 21 - .../org/codehaus/plexus/test/ServiceC.java | 21 - .../org/codehaus/plexus/test/ServiceD.java | 21 - .../org/codehaus/plexus/test/ServiceE.java | 21 - .../org/codehaus/plexus/test/ServiceH.java | 21 - .../plexus/test/SimpleLifecycleHandler.java | 33 - .../plexus/test/StartableComponent.java | 15 - .../java/org/codehaus/plexus/test/Thing.java | 19 - .../org/codehaus/plexus/test/ThingUser.java | 19 - .../plexus/test/lifecycle/phase/Eeny.java | 27 - .../test/lifecycle/phase/EenyPhase.java | 29 - .../plexus/test/lifecycle/phase/Meeny.java | 27 - .../test/lifecycle/phase/MeenyPhase.java | 29 - .../plexus/test/lifecycle/phase/Miny.java | 27 - .../test/lifecycle/phase/MinyPhase.java | 29 - .../plexus/test/lifecycle/phase/Mo.java | 27 - .../plexus/test/lifecycle/phase/MoPhase.java | 29 - .../plexus/test/list/AbstractValve.java | 35 - .../plexus/test/list/DefaultPipeline.java | 46 - .../codehaus/plexus/test/list/Pipeline.java | 34 - .../org/codehaus/plexus/test/list/Valve.java | 31 - .../codehaus/plexus/test/list/ValveFour.java | 25 - .../codehaus/plexus/test/list/ValveOne.java | 25 - .../codehaus/plexus/test/list/ValveThree.java | 25 - .../codehaus/plexus/test/list/ValveTwo.java | 25 - .../plexus/test/map/AbstractActivity.java | 35 - .../codehaus/plexus/test/map/Activity.java | 31 - .../plexus/test/map/ActivityManager.java | 33 - .../codehaus/plexus/test/map/ActivityOne.java | 25 - .../codehaus/plexus/test/map/ActivityTwo.java | 25 - .../test/map/DefaultActivityManager.java | 41 - .../plexus/test/map/NoComponentsMapTest.java | 32 - .../resources/META-INF/plexus/components.xml | 20 - .../test/resources/META-INF/plexus/plexus.xml | 13 - .../test/resources/application/components.xml | 54 -- .../application/configuration-mapping.xml | 42 - .../test/resources/application/sentinel.xml | 28 - .../resources/inline-configuration.properties | 2 - .../test/resources/inline-configuration.xml | 4 - .../src/test/resources/jar-repository/a.jar | Bin 990 -> 0 bytes .../src/test/resources/jar-repository/b.jar | Bin 820 -> 0 bytes .../src/test/resources/jar-repository/c.jar | Bin 722 -> 0 bytes .../src/test/resources/jar-repository/d.jar | Bin 718 -> 0 bytes .../codehaus/plexus/PlexusTestCaseTest.xml | 14 - .../autowire/AutowireCompositionTest.xml | 12 - .../component/composition/components.xml | 58 -- .../setter/SetterCompositionTest.xml | 25 - .../nonjava/NonJavaComponentFactoryTest.xml | 9 - .../ClassicSingletonComponentManagerTest.xml | 8 - ...ntClassicSingletonComponentManagerTest.xml | 11 - .../org/codehaus/plexus/components.xml | 14 - .../codehaus/plexus/configuration/avalon.xml | 193 ---- .../ExtendingConfigurationSourceTest.xml | 28 - .../OverridingConfigurationSourceTest.xml | 9 - .../codehaus/plexus/embed/EmbedderTest.xml | 19 - .../plexus/hierarchy/ChildPlexusOne.xml | 39 - .../plexus/hierarchy/ChildPlexusTwo.xml | 30 - .../plexus/hierarchy/PlexusHierarchyTest.xml | 69 -- .../logging/CustomLoggerManagerTest.xml | 8 - .../console/ConsoleLoggerManagerTest.xml | 20 - .../plexus/test/PlexusContainerTest.xml | 464 ---------- .../plexus/test/map/NoComponentsMapTest.xml | 34 - .../src/test/resources/test.txt | 1 - .../test-component-builds/component-a/pom.xml | 24 - .../org/codehaus/plexus/components/A.java | 6 - .../codehaus/plexus/components/DefaultA.java | 13 - .../test-component-builds/component-b/pom.xml | 24 - .../org/codehaus/plexus/components/B.java | 6 - .../codehaus/plexus/components/DefaultB.java | 13 - .../test-component-builds/component-c/pom.xml | 24 - .../org/codehaus/plexus/components/C.java | 6 - .../codehaus/plexus/components/DefaultC.java | 13 - .../test-component-builds/plugin0/pom.xml | 45 - .../codehaus/plexus/plugins/AltPlugin0.java | 51 -- .../plexus/plugins/DefaultPlugin0.java | 51 -- .../org/codehaus/plexus/plugins/Plugin0.java | 6 - .../test-component-builds/plugin1/pom.xml | 35 - .../codehaus/plexus/plugins/AltPlugin1.java | 22 - .../plexus/plugins/DefaultPlugin1.java | 22 - .../org/codehaus/plexus/plugins/Plugin1.java | 6 - .../src/test/test-component-builds/pom.xml | 15 - .../component-a-1.0-SNAPSHOT.jar | Bin 3329 -> 0 bytes .../component-a-2.0-SNAPSHOT.jar | Bin 3329 -> 0 bytes .../component-b-1.0-SNAPSHOT.jar | Bin 3329 -> 0 bytes .../component-c-1.0-SNAPSHOT.jar | Bin 3328 -> 0 bytes .../plexus-archiver-1.0-alpha-8.jar | Bin 150172 -> 0 bytes .../test-components/plugin0-1.0-SNAPSHOT.jar | Bin 5100 -> 0 bytes .../test-components/plugin1-1.0-SNAPSHOT.jar | Bin 4006 -> 0 bytes pom.xml | 1 - 419 files changed, 8 insertions(+), 25390 deletions(-) delete mode 100644 plexus-container-default/pom.xml delete mode 100644 plexus-container-default/src/it/multi-plexus.xml/pom.xml delete mode 100644 plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/Component.java delete mode 100644 plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/ComponentImpl.java delete mode 100644 plexus-container-default/src/it/multi-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml delete mode 100644 plexus-container-default/src/it/multi-plexus.xml/src/test/java/org/codehaus/plexus/test/it/multiplx/ComponentLookupTest.java delete mode 100644 plexus-container-default/src/it/plexus-its/pom.xml delete mode 100644 plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/App.java delete mode 100644 plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultApp.java delete mode 100644 plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultLogEnabledApp.java delete mode 100644 plexus-container-default/src/it/plexus-its/src/test/java/org/codehaus/plexus/its/AppTest.java delete mode 100644 plexus-container-default/src/it/test-fodder/component-with-plexus.xml/pom.xml delete mode 100644 plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponent.java delete mode 100644 plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponentImpl.java delete mode 100644 plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/ClassRealmUtil.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/ComponentRegistry.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/ContainerConfiguration.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/DefaultComponentRegistry.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/DefaultContainerConfiguration.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/DefaultPlexusContainer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/DuplicateChildContainerException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/MutablePlexusContainer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/PlexusConstants.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainerException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/PlexusJUnit4TestCase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/PlexusTestCase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/CastUtils.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/MapOrientedComponent.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/AbstractComponentBuildListener.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuildListener.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuilder.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/XBeanComponentBuilder.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/AbstractComponentCollection.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentList.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentMap.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CompositionResolver.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CycleDetectedInComponentGraphException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/DefaultCompositionResolver.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/UndefinedComponentComposerException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/AbstractComponentConfigurator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/BasicComponentConfigurator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ConfigurationListener.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/MapOrientedComponentConfigurator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/AbstractConfigurationConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ComponentValueSetter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ConfigurationConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/AbstractBasicConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/BooleanConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ByteConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/CharConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ClassConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/Converter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DateConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DoubleConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/EnumConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FileConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FloatConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/IntConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/LongConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ShortConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBufferConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UriConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UrlConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ArrayConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/CollectionConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/MapConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ObjectWithFieldsConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PlexusConfigurationConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PropertiesConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/ConverterLookup.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/DefaultConverterLookup.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/special/ClassRealmConverter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/DefaultExpressionEvaluator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/TypeAwareExpressionEvaluator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AbstractResourceBasedComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AnnotationBasedComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscovererManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryEvent.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryListener.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscovererManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DiscoveryListenerDescriptor.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/PlexusXmlComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ResourceBasedComponentDiscoverer.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/AbstractComponentFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactoryManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentInstantiationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/DefaultComponentFactoryManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/UndefinedComponentFactoryException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/java/JavaComponentFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/AbstractComponentManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManagerFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManagerFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManagerFactory.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/UndefinedComponentManagerException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDependency.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDescriptor.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRepository.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirement.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirementList.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentSetDescriptor.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/DefaultComponentRepository.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentConfigurationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentDescriptorUnmarshallingException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentImplementationNotFoundException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLifecycleException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupRuntimeException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentManagerImplementationNotFoundException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentProfileException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentRepositoryException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/io/PlexusTools.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/DefaultPlexusConfiguration.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusComponentDescriptorMerger.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfiguration.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationMerger.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationResourceException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationReader.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationWriter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReader.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ChainedConfigurationSource.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ConfigurationSource.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ContainerConfigurationSource.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfiguration.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractContainerInitializationPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractCoreComponentInitializationPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationContext.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentDiscovererManagerPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentFactoryManagerPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentRegistryPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeContainerConfigurationSourcePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeLoggerManagerPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeSystemPropertiesPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeUserConfigurationSourcePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/context/Context.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextMapAdapter.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/context/DefaultContext.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/AbstractLifecycleHandler.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/BasicLifecycleHandler.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/DefaultLifecycleHandlerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandler.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandlerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/UndefinedLifecycleHandlerException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/AbstractPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/Phase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogEnabled.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogger.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLoggerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/BaseLoggerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/LogEnabled.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/Logger.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/LoggerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLogger.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLoggerManager.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/AutoConfigurePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Configurable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ConfigurablePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ContextualizePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/DisposePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Initializable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializationException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogDisablePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogEnablePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PhaseExecutionException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PlexusContainerLocator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ResumePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceLocator.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Serviceable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceablePhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Startable.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartingException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StopPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StoppingException.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/SuspendPhase.java delete mode 100644 plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Suspendable.java delete mode 100644 plexus-container-default/src/main/mdo/components.mdo delete mode 100644 plexus-container-default/src/main/mdo/plexus.mdo delete mode 100644 plexus-container-default/src/main/resources/META-INF/plexus/components.xml delete mode 100644 plexus-container-default/src/site/apt/index.apt delete mode 100644 plexus-container-default/src/site/site.xml delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/DefaultComponentLookupManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/DyanamicComponentKungFuTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/PlexusJUnit4TestCaseTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/PlexusTestCaseTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/MapOrientedComponentProcessingTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/PlexusTestCaseTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/TestMapOrientedComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractCompositionResolverTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/Component.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentE.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentF.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentRealmCompositionTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentWithSeveralFieldsOfTheSameType.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentComposerManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultCompositionResolverTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponentConfiguratorTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractThing.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/BasicComponentConfiguratorTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/Component.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithArrayFields.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCollectionFields.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCompositeFields.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithEnumFields.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithMapField.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithPropertiesField.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithSetters.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ConfigurableComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/DefaultComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ImportantThing.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ThingInterface.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/XBeanComponentConfiguratorTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/ComponentDiscovererTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DefaultDiscoveredComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DiscoveredComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/Component.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/DiscoveredComponentFactoryTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory1.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory2.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestFactoryResultComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/java/JavaComponentFactoryTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactory.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/Component.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/DefaultComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/DefaultComponentRegistryTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/TestSynchronizedComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentDescriptorTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentRequirementTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentSetTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/DefaultComponentRepositoryTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationResourceExceptionTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationTestHelper.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/DefaultPlexusConfigurationTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReaderTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriterTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ADummyConfigurationSource.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/AnotherDummyConfigurationSource.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/DefaultConfigurationSourceTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfigurationTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/context/ContextMapAdapterTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/context/DefaultContextTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusTestService.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/TestServiceImpl.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/AbstractLoggerManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/CustomLoggerManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/LogEnabledTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogEnabled.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogger.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLoggerManager.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/AbstractStartableComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/Action.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/AddUserAction.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/CircularComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/Component.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentManager.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentWithRoleDefault.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ConcreteThing.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/CountInstancesComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultCircularComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentManager.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentWithOptionalRequirement.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartService.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartServiceWithRoleHint.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceE.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceH.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentA.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentE.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultThingUser.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/LiveComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartService.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartServiceWithRoleHint.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/PlexusContainerTest.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceB.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceC.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceD.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceE.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceH.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/SimpleLifecycleHandler.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/StartableComponent.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/Thing.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/ThingUser.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Eeny.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/EenyPhase.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Meeny.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MeenyPhase.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Miny.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MinyPhase.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Mo.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MoPhase.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/AbstractValve.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/DefaultPipeline.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Pipeline.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Valve.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveFour.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveOne.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveThree.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveTwo.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/AbstractActivity.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/Activity.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityManager.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityOne.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityTwo.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/DefaultActivityManager.java delete mode 100644 plexus-container-default/src/test/java/org/codehaus/plexus/test/map/NoComponentsMapTest.java delete mode 100644 plexus-container-default/src/test/resources/META-INF/plexus/components.xml delete mode 100644 plexus-container-default/src/test/resources/META-INF/plexus/plexus.xml delete mode 100644 plexus-container-default/src/test/resources/application/components.xml delete mode 100644 plexus-container-default/src/test/resources/application/configuration-mapping.xml delete mode 100644 plexus-container-default/src/test/resources/application/sentinel.xml delete mode 100644 plexus-container-default/src/test/resources/inline-configuration.properties delete mode 100644 plexus-container-default/src/test/resources/inline-configuration.xml delete mode 100644 plexus-container-default/src/test/resources/jar-repository/a.jar delete mode 100644 plexus-container-default/src/test/resources/jar-repository/b.jar delete mode 100644 plexus-container-default/src/test/resources/jar-repository/c.jar delete mode 100644 plexus-container-default/src/test/resources/jar-repository/d.jar delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/PlexusTestCaseTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/autowire/AutowireCompositionTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/components.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/setter/SetterCompositionTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/components.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/avalon.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/embed/EmbedderTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusOne.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusTwo.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/logging/CustomLoggerManagerTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/test/PlexusContainerTest.xml delete mode 100644 plexus-container-default/src/test/resources/org/codehaus/plexus/test/map/NoComponentsMapTest.xml delete mode 100644 plexus-container-default/src/test/resources/test.txt delete mode 100644 plexus-container-default/src/test/test-component-builds/component-a/pom.xml delete mode 100644 plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/A.java delete mode 100644 plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/DefaultA.java delete mode 100644 plexus-container-default/src/test/test-component-builds/component-b/pom.xml delete mode 100644 plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/B.java delete mode 100644 plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/DefaultB.java delete mode 100644 plexus-container-default/src/test/test-component-builds/component-c/pom.xml delete mode 100644 plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/C.java delete mode 100644 plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/DefaultC.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin0/pom.xml delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/AltPlugin0.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin0.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/Plugin0.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin1/pom.xml delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/AltPlugin1.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin1.java delete mode 100644 plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/Plugin1.java delete mode 100644 plexus-container-default/src/test/test-component-builds/pom.xml delete mode 100644 plexus-container-default/src/test/test-components/component-a-1.0-SNAPSHOT.jar delete mode 100644 plexus-container-default/src/test/test-components/component-a-2.0-SNAPSHOT.jar delete mode 100644 plexus-container-default/src/test/test-components/component-b-1.0-SNAPSHOT.jar delete mode 100644 plexus-container-default/src/test/test-components/component-c-1.0-SNAPSHOT.jar delete mode 100644 plexus-container-default/src/test/test-components/plexus-archiver-1.0-alpha-8.jar delete mode 100644 plexus-container-default/src/test/test-components/plugin0-1.0-SNAPSHOT.jar delete mode 100644 plexus-container-default/src/test/test-components/plugin1-1.0-SNAPSHOT.jar diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5d88481c4..1e2355828 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,14 @@ Plexus Containers Release Notes ========================= +Plexus Containers 2.2.0 +--------------------- +Plexus Containers 2.2.0 requires Java 8 and Maven 3.2.5+ + +### Improvements +* Drop deprecated plexus-container-default artefact +* Upgrade ASM to 9.6 + Plexus Containers 2.1.1 --------------------- Plexus Containers 2.1.1 requires Java 7 and Maven 3.2.5+ diff --git a/plexus-container-default/pom.xml b/plexus-container-default/pom.xml deleted file mode 100644 index 162ab0a48..000000000 --- a/plexus-container-default/pom.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - 4.0.0 - - - org.codehaus.plexus - plexus-containers - 2.2.0-SNAPSHOT - - - plexus-container-default - - Plexus :: Default Container (deprecated) - The Plexus IoC container API and its default implementation. - - - 2.7.0 - 4.24 - - - - - - org.codehaus.plexus - plexus-classworlds - ${classWorldsVersion} - - - org.codehaus.plexus - plexus-utils - ${plexusUtilsVersion} - - - org.apache.xbean - xbean-reflect - ${xbeanReflectVersion} - - - junit - junit - 4.13.2 - - - - - - - org.codehaus.plexus - plexus-utils - - - org.codehaus.plexus - plexus-classworlds - - - org.apache.xbean - xbean-reflect - - - junit - junit - - - - - - - maven-surefire-plugin - - - **/Test*.java - **/Abstract*.java - - - - - org.codehaus.modello - modello-maven-plugin - - 1.11 - - - src/main/mdo/components.mdo - src/main/mdo/plexus.mdo - - 1.3.0 - - - - xsd-site - - xsd - - pre-site - - ${basedir}/target/generated-site/resources/xsd - - - - descriptor-site - - xdoc - - pre-site - - 1.0.0 - - - - - - - diff --git a/plexus-container-default/src/it/multi-plexus.xml/pom.xml b/plexus-container-default/src/it/multi-plexus.xml/pom.xml deleted file mode 100644 index b0ef52ebb..000000000 --- a/plexus-container-default/src/it/multi-plexus.xml/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - 4.0.0 - plexus - plexus-integrationTest-multiplePlexusXmls - 1.0-SNAPSHOT - - - - plexus - plexus-testFodder-componentWithPlexusXml - 1.0 - - - plexus - plexus-container-default - 1.0-alpha-3-SNAPSHOT - test - - - junit - junit - 3.8.1 - test - - - - \ No newline at end of file diff --git a/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/Component.java b/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/Component.java deleted file mode 100644 index a72741dd0..000000000 --- a/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/Component.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.test.it.multiplx; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface Component -{ - - public static final String ROLE = Component.class.getName(); - - public String testValue(String input); - -} diff --git a/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/ComponentImpl.java b/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/ComponentImpl.java deleted file mode 100644 index 8a8a0942f..000000000 --- a/plexus-container-default/src/it/multi-plexus.xml/src/main/java/org/codehaus/plexus/test/it/multiplx/ComponentImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.test.it.multiplx; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class ComponentImpl - implements Component -{ - - public String testValue( String input ) - { - return "test using: " + input; - } - -} diff --git a/plexus-container-default/src/it/multi-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml b/plexus-container-default/src/it/multi-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml deleted file mode 100644 index 5a5c048a5..000000000 --- a/plexus-container-default/src/it/multi-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.test.it.multiplx.Component - org.codehaus.plexus.test.it.multiplx.ComponentImpl - - - \ No newline at end of file diff --git a/plexus-container-default/src/it/multi-plexus.xml/src/test/java/org/codehaus/plexus/test/it/multiplx/ComponentLookupTest.java b/plexus-container-default/src/it/multi-plexus.xml/src/test/java/org/codehaus/plexus/test/it/multiplx/ComponentLookupTest.java deleted file mode 100644 index e426e8cbf..000000000 --- a/plexus-container-default/src/it/multi-plexus.xml/src/test/java/org/codehaus/plexus/test/it/multiplx/ComponentLookupTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.test.it.multiplx; - -import org.codehaus.plexus.PlexusTestCase; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class ComponentLookupTest - extends PlexusTestCase -{ - - public void testShouldFindComponentFromHereAndComponentFromDependency() throws Exception - { - Object fromHere = lookup(Component.ROLE); - assertNotNull(fromHere); - - Object fromDependency = lookup("org.codehaus.plexus.test.fodder.withplx.TestComponent"); - assertNotNull(fromDependency); - } - -} diff --git a/plexus-container-default/src/it/plexus-its/pom.xml b/plexus-container-default/src/it/plexus-its/pom.xml deleted file mode 100644 index 57db21f64..000000000 --- a/plexus-container-default/src/it/plexus-its/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.its - plexus-its - jar - 1.0-SNAPSHOT - plexus-its - http://maven.apache.org - - - org.codehaus.plexus - plexus-container-default - 1.0-alpha-41-SNAPSHOT - - - junit - junit - 3.8.1 - test - - - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.5 - - - - descriptor - - - - - - - - diff --git a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/App.java b/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/App.java deleted file mode 100644 index 92592e330..000000000 --- a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/App.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.codehaus.plexus.its; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.logging.Logger; - -/** @author Jason van Zyl */ -public interface App -{ - PlexusContainer getContainer(); - - Logger getLogger(); -} diff --git a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultApp.java b/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultApp.java deleted file mode 100644 index 098af87da..000000000 --- a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultApp.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.its; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.logging.Logger; - -/** - * @plexus.component role-hint="standard" - */ -public class DefaultApp - implements App -{ - /** @plexus.requirement */ - private PlexusContainer container; - - /** @plexus.requirement */ - private Logger logger; - - public PlexusContainer getContainer() - { - return container; - } - - public Logger getLogger() - { - return logger; - } -} diff --git a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultLogEnabledApp.java b/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultLogEnabledApp.java deleted file mode 100644 index 2cc6e3946..000000000 --- a/plexus-container-default/src/it/plexus-its/src/main/java/org/codehaus/plexus/its/DefaultLogEnabledApp.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.its; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; - -/** - * @plexus.component role-hint="log-enabled" - */ -public class DefaultLogEnabledApp - extends AbstractLogEnabled - implements App -{ - /** @plexus.requirement */ - private PlexusContainer container; - - public PlexusContainer getContainer() - { - return container; - } - - public Logger getLogger() - { - return getLogger(); - } -} \ No newline at end of file diff --git a/plexus-container-default/src/it/plexus-its/src/test/java/org/codehaus/plexus/its/AppTest.java b/plexus-container-default/src/it/plexus-its/src/test/java/org/codehaus/plexus/its/AppTest.java deleted file mode 100644 index 31b51a913..000000000 --- a/plexus-container-default/src/it/plexus-its/src/test/java/org/codehaus/plexus/its/AppTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.its; - -import org.codehaus.plexus.PlexusTestCase; - -/** - * Unit test for simple DefaultApp. - */ -public class AppTest - extends PlexusTestCase -{ - public void testApp() - throws Exception - { - App app = (App) lookup( App.class.getName(), "standard" ); - - assertNotNull( app.getContainer() ); - - assertNotNull( app.getLogger() ); - - assertEquals( App.class.getName(), app.getLogger().getName() ); - - App logEnabledApp = (App) lookup( App.class.getName(), "log-enabled" ); - - assertNotNull( logEnabledApp ); - - assertEquals( App.class.getName(), app.getLogger().getName() ); - } -} diff --git a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/pom.xml b/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/pom.xml deleted file mode 100644 index f36e24aed..000000000 --- a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/pom.xml +++ /dev/null @@ -1,6 +0,0 @@ - - 4.0.0 - plexus - plexus-testFodder-componentWithPlexusXml - 1.0-SNAPSHOT - \ No newline at end of file diff --git a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponent.java b/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponent.java deleted file mode 100644 index 47995e3f0..000000000 --- a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponent.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.test.fodder.withplx; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface TestComponent -{ - - public String testValueOf(String input); - -} diff --git a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponentImpl.java b/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponentImpl.java deleted file mode 100644 index 09f2d14e4..000000000 --- a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/java/org/codehaus/plexus/test/fodder/withplx/TestComponentImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.test.fodder.withplx; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class TestComponentImpl - implements TestComponent -{ - - public String testValueOf( String input ) - { - return "output from: " + input; - } - -} diff --git a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml b/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml deleted file mode 100644 index 7006a2074..000000000 --- a/plexus-container-default/src/it/test-fodder/component-with-plexus.xml/src/main/resources/META-INF/plexus/plexus.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.test.fodder.withplx.TestComponent - org.codehaus.plexus.test.fodder.withplx.TestComponentImpl - - - \ No newline at end of file diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/ClassRealmUtil.java b/plexus-container-default/src/main/java/org/codehaus/plexus/ClassRealmUtil.java deleted file mode 100644 index fe0cb37dd..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/ClassRealmUtil.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2009 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Collection; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.LinkedList; -import java.util.Queue; -import java.util.Set; - -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; - -public class ClassRealmUtil { - - public static Set getContextRealms(ClassWorld world) { - Set realms = new LinkedHashSet(); - - for (ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); - classLoader != null; - classLoader = classLoader.getParent()) { - if (classLoader instanceof ClassRealm) { - realms.add((ClassRealm) classLoader); - - Queue queue = new LinkedList(); - queue.add((ClassRealm) classLoader); - - while (!queue.isEmpty()) { - ClassRealm realm = queue.remove(); - - Collection importRealms = realm.getImportRealms(); - for (ClassRealm importRealm : importRealms) { - if (realms.add(importRealm)) { - queue.add(importRealm); - } - } - - ClassRealm parentRealm = realm.getParentRealm(); - if (parentRealm != null && realms.add(parentRealm)) { - queue.add(parentRealm); - } - } - } - } - - if (world != null) { - for (Iterator it = realms.iterator(); it.hasNext(); ) { - ClassRealm realm = it.next(); - if (realm.getWorld() != world) { - it.remove(); - } - } - } - - return realms; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/ComponentRegistry.java b/plexus-container-default/src/main/java/org/codehaus/plexus/ComponentRegistry.java deleted file mode 100644 index 3e7dc22da..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/ComponentRegistry.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.manager.ComponentManagerFactory; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * @author Jason van Zyl - * @author Kenney Westerhof - * @author Dain Sundstrom - */ -public interface ComponentRegistry { - void registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory); - - void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException; - - ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint); - - @Deprecated - ComponentDescriptor getComponentDescriptor(String role, String roleHint, ClassRealm realm); - - List> getComponentDescriptorList(Class type, String role); - - Map> getComponentDescriptorMap(Class type, String role); - - T lookup(Class type, String role, String roleHint) throws ComponentLookupException; - - T lookup(ComponentDescriptor componentDescriptor) throws ComponentLookupException; - - List lookupList(Class type, String role, List hints) throws ComponentLookupException; - - Map lookupMap(Class type, String role, List hints) throws ComponentLookupException; - - void release(Object component) throws ComponentLifecycleException; - - void removeComponentRealm(ClassRealm classRealm) throws PlexusContainerException; - - void dispose(); - - void addComponent(T component, String role, String roleHint); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/ContainerConfiguration.java b/plexus-container-default/src/main/java/org/codehaus/plexus/ContainerConfiguration.java deleted file mode 100644 index 2e1ab9f71..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/ContainerConfiguration.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.codehaus.plexus; - -import java.net.URL; -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.discovery.ComponentDiscoverer; -import org.codehaus.plexus.component.discovery.ComponentDiscovererManager; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener; -import org.codehaus.plexus.component.factory.ComponentFactoryManager; -import org.codehaus.plexus.component.repository.ComponentRepository; -import org.codehaus.plexus.configuration.source.ConfigurationSource; -import org.codehaus.plexus.container.initialization.ContainerInitializationPhase; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.lifecycle.LifecycleHandlerManager; - -/** - * @author Jason van Zyl - */ -public interface ContainerConfiguration { - ContainerConfiguration setName(String name); - - String getName(); - - ContainerConfiguration setContext(Map context); - - Map getContext(); - - ContainerConfiguration setClassWorld(ClassWorld classWorld); - - ClassWorld getClassWorld(); - - ContainerConfiguration setRealm(ClassRealm realm); - - ClassRealm getRealm(); - - // - // Configuration - // - ContainerConfiguration setContainerConfiguration(String configuration); - - String getContainerConfiguration(); - - ContainerConfiguration setContainerConfigurationURL(URL configuration); - - URL getContainerConfigurationURL(); - - // Programmatic Container Initialization and Setup - - // Much of this setup and initialization can be completely hidden. It's probably not likely - // someone will need to change these core components, but rather adding things like different - // factories, and component managers. - - // Container initialization phases - - ContainerInitializationPhase[] getInitializationPhases(); - - // Component lookup manager - - // Component discoverer manager - - ContainerConfiguration addComponentDiscoverer(ComponentDiscoverer componentDiscoverer); - - ContainerConfiguration addComponentDiscoveryListener(ComponentDiscoveryListener componentDiscoveryListener); - - ContainerConfiguration setComponentDiscovererManager(ComponentDiscovererManager componentDiscovererManager); - - ComponentDiscovererManager getComponentDiscovererManager(); - - // Component factory manager - - ContainerConfiguration setComponentFactoryManager(ComponentFactoryManager componentFactoryManager); - - ComponentFactoryManager getComponentFactoryManager(); - - // Component manager manager - - // Component repository - - ContainerConfiguration setComponentRepository(ComponentRepository componentRepository); - - ComponentRepository getComponentRepository(); - - // Component composer - - // Lifecycle handler manager - - ContainerConfiguration addLifecycleHandler(LifecycleHandler lifecycleHandler); - - ContainerConfiguration setLifecycleHandlerManager(LifecycleHandlerManager lifecycleHandlerManager); - - LifecycleHandlerManager getLifecycleHandlerManager(); - - // Configuration Sources - - ContainerConfiguration setConfigurationSource(ConfigurationSource configurationSource); - - ConfigurationSource getConfigurationSource(); - - ContainerConfiguration addComponentDiscoverer(Class componentDiscoverer); - - ContainerConfiguration addComponentDiscoveryListener(Class componentDiscoveryListener); - - List getComponentDiscoverers(); - - List getComponentDiscoveryListeners(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultComponentRegistry.java b/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultComponentRegistry.java deleted file mode 100644 index d63cfa48d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultComponentRegistry.java +++ /dev/null @@ -1,526 +0,0 @@ -package org.codehaus.plexus; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.TreeMap; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.component.manager.ComponentManagerFactory; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRepository; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.lifecycle.LifecycleHandlerManager; -import org.codehaus.plexus.lifecycle.UndefinedLifecycleHandlerException; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.util.StringUtils; - -import static org.codehaus.plexus.component.CastUtils.isAssignableFrom; - -public class DefaultComponentRegistry implements ComponentRegistry { - private static final String DEFAULT_INSTANTIATION_STRATEGY = "singleton"; - - private final MutablePlexusContainer container; - private final ComponentRepository repository; - private final LifecycleHandlerManager lifecycleHandlerManager; - private final Logger logger; - - private boolean disposingComponents; - - private final Map componentManagerFactories = - Collections.synchronizedMap(new TreeMap()); - - private final Map> componentManagers = new TreeMap>(); - private final Map> componentManagersByComponent = - new IdentityHashMap>(); - - private final Map unmanagedComponents = new TreeMap(); - - public DefaultComponentRegistry( - MutablePlexusContainer container, - ComponentRepository repository, - LifecycleHandlerManager lifecycleHandlerManager) { - this.container = container; - this.repository = repository; - this.lifecycleHandlerManager = lifecycleHandlerManager; - logger = container.getLogger(); - } - - public void dispose() { - List> managers; - synchronized (this) { - managers = new ArrayList>(componentManagers.values()); - componentManagers.clear(); - componentManagersByComponent.clear(); - unmanagedComponents.clear(); - - disposingComponents = true; - } - - // reverse sort the managers by startId - Collections.sort(managers, new Comparator>() { - public int compare(ComponentManager left, ComponentManager right) { - if (left.getStartId() < right.getStartId()) { - return 1; - } else if (left.getStartId() == right.getStartId()) { - return 0; - } else { - return -1; - } - } - }); - - // Call dispose callback outside of synchronized lock to avoid deadlocks - try { - for (ComponentManager componentManager : managers) { - try { - componentManager.dispose(); - } catch (Exception e) { - // todo dain use a monitor instead of a logger - logger.error("Error while disposing component manager. Continuing with the rest", e); - } - } - } finally { - synchronized (this) { - disposingComponents = false; - } - } - } - - public void registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory) { - componentManagerFactories.put(componentManagerFactory.getId(), componentManagerFactory); - } - - public void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException { - repository.addComponentDescriptor(componentDescriptor); - } - - @SuppressWarnings("unchecked") - public synchronized void addComponent(T component, String role, String roleHint) { - ComponentDescriptor descriptor = new ComponentDescriptor(component.getClass(), null); - descriptor.setRole(role); - descriptor.setRoleHint(roleHint); - - Key key = new Key(descriptor.getRealm(), role, roleHint); - - unmanagedComponents.put(key, component); - } - - public ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint) { - return repository.getComponentDescriptor(type, role, roleHint); - } - - @Deprecated - public ComponentDescriptor getComponentDescriptor(String role, String roleHint, ClassRealm realm) { - return repository.getComponentDescriptor(role, roleHint, realm); - } - - public Map> getComponentDescriptorMap(Class type, String role) { - return repository.getComponentDescriptorMap(type, role); - } - - public List> getComponentDescriptorList(Class type, String role) { - return repository.getComponentDescriptorList(type, role); - } - - public T lookup(Class type, String role, String roleHint) throws ComponentLookupException { - // verify arguments - if (type == null) { - throw new NullPointerException("type is null"); - } - if (role == null) { - throw new NullPointerException("role is null"); - } - if (roleHint == null) { - roleHint = ""; - } - - return getComponent(type, role, roleHint, null); - } - - public T lookup(ComponentDescriptor componentDescriptor) throws ComponentLookupException { - return getComponent( - componentDescriptor.getRoleClass(), - componentDescriptor.getRole(), - componentDescriptor.getRoleHint(), - componentDescriptor); - } - - public Map lookupMap(Class type, String role, List roleHints) - throws ComponentLookupException { - // verify arguments - if (type == null) { - throw new NullPointerException("type is null"); - } - if (role == null) { - throw new NullPointerException("role is null"); - } - - // if no hints provided, get all valid hints for this role - Map components = new LinkedHashMap(); - if (roleHints == null) { - Map> componentDescriptors = getComponentDescriptorMap(type, role); - for (Entry> entry : componentDescriptors.entrySet()) { - String roleHint = entry.getKey(); - ComponentDescriptor componentDescriptor = entry.getValue(); - // todo dain catch the exception... it isn't the callers problem when one component in a collection - // fails - T component = getComponent(type, role, roleHint, componentDescriptor); - components.put(roleHint, component); - } - } else { - for (String roleHint : roleHints) { - // todo dain catch the exception... it isn't the callers problem when one component in a collection - // fails - T component = getComponent(type, role, roleHint, null); - components.put(roleHint, component); - } - } - - return components; - } - - public List lookupList(Class type, String role, List roleHints) throws ComponentLookupException { - // verify arguments - if (type == null) { - throw new NullPointerException("type is null"); - } - if (role == null) { - throw new NullPointerException("role is null"); - } - - // if no hints provided, get all valid hints for this role - List components = new ArrayList(); - if (roleHints == null) { - List> componentDescriptors = getComponentDescriptorList(type, role); - for (ComponentDescriptor componentDescriptor : componentDescriptors) { - // todo dain catch the exception... it isn't the callers problem when one component in a collection - // fails - T component = getComponent(type, role, componentDescriptor.getRoleHint(), componentDescriptor); - components.add(component); - } - } else { - for (String roleHint : roleHints) { - // todo dain catch the exception... it isn't the callers problem when one component in a collection - // fails - T component = getComponent(type, role, roleHint, null); - components.add(component); - } - } - - return components; - } - - public void release(Object component) throws ComponentLifecycleException { - if (component == null) { - return; - } - - // get the component manager - ComponentManager componentManager; - synchronized (this) { - componentManager = componentManagersByComponent.get(component); - if (componentManager == null) { - // This needs to be tracked down but the user doesn't need to see this - // during the maven bootstrap this logger is null. - // logger.debug( "Component manager not found for returned component. Ignored. component=" + component - // ); - return; - } - } - - // release the component from the manager - componentManager.release(component); - - // only drop the reference to this component if there are no other uses of the component - // multiple uses of a component is common with singleton beans - if (componentManager.getConnections() <= 0) { - synchronized (this) { - componentManagersByComponent.remove(component); - } - } - } - - public void removeComponentRealm(ClassRealm classRealm) throws PlexusContainerException { - repository.removeComponentRealm(classRealm); - - List> dispose = new ArrayList>(); - try { - synchronized (this) { - for (Iterator>> it = - componentManagers.entrySet().iterator(); - it.hasNext(); ) { - Entry> entry = it.next(); - Key key = entry.getKey(); - - ComponentManager componentManager = entry.getValue(); - - if (key.realm.equals(classRealm)) { - dispose.add(componentManager); - it.remove(); - } else { - componentManager.dissociateComponentRealm(classRealm); - } - } - } - - // Call dispose callback outside of synchronized lock to avoid deadlocks - for (ComponentManager componentManager : dispose) { - componentManager.dispose(); - } - } catch (ComponentLifecycleException e) { - throw new PlexusContainerException("Failed to dissociate component realm: " + classRealm.getId(), e); - } - } - - private T getComponent(Class type, String role, String roleHint, ComponentDescriptor descriptor) - throws ComponentLookupException { - // lookup for unmanaged components first - - T component = this.getUnmanagedComponent( - role, roleHint); // weird syntax due to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954 - - if (component != null) { - return component; - } - - ComponentManager componentManager = getComponentManager(type, role, roleHint, descriptor); - - // Get instance from manager... may result in creation - try { - component = componentManager.getComponent(); - synchronized (this) { - componentManagersByComponent.put(component, componentManager); - } - return component; - } catch (ComponentInstantiationException e) { - throw new ComponentLookupException( - "Unable to lookup component '" + componentManager.getRole() + "', it could not be created.", - componentManager.getRole(), - componentManager.getRoleHint(), - componentManager.getRealm(), - e); - } catch (ComponentLifecycleException e) { - throw new ComponentLookupException( - "Unable to lookup component '" + componentManager.getRole() + "', it could not be started.", - componentManager.getRole(), - componentManager.getRoleHint(), - componentManager.getRealm(), - e); - } - } - - @SuppressWarnings("unchecked") - private synchronized T getUnmanagedComponent(String role, String roleHint) { - Set realms = getSearchRealms(true); - - if (realms != null) { - // ignore unmanaged components, they are not associated with realms - // but lookup realm is provided via thread context classloader - return null; - } else { - if (StringUtils.isEmpty(roleHint)) { - roleHint = PlexusConstants.PLEXUS_DEFAULT_HINT; - } - - return (T) unmanagedComponents.get(new Key(null, role, roleHint)); - } - } - - private synchronized ComponentManager getComponentManager( - Class type, String role, String roleHint, ComponentDescriptor descriptor) - throws ComponentLookupException { - if (disposingComponents) { - throw new ComponentLookupException("ComponentRegistry is not active", role, roleHint); - } - - if (descriptor == null) { - descriptor = getComponentDescriptor(type, role, roleHint); - } - - ComponentManager componentManager = null; - - if (descriptor != null) { - componentManager = getComponentManager(type, role, descriptor.getRoleHint(), descriptor.getRealm()); - } else { - componentManager = getComponentManager(type, role, roleHint); - } - - if (componentManager == null) { - // we need to create a component manager, but first we must have a descriptor - if (descriptor == null) { - descriptor = getComponentDescriptor(type, role, roleHint); - if (descriptor == null) { - throw new ComponentLookupException( - "Component descriptor cannot be found in the component repository", role, roleHint); - } - // search also into descriptor realm as the key of a created component is per descriptor realm - componentManager = getComponentManager(type, role, descriptor.getRoleHint(), descriptor.getRealm()); - } - - if (componentManager == null) { - componentManager = createComponentManager(descriptor, role, descriptor.getRoleHint()); - } - } - - return componentManager; - } - - @SuppressWarnings("unchecked") - private ComponentManager getComponentManager(Class type, String role, String roleHint) { - Set realms = getSearchRealms(false); - - // return the component in the first realm - for (ClassRealm realm : realms) { - ComponentManager manager = componentManagers.get(new Key(realm, role, roleHint)); - if (manager != null && isAssignableFrom(type, manager.getType())) { - return (ComponentManager) manager; - } - } - return null; - } - - @SuppressWarnings("unchecked") - private ComponentManager getComponentManager(Class type, String role, String roleHint, ClassRealm realm) { - ComponentManager manager = componentManagers.get(new Key(realm, role, roleHint)); - if (manager != null && isAssignableFrom(type, manager.getType())) { - return (ComponentManager) manager; - } - return null; - } - - @SuppressWarnings("unchecked") - private Set getSearchRealms(boolean specifiedOnly) { - // determine realms to search - Set realms = ClassRealmUtil.getContextRealms(container.getClassWorld()); - - if (realms.isEmpty()) { - if (specifiedOnly) { - return null; - } - - realms.addAll(container.getClassWorld().getRealms()); - } - - return realms; - } - - private ComponentManager createComponentManager( - ComponentDescriptor descriptor, String role, String roleHint) throws ComponentLookupException { - // Get the ComponentManagerFactory - String instantiationStrategy = descriptor.getInstantiationStrategy(); - if (instantiationStrategy == null) { - instantiationStrategy = DEFAULT_INSTANTIATION_STRATEGY; - } - ComponentManagerFactory componentManagerFactory = componentManagerFactories.get(instantiationStrategy); - if (componentManagerFactory == null) { - throw new ComponentLookupException( - "Unsupported instantiation strategy: " + instantiationStrategy, - role, - roleHint, - descriptor.getRealm()); - } - - // Get the LifecycleHandler - LifecycleHandler lifecycleHandler; - try { - lifecycleHandler = lifecycleHandlerManager.getLifecycleHandler(descriptor.getLifecycleHandler()); - } catch (UndefinedLifecycleHandlerException e) { - throw new ComponentLookupException( - "Undefined lifecycle handler: " + descriptor.getLifecycleHandler(), - role, - roleHint, - descriptor.getRealm()); - } - - // Create the ComponentManager - ComponentManager componentManager = - componentManagerFactory.createComponentManager(container, lifecycleHandler, descriptor, role, roleHint); - - // Add componentManager to indexes - Key key = new Key(descriptor.getRealm(), role, roleHint); - componentManagers.put(key, componentManager); - - return componentManager; - } - - private static class Key implements Comparable { - private final ClassRealm realm; - private final String role; - private final String roleHint; - private final int hashCode; - - private Key(ClassRealm realm, String role, String roleHint) { - this.realm = realm; - - if (role == null) { - role = "null"; - } - this.role = role; - - if (roleHint == null) { - roleHint = "null"; - } - this.roleHint = roleHint; - - int hashCode; - hashCode = (realm != null ? realm.hashCode() : 0); - hashCode = 31 * hashCode + role.hashCode(); - hashCode = 31 * hashCode + roleHint.hashCode(); - this.hashCode = hashCode; - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - Key key = (Key) o; - - return !(realm != null ? !realm.equals(key.realm) : key.realm != null) - && role.equals(key.role) - && roleHint.equals(key.roleHint); - } - - public int hashCode() { - return hashCode; - } - - public String toString() { - return realm + "/" + role + "/" + roleHint; - } - - public int compareTo(Key o) { - int value; - if (realm != null) { - value = o.realm == null ? -1 : realm.getId().compareTo(o.realm.getId()); - } else { - value = o.realm == null ? 0 : 1; - } - - if (value == 0) { - value = role.compareTo(o.role); - if (value == 0) { - value = roleHint.compareTo(o.roleHint); - } - } - return value; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultContainerConfiguration.java b/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultContainerConfiguration.java deleted file mode 100644 index ef4bb65fb..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultContainerConfiguration.java +++ /dev/null @@ -1,317 +0,0 @@ -package org.codehaus.plexus; - -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.discovery.ComponentDiscoverer; -import org.codehaus.plexus.component.discovery.ComponentDiscovererManager; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener; -import org.codehaus.plexus.component.discovery.DefaultComponentDiscoverer; -import org.codehaus.plexus.component.discovery.DefaultComponentDiscovererManager; -import org.codehaus.plexus.component.discovery.PlexusXmlComponentDiscoverer; -import org.codehaus.plexus.component.factory.ComponentFactoryManager; -import org.codehaus.plexus.component.factory.DefaultComponentFactoryManager; -import org.codehaus.plexus.component.repository.ComponentRepository; -import org.codehaus.plexus.component.repository.DefaultComponentRepository; -import org.codehaus.plexus.configuration.source.ConfigurationSource; -import org.codehaus.plexus.container.initialization.ContainerInitializationPhase; -import org.codehaus.plexus.container.initialization.InitializeComponentDiscovererManagerPhase; -import org.codehaus.plexus.container.initialization.InitializeComponentFactoryManagerPhase; -import org.codehaus.plexus.container.initialization.InitializeComponentRegistryPhase; -import org.codehaus.plexus.container.initialization.InitializeContainerConfigurationSourcePhase; -import org.codehaus.plexus.container.initialization.InitializeLoggerManagerPhase; -import org.codehaus.plexus.container.initialization.InitializeSystemPropertiesPhase; -import org.codehaus.plexus.container.initialization.InitializeUserConfigurationSourcePhase; -import org.codehaus.plexus.lifecycle.BasicLifecycleHandler; -import org.codehaus.plexus.lifecycle.DefaultLifecycleHandlerManager; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.lifecycle.LifecycleHandlerManager; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.ConfigurablePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.ContextualizePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.DisposePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.LogDisablePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.LogEnablePhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StopPhase; - -/** @author Jason van Zyl */ -public class DefaultContainerConfiguration implements ContainerConfiguration { - private String name; - - private Map context; - - private ClassWorld classWorld; - - private ClassRealm realm; - - private String containerConfiguration; - - private URL containerConfigurationURL; - - private ConfigurationSource configurationSource; - - private List componentDiscoverers = new ArrayList(); - - private List componentDiscoveryListeners = new ArrayList(); - - public ContainerConfiguration setName(String name) { - this.name = name; - - return this; - } - - public ContainerConfiguration setContext(Map context) { - this.context = context; - - return this; - } - - public ContainerConfiguration setClassWorld(ClassWorld classWorld) { - this.classWorld = classWorld; - - return this; - } - - public ContainerConfiguration setRealm(ClassRealm realm) { - this.realm = realm; - - return this; - } - - public ContainerConfiguration setContainerConfiguration(String containerConfiguration) { - this.containerConfiguration = containerConfiguration; - - return this; - } - - public String getContainerConfiguration() { - return containerConfiguration; - } - - public ContainerConfiguration setContainerConfigurationURL(URL containerConfiguration) { - this.containerConfigurationURL = containerConfiguration; - - return this; - } - - public URL getContainerConfigurationURL() { - return containerConfigurationURL; - } - - public String getName() { - return name; - } - - public Map getContext() { - return context; - } - - public ClassWorld getClassWorld() { - return classWorld; - } - - public ClassRealm getRealm() { - return realm; - } - - // Programmatic Container Initialization and Setup - - public ContainerConfiguration setInitializationPhases(ContainerInitializationPhase[] initializationPhases) { - this.initializationPhases = initializationPhases; - - return this; - } - - public ContainerInitializationPhase[] getInitializationPhases() { - return initializationPhases; - } - - private ContainerInitializationPhase[] initializationPhases = { - new InitializeComponentRegistryPhase(), - new InitializeComponentFactoryManagerPhase(), - new InitializeContainerConfigurationSourcePhase(), - new InitializeLoggerManagerPhase(), - new InitializeSystemPropertiesPhase(), - new InitializeComponentDiscovererManagerPhase(), - new InitializeUserConfigurationSourcePhase() - }; - - // Component discoverer - - private ComponentDiscovererManager componentDiscovererManager; - - public ContainerConfiguration addComponentDiscoveryListener(ComponentDiscoveryListener componentDiscoveryListener) { - getComponentDiscovererManager().registerComponentDiscoveryListener(componentDiscoveryListener); - - return this; - } - - public ContainerConfiguration addComponentDiscoverer(ComponentDiscoverer componentDiscoverer) { - ((DefaultComponentDiscovererManager) getComponentDiscovererManager()) - .addComponentDiscoverer(componentDiscoverer); - - return this; - } - - public ContainerConfiguration addComponentDiscoverer(Class clazz) { - componentDiscoverers.add(clazz); - return this; - } - - public ContainerConfiguration addComponentDiscoveryListener(Class clazz) { - componentDiscoveryListeners.add(clazz); - return this; - } - - public List getComponentDiscoverers() { - return componentDiscoverers; - } - - public List getComponentDiscoveryListeners() { - return componentDiscoveryListeners; - } - - public ContainerConfiguration setComponentDiscovererManager(ComponentDiscovererManager componentDiscovererManager) { - this.componentDiscovererManager = componentDiscovererManager; - - return this; - } - - public ComponentDiscovererManager getComponentDiscovererManager() { - if (componentDiscovererManager == null) { - componentDiscovererManager = new DefaultComponentDiscovererManager(); - - ((DefaultComponentDiscovererManager) componentDiscovererManager) - .addComponentDiscoverer(new DefaultComponentDiscoverer()); - - ((DefaultComponentDiscovererManager) componentDiscovererManager) - .addComponentDiscoverer(new PlexusXmlComponentDiscoverer()); - } - - return componentDiscovererManager; - } - - private ComponentFactoryManager componentFactoryManager; - - public ComponentFactoryManager getComponentFactoryManager() { - if (componentFactoryManager == null) { - componentFactoryManager = new DefaultComponentFactoryManager(); - } - - return componentFactoryManager; - } - - public ContainerConfiguration setComponentFactoryManager(ComponentFactoryManager componentFactoryManager) { - this.componentFactoryManager = componentFactoryManager; - - return this; - } - - private ComponentRepository componentRepository; - - public ContainerConfiguration setComponentRepository(ComponentRepository componentRepository) { - this.componentRepository = componentRepository; - - return this; - } - - public ComponentRepository getComponentRepository() { - if (componentRepository == null) { - componentRepository = new DefaultComponentRepository(); - } - - return componentRepository; - } - - // Lifecycle handler manager - - private LifecycleHandlerManager lifecycleHandlerManager; - - public ContainerConfiguration addLifecycleHandler(LifecycleHandler lifecycleHandler) { - getLifecycleHandlerManager().addLifecycleHandler(lifecycleHandler); - - return this; - } - - public ContainerConfiguration setLifecycleHandlerManager(LifecycleHandlerManager lifecycleHandlerManager) { - this.lifecycleHandlerManager = lifecycleHandlerManager; - - return this; - } - - public LifecycleHandlerManager getLifecycleHandlerManager() { - if (lifecycleHandlerManager == null) { - lifecycleHandlerManager = new DefaultLifecycleHandlerManager(); - - // Plexus - LifecycleHandler plexus = new BasicLifecycleHandler("plexus"); - // Begin - plexus.addBeginSegment(new LogEnablePhase()); - plexus.addBeginSegment(new ContextualizePhase()); - // plexus.addBeginSegment( new AutoConfigurePhase() ); - plexus.addBeginSegment(new InitializePhase()); - plexus.addBeginSegment(new StartPhase()); - // End - plexus.addEndSegment(new StopPhase()); - plexus.addEndSegment(new DisposePhase()); - plexus.addEndSegment(new LogDisablePhase()); - lifecycleHandlerManager.addLifecycleHandler(plexus); - - // Basic - LifecycleHandler basic = new BasicLifecycleHandler("basic"); - // Begin - basic.addBeginSegment(new LogEnablePhase()); - basic.addBeginSegment(new ContextualizePhase()); - // basic.addBeginSegment( new AutoConfigurePhase() ); - basic.addBeginSegment(new InitializePhase()); - basic.addBeginSegment(new StartPhase()); - // End - basic.addEndSegment(new StopPhase()); - basic.addEndSegment(new DisposePhase()); - basic.addEndSegment(new LogDisablePhase()); - lifecycleHandlerManager.addLifecycleHandler(basic); - - // Plexus configurable - LifecycleHandler plexusConfigurable = new BasicLifecycleHandler("plexus-configurable"); - // Begin - plexusConfigurable.addBeginSegment(new LogEnablePhase()); - plexusConfigurable.addBeginSegment(new ContextualizePhase()); - plexusConfigurable.addBeginSegment(new ConfigurablePhase()); - plexusConfigurable.addBeginSegment(new InitializePhase()); - plexusConfigurable.addBeginSegment(new StartPhase()); - // End - plexusConfigurable.addEndSegment(new StopPhase()); - plexusConfigurable.addEndSegment(new DisposePhase()); - plexusConfigurable.addEndSegment(new LogDisablePhase()); - lifecycleHandlerManager.addLifecycleHandler(plexusConfigurable); - - // Passive - LifecycleHandler passive = new BasicLifecycleHandler("passive"); - lifecycleHandlerManager.addLifecycleHandler(passive); - - // Bootstrap - LifecycleHandler bootstrap = new BasicLifecycleHandler("bootstrap"); - bootstrap.addBeginSegment(new ContextualizePhase()); - lifecycleHandlerManager.addLifecycleHandler(bootstrap); - } - - return lifecycleHandlerManager; - } - - // Configuration Sources - - public ContainerConfiguration setConfigurationSource(ConfigurationSource configurationSource) { - this.configurationSource = configurationSource; - - return this; - } - - public ConfigurationSource getConfigurationSource() { - return configurationSource; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultPlexusContainer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultPlexusContainer.java deleted file mode 100644 index 775b78d6c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/DefaultPlexusContainer.java +++ /dev/null @@ -1,788 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.classworlds.realm.DuplicateRealmException; -import org.codehaus.plexus.classworlds.realm.NoSuchRealmException; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.discovery.ComponentDiscoverer; -import org.codehaus.plexus.component.discovery.ComponentDiscovererManager; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener; -import org.codehaus.plexus.component.factory.ComponentFactoryManager; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.configuration.PlexusConfigurationMerger; -import org.codehaus.plexus.configuration.source.ConfigurationSource; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.container.initialization.ContainerInitializationContext; -import org.codehaus.plexus.container.initialization.ContainerInitializationPhase; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.context.ContextMapAdapter; -import org.codehaus.plexus.context.DefaultContext; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.InterpolationFilterReader; -import org.codehaus.plexus.util.ReaderFactory; - -import static org.codehaus.plexus.PlexusConstants.PLEXUS_DEFAULT_HINT; -import static org.codehaus.plexus.component.CastUtils.cast; - -/** - * Default implementation of PlexusContainer and MutablePlexusContainer. - * @author Jason van Zyl - * @author Kenney Westerhof - */ -public class DefaultPlexusContainer extends AbstractLogEnabled implements MutablePlexusContainer { - protected static final String DEFAULT_CONTAINER_NAME = "default"; - - protected static final String DEFAULT_REALM_NAME = "plexus.core"; - - /** - * Arbitrary data associated with the container. Data in the container has highest precedence when configuring - * a component to create. - */ - protected Context containerContext; - - protected PlexusConfiguration configuration; - - // todo: don't use a reader - protected Reader configurationReader; - - protected ClassWorld classWorld; - - protected ClassRealm containerRealm; - - // ---------------------------------------------------------------------------- - // Core components - // ---------------------------------------------------------------------------- - - private ComponentRegistry componentRegistry; - - /** - * Simple index (registry) of ComponentDiscovers and ComponentDiscoveryListener. - */ - protected ComponentDiscovererManager componentDiscovererManager; - - /** - * Trivial class to look-up ComponentFactory instances in this container. - */ - protected ComponentFactoryManager componentFactoryManager; - - /** - * Generic logger interface. - */ - protected LoggerManager loggerManager; - - /** - * Converts a ComponentDescriptor into PlexusConfiguration. - */ - protected ConfigurationSource configurationSource; - - // ---------------------------------------------------------------------------- - // - // ---------------------------------------------------------------------------- - - // TODO: Is there a more threadpool-friendly way to do this? - private ThreadLocal lookupRealm = new ThreadLocal(); - - public void addComponent(Object component, String role) { - addComponent(component, role, PLEXUS_DEFAULT_HINT); - } - - public void addComponent(T component, Class role, String roleHint) { - addComponent(component, role.getName(), roleHint); - } - - public void addComponent(Object component, String role, String roleHint) { - if (roleHint == null) { - roleHint = PLEXUS_DEFAULT_HINT; - } - - getComponentRegistry().addComponent(component, role, roleHint); - } - - public ClassRealm setLookupRealm(ClassRealm realm) { - ClassRealm oldRealm = lookupRealm.get(); - - lookupRealm.set(realm); - - return oldRealm; - } - - public ClassRealm getLookupRealm() { - return lookupRealm.get(); - } - - // ---------------------------------------------------------------------- - // Constructors - // ---------------------------------------------------------------------- - - public DefaultPlexusContainer() throws PlexusContainerException { - construct(new DefaultContainerConfiguration()); - } - - public DefaultPlexusContainer(ContainerConfiguration c) throws PlexusContainerException { - construct(c); - } - - public ClassRealm createChildRealm(String id) { - try { - return containerRealm.createChildRealm(id); - } catch (DuplicateRealmException e) { - try { - return classWorld.getRealm(id); - } catch (NoSuchRealmException e1) { - return null; - } - } - } - - private void construct(ContainerConfiguration c) throws PlexusContainerException { - configurationSource = c.getConfigurationSource(); - - // ---------------------------------------------------------------------------- - // ClassWorld - // ---------------------------------------------------------------------------- - - classWorld = c.getClassWorld(); - - // Make sure we have a valid ClassWorld - if (classWorld == null) { - classWorld = - new ClassWorld(DEFAULT_REALM_NAME, Thread.currentThread().getContextClassLoader()); - } - - containerRealm = c.getRealm(); - - if (containerRealm == null) { - try { - containerRealm = classWorld.getRealm(DEFAULT_REALM_NAME); - } catch (NoSuchRealmException e) { - containerRealm = (ClassRealm) classWorld.getRealms().iterator().next(); - - if (containerRealm == null) { - System.err.println("No container realm! Expect errors."); - - new Throwable().printStackTrace(); - } - } - } - - setLookupRealm(containerRealm); - - // ---------------------------------------------------------------------------- - // Context - // ---------------------------------------------------------------------------- - - if (c.getContext() != null) { - containerContext = new DefaultContext(c.getContext()); - } else { - containerContext = new DefaultContext(); - } - - // ---------------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------------- - - InputStream in = null; - - if (c.getContainerConfiguration() != null) { - in = toStream(c.getContainerConfiguration()); - } - - try { - if (c.getContainerConfigurationURL() != null) { - in = c.getContainerConfigurationURL().openStream(); - } - } catch (IOException e) { - throw new PlexusContainerException("Error reading configuration URL", e); - } - - try { - configurationReader = in == null ? null : ReaderFactory.newXmlReader(in); - } catch (IOException e) { - throw new PlexusContainerException("Error reading configuration file", e); - } - - try { - initialize(c); - - start(); - } finally { - IOUtil.close(configurationReader); - } - - for (Class clazz : c.getComponentDiscoverers()) { - try { - ComponentDiscoverer cd = (ComponentDiscoverer) lookup(clazz); - componentDiscovererManager.addComponentDiscoverer(cd); - } catch (ComponentLookupException e) { - } - } - - for (Class clazz : c.getComponentDiscoveryListeners()) { - try { - ComponentDiscoveryListener cdl = (ComponentDiscoveryListener) lookup(clazz); - componentDiscovererManager.registerComponentDiscoveryListener(cdl); - } catch (ComponentLookupException e) { - } - } - } - - // ---------------------------------------------------------------------------- - // Lookup - // ---------------------------------------------------------------------------- - - private Class getInterfaceClass(String role, String hint) { - ComponentDescriptor cd; - - if (hint == null) { - cd = getComponentDescriptor(role); - } else { - cd = getComponentDescriptor(role, hint); - } - - if (cd != null) { - try { - ClassRealm realm = getLookupRealm(); - - if (realm != null) { - return realm.loadClass(role); - } else { - ClassLoader loader = cd.getImplementationClass().getClassLoader(); - - if (loader != null) { - return loader.loadClass(role); - } - } - } catch (ClassNotFoundException e) { - return Object.class; - } - } - - return Object.class; - } - - private Class getRoleClass(String role) { - return getInterfaceClass(role, null); - } - - private Class getRoleClass(String role, String hint) { - return getInterfaceClass(role, hint); - } - - public Object lookup(String role) throws ComponentLookupException { - return componentRegistry.lookup(getRoleClass(role), role, ""); - } - - public Object lookup(String role, String roleHint) throws ComponentLookupException { - return componentRegistry.lookup(getRoleClass(role, roleHint), role, roleHint); - } - - public T lookup(Class type) throws ComponentLookupException { - return componentRegistry.lookup(type, type.getName(), ""); - } - - public T lookup(Class type, String roleHint) throws ComponentLookupException { - return componentRegistry.lookup(type, type.getName(), roleHint); - } - - public T lookup(Class type, String role, String roleHint) throws ComponentLookupException { - return componentRegistry.lookup(type, role, roleHint); - } - - public T lookup(ComponentDescriptor componentDescriptor) throws ComponentLookupException { - return componentRegistry.lookup(componentDescriptor); - } - - public List lookupList(String role) throws ComponentLookupException { - return cast(componentRegistry.lookupList(getRoleClass(role), role, null)); - } - - public List lookupList(String role, List roleHints) throws ComponentLookupException { - return cast(componentRegistry.lookupList(getRoleClass(role), role, roleHints)); - } - - public List lookupList(Class type) throws ComponentLookupException { - return componentRegistry.lookupList(type, type.getName(), null); - } - - public List lookupList(Class type, List roleHints) throws ComponentLookupException { - return componentRegistry.lookupList(type, type.getName(), roleHints); - } - - public Map lookupMap(String role) throws ComponentLookupException { - return cast(componentRegistry.lookupMap(getRoleClass(role), role, null)); - } - - public Map lookupMap(String role, List roleHints) throws ComponentLookupException { - return cast(componentRegistry.lookupMap(getRoleClass(role), role, roleHints)); - } - - public Map lookupMap(Class type) throws ComponentLookupException { - return componentRegistry.lookupMap(type, type.getName(), null); - } - - public Map lookupMap(Class type, List roleHints) throws ComponentLookupException { - return componentRegistry.lookupMap(type, type.getName(), roleHints); - } - - // ---------------------------------------------------------------------- - // Component Descriptor Lookup - // ---------------------------------------------------------------------- - - public boolean hasComponent(String role) { - return componentRegistry.getComponentDescriptor(Object.class, role, "") != null; - } - - public boolean hasComponent(String role, String roleHint) { - return componentRegistry.getComponentDescriptor(Object.class, role, roleHint) != null; - } - - public boolean hasComponent(Class type) { - return componentRegistry.getComponentDescriptor(type, type.getName(), "") != null; - } - - public boolean hasComponent(Class type, String roleHint) { - return componentRegistry.getComponentDescriptor(type, type.getName(), roleHint) != null; - } - - public boolean hasComponent(Class type, String role, String roleHint) { - return componentRegistry.getComponentDescriptor(type, role, roleHint) != null; - } - - public ComponentDescriptor getComponentDescriptor(String role) { - return componentRegistry.getComponentDescriptor(Object.class, role, ""); - } - - public ComponentDescriptor getComponentDescriptor(String role, String roleHint) { - return componentRegistry.getComponentDescriptor(Object.class, role, roleHint); - } - - public ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint) { - return componentRegistry.getComponentDescriptor(type, role, roleHint); - } - - public Map> getComponentDescriptorMap(String role) { - return cast(componentRegistry.getComponentDescriptorMap(Object.class, role)); - } - - public Map> getComponentDescriptorMap(Class type, String role) { - return componentRegistry.getComponentDescriptorMap(type, role); - } - - public List> getComponentDescriptorList(String role) { - return cast(componentRegistry.getComponentDescriptorList(Object.class, role)); - } - - public List> getComponentDescriptorList(Class type, String role) { - return componentRegistry.getComponentDescriptorList(type, role); - } - - public void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException { - if (componentDescriptor.getRealm() == null) { - componentDescriptor.setRealm(this.containerRealm); - // throw new ComponentImplementationNotFoundException( "ComponentDescriptor is missing realmId" ); - } - componentRegistry.addComponentDescriptor(componentDescriptor); - } - - // ---------------------------------------------------------------------- - // Component Release - // ---------------------------------------------------------------------- - - public void release(Object component) throws ComponentLifecycleException { - componentRegistry.release(component); - } - - public void releaseAll(Map components) throws ComponentLifecycleException { - for (Object component : components.values()) { - release(component); - } - } - - public void releaseAll(List components) throws ComponentLifecycleException { - for (Object component : components) { - release(component); - } - } - - // ---------------------------------------------------------------------- - // Lifecycle Management - // ---------------------------------------------------------------------- - - protected void initialize(ContainerConfiguration containerConfiguration) throws PlexusContainerException { - try { - initializeConfiguration(containerConfiguration); - - initializePhases(containerConfiguration); - - containerContext.put(PlexusConstants.PLEXUS_KEY, this); - - discoverComponents(getContainerRealm()); - - PlexusConfiguration[] loadOnStartComponents = - getConfiguration().getChild("load-on-start").getChildren("component"); - - getLogger().debug("Found " + loadOnStartComponents.length + " components to load on start"); - - ClassLoader prevCl = Thread.currentThread().getContextClassLoader(); - - try { - for (PlexusConfiguration loadOnStartComponent : loadOnStartComponents) { - String role = loadOnStartComponent.getChild("role").getValue(null); - - String roleHint = loadOnStartComponent.getChild("role-hint").getValue(null); - - if (role == null) { - throw new PlexusContainerException("Missing 'role' element from load-on-start."); - } - - if (roleHint == null) { - roleHint = PlexusConstants.PLEXUS_DEFAULT_HINT; - } - - if (roleHint.equals("*")) { - getLogger().info("Loading on start all components with [role]: " + "[" + role + "]"); - - lookupList(role); - } else { - getLogger().info("Loading on start [role,roleHint]: " + "[" + role + "," + roleHint + "]"); - - lookup(role, roleHint); - } - } - } catch (ComponentLookupException e) { - throw new PlexusContainerException("Error looking up load-on-start component.", e); - } finally { - Thread.currentThread().setContextClassLoader(prevCl); - } - - } catch (ContextException e) { - throw new PlexusContainerException("Error processing configuration", e); - } catch (PlexusConfigurationException e) { - throw new PlexusContainerException("Error configuring components", e); - } catch (IOException e) { - throw new PlexusContainerException("Error reading configuration file", e); - } catch (CycleDetectedInComponentGraphException e) { - throw new PlexusContainerException("Cycle detected in component graph in the system: ", e); - } - } - - protected void initializePhases(ContainerConfiguration containerConfiguration) throws PlexusContainerException { - ContainerInitializationPhase[] initPhases = containerConfiguration.getInitializationPhases(); - - ContainerInitializationContext initializationContext = new ContainerInitializationContext( - this, classWorld, containerRealm, configuration, containerConfiguration); - - for (ContainerInitializationPhase phase : initPhases) { - try { - phase.execute(initializationContext); - } catch (Exception e) { - throw new PlexusContainerException( - "Error initializaing container in " + phase.getClass().getName() + ".", e); - } - } - } - - protected void start() throws PlexusContainerException { - // XXX this is called after initializeConfiguration - is this correct? - configuration = null; - } - - public void dispose() { - try { - componentRegistry.dispose(); - - boolean needToDisposeRealm = false; - - try { - containerRealm.setParentRealm(null); - - if (needToDisposeRealm) { - classWorld.disposeRealm(containerRealm.getId()); - } - } catch (NoSuchRealmException e) { - getLogger().debug("Failed to dispose realm."); - } - } finally { - lookupRealm.set(null); - } - } - - public void addContextValue(Object key, Object value) { - containerContext.put(key, value); - } - - // ---------------------------------------------------------------------- - // Misc Configuration - // ---------------------------------------------------------------------- - - public ClassWorld getClassWorld() { - return classWorld; - } - - public void setClassWorld(ClassWorld classWorld) { - this.classWorld = classWorld; - } - - public ClassRealm getContainerRealm() { - return containerRealm; - } - - public void setContainerRealm(ClassRealm containerRealm) { - this.containerRealm = containerRealm; - } - - // ---------------------------------------------------------------------- - // Context - // ---------------------------------------------------------------------- - - public Context getContext() { - return containerContext; - } - - // ---------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------- - - // TODO: put this in a separate helper class and turn into a component if possible, too big. - - protected void initializeConfiguration(ContainerConfiguration c) - throws PlexusConfigurationException, ContextException, IOException { - // We need an empty plexus configuration for merging. This is a function of removing the - // plexus-boostrap.xml file. - configuration = new XmlPlexusConfiguration("plexus"); - - if (configurationReader != null) { - // User userConfiguration - - PlexusConfiguration userConfiguration = PlexusTools.buildConfiguration( - "", getInterpolationConfigurationReader(configurationReader)); - - // Merger of bootstrapConfiguration and user userConfiguration - - configuration = PlexusConfigurationMerger.merge(userConfiguration, configuration); - } - } - - protected Reader getInterpolationConfigurationReader(Reader reader) { - return new InterpolationFilterReader(reader, new ContextMapAdapter(containerContext)); - } - - public Logger getLogger() { - return super.getLogger(); - } - - // ---------------------------------------------------------------------- - // Discovery - // ---------------------------------------------------------------------- - - public void registerComponentDiscoveryListener(ComponentDiscoveryListener listener) { - componentDiscovererManager.registerComponentDiscoveryListener(listener); - } - - public void removeComponentDiscoveryListener(ComponentDiscoveryListener listener) { - componentDiscovererManager.removeComponentDiscoveryListener(listener); - } - - // ---------------------------------------------------------------------------- - // Mutable Container Interface - // ---------------------------------------------------------------------------- - - public ComponentRegistry getComponentRegistry() { - return componentRegistry; - } - - public void setComponentRegistry(ComponentRegistry componentRegistry) { - this.componentRegistry = componentRegistry; - } - - public ComponentDiscovererManager getComponentDiscovererManager() { - return componentDiscovererManager; - } - - public void setComponentDiscovererManager(ComponentDiscovererManager componentDiscovererManager) { - this.componentDiscovererManager = componentDiscovererManager; - } - - public ComponentFactoryManager getComponentFactoryManager() { - return componentFactoryManager; - } - - public void setComponentFactoryManager(ComponentFactoryManager componentFactoryManager) { - this.componentFactoryManager = componentFactoryManager; - } - - // Configuration - - public PlexusConfiguration getConfiguration() { - return configuration; - } - - public void setConfiguration(PlexusConfiguration configuration) { - this.configuration = configuration; - } - - // ---------------------------------------------------------------------------- - // Component Realms - // ---------------------------------------------------------------------------- - - public ClassRealm getComponentRealm(String realmId) { - ClassRealm realm = null; - - try { - realm = classWorld.getRealm(realmId); - } catch (NoSuchRealmException e) { - // This should never happen: when a component is discovered, it is discovered from a realm and - // it is at that point the realm id is assigned to the component descriptor. - } - - if (realm == null) { - // The core components need the container realm. - realm = containerRealm; - } - - return realm; - } - - public void removeComponentRealm(ClassRealm realm) throws PlexusContainerException { - if (getContainerRealm().getId().equals(realm.getId())) { - throw new IllegalArgumentException("Cannot remove container realm: " + realm.getId() - + "\n(trying to remove container realm as if it were a component realm)."); - } - - componentRegistry.removeComponentRealm(realm); - - ClassRealm lookupRealm = getLookupRealm(); - if ((lookupRealm != null) && lookupRealm.getId().equals(realm.getId())) { - setLookupRealm(getContainerRealm()); - } - } - - private InputStream toStream(String resource) throws PlexusContainerException { - if (resource == null) { - return null; - } - - String relativeResource = resource; - if (resource.startsWith("/")) { - relativeResource = resource.substring(1); - } - - InputStream is = getClass().getClassLoader().getResourceAsStream(relativeResource); - - if (is == null) { - try { - return new FileInputStream(resource); - } catch (FileNotFoundException e) { - return null; - } - } - - return is; - } - - /** - * Utility method to get a default lookup realm for a component. - */ - public ClassRealm getLookupRealm(Object component) { - if (component.getClass().getClassLoader() instanceof ClassRealm) { - return ((ClassRealm) component.getClass().getClassLoader()); - } else { - return getLookupRealm(); - } - } - - public void setConfigurationSource(ConfigurationSource configurationSource) { - this.configurationSource = configurationSource; - } - - public ConfigurationSource getConfigurationSource() { - return configurationSource; - } - - public LoggerManager getLoggerManager() { - // TODO Auto-generated method stub - return loggerManager; - } - - public void setLoggerManager(LoggerManager loggerManager) { - this.loggerManager = loggerManager; - } - - // Discovery - - public List> discoverComponents(ClassRealm realm) - throws PlexusConfigurationException, CycleDetectedInComponentGraphException { - return discoverComponents(realm, null); - } - - public List> discoverComponents(ClassRealm realm, Object data) - throws PlexusConfigurationException, CycleDetectedInComponentGraphException { - List componentSetDescriptors = new ArrayList(); - - List> discoveredComponentDescriptors = new ArrayList>(); - - for (ComponentDiscoverer componentDiscoverer : - getComponentDiscovererManager().getComponentDiscoverers()) { - for (ComponentSetDescriptor componentSetDescriptor : - componentDiscoverer.findComponents(getContext(), realm)) { - // Here we should collect all the urls - // do the interpolation against the context - // register all the components - // allow interception and replacement of the components - - componentSetDescriptors.add(componentSetDescriptor); - - // Fire the event - ComponentDiscoveryEvent event = new ComponentDiscoveryEvent(componentSetDescriptor, data); - - componentDiscovererManager.fireComponentDiscoveryEvent(event); - - for (ComponentDescriptor componentDescriptor : componentSetDescriptor.getComponents()) { - addComponentDescriptor(componentDescriptor); - - discoveredComponentDescriptors.add(componentDescriptor); - } - } - } - - return discoveredComponentDescriptors; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/DuplicateChildContainerException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/DuplicateChildContainerException.java deleted file mode 100644 index 73a1683bb..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/DuplicateChildContainerException.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DuplicateChildContainerException extends PlexusContainerException { - - private final String parent; - private final String child; - - public DuplicateChildContainerException(String parent, String child) { - super("Cannot create child container, because child named \'" + child + "\' already exists in parent \'" - + parent + "\'."); - - this.parent = parent; - - this.child = child; - } - - public String getParent() { - return parent; - } - - public String getChild() { - return child; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/MutablePlexusContainer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/MutablePlexusContainer.java deleted file mode 100644 index 3db732a2b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/MutablePlexusContainer.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.discovery.ComponentDiscovererManager; -import org.codehaus.plexus.component.factory.ComponentFactoryManager; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.source.ConfigurationSource; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; - -/** - * @author Jason van Zyl - */ -public interface MutablePlexusContainer extends PlexusContainer { - // Core Components - - ComponentRegistry getComponentRegistry(); - - void setComponentRegistry(ComponentRegistry componentRegistry); - - ComponentDiscovererManager getComponentDiscovererManager(); - - void setComponentDiscovererManager(ComponentDiscovererManager componentDiscovererManager); - - ComponentFactoryManager getComponentFactoryManager(); - - void setComponentFactoryManager(ComponentFactoryManager componentFactoryManager); - - LoggerManager getLoggerManager(); - - void setLoggerManager(LoggerManager loggerManager); - - Logger getLogger(); - - void setConfigurationSource(ConfigurationSource configurationSource); - - ConfigurationSource getConfigurationSource(); - - // Configuration - - void setConfiguration(PlexusConfiguration configuration); - - PlexusConfiguration getConfiguration(); - - ClassRealm getComponentRealm(String realmId); - - ClassWorld getClassWorld(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusConstants.java b/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusConstants.java deleted file mode 100644 index 5577a5d3f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusConstants.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public abstract class PlexusConstants { - /** Key used to retrieve the plexus container from the containerContext. */ - public static final String PLEXUS_KEY = "plexus"; - - /** The role-hint to use for components or lookups that do not specify a role.*/ - public static final String PLEXUS_DEFAULT_HINT = "default"; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainer.java deleted file mode 100644 index 1b713f75f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainer.java +++ /dev/null @@ -1,435 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.context.Context; - -/** - * PlexusContainer is the entry-point for loading and accessing other - * components. - */ -public interface PlexusContainer { - String ROLE = PlexusContainer.class.getName(); - - // ------------------------------------------------------------------------ - // Lookup - // ------------------------------------------------------------------------ - - /** - * Looks up and returns a component object with the given unique key or role. - * @param role a unique key for the desired component - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - Object lookup(String role) throws ComponentLookupException; - - /** - * Looks up and returns a component object with the given unique role/role-hint combination. - * @param role a non-unique key for the desired component - * @param roleHint a hint for the desired component implementation - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - Object lookup(String role, String roleHint) throws ComponentLookupException; - - /** - * Looks up and returns a component object with the given unique key or role. - * @param type the unique type of the component within the container - * @param The type. - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - T lookup(Class type) throws ComponentLookupException; - - /** - * Looks up and returns a component object with the given unique role/role-hint combination. - * @param type the non-unique type of the component - * @param roleHint a hint for the desired component implementation - * @param The type. - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - T lookup(Class type, String roleHint) throws ComponentLookupException; - - /** - * Looks up and returns a component object with the given unique role/role-hint combination. - * @param type the non-unique type of the component - * @param role a non-unique key for the desired component - * @param roleHint a hint for the desired component implementation - * @param The type. - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - T lookup(Class type, String role, String roleHint) throws ComponentLookupException; - - /** - * Looks up and returns a component object matching the given component descriptor. - * @param componentDescriptor the descriptor of the component - * @param The type. - * @return a Plexus component object - * @throws ComponentLookupException in case of lookup error. - */ - T lookup(ComponentDescriptor componentDescriptor) throws ComponentLookupException; - - /** - * Looks up and returns a List of component objects with the given role. - * @param role a non-unique key for the desired components - * @return a List of component objects - * @throws ComponentLookupException in case of lookup error. - */ - List lookupList(String role) throws ComponentLookupException; - - /** - * Looks up and returns a List of component objects with the given role. - * @param role a non-unique key for the desired components - * @param roleHints the list of hints. - * @return a List of component objects - * @throws ComponentLookupException in case of lookup error. - */ - List lookupList(String role, List roleHints) throws ComponentLookupException; - - /** - * Looks up and returns a List of component objects with the given role. - * @param type the non-unique type of the components - * @param The type. - * @return a List of component objects - * @throws ComponentLookupException in case of lookup error. - */ - List lookupList(Class type) throws ComponentLookupException; - - /** - * Looks up and returns a List of component objects with the given role. - * @param type the non-unique type of the components - * @param roleHints the list of hints. - * @param The type. - * @return a List of component objects - * @throws ComponentLookupException in case of lookup error. - */ - List lookupList(Class type, List roleHints) throws ComponentLookupException; - - /** - * Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. - * @param role a non-unique key for the desired components - * @return a Map of component objects - * @throws ComponentLookupException in case of lookup error. - */ - Map lookupMap(String role) throws ComponentLookupException; - - /** - * Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. - * @param role a non-unique key for the desired components - * @param roleHints the list of hints. - * @return a Map of component objects - * @throws ComponentLookupException in case of lookup error. - */ - Map lookupMap(String role, List roleHints) throws ComponentLookupException; - - /** - * Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. - * @param type the non-unique type of the components - * @param The type. - * @return a Map of component objects - * @throws ComponentLookupException in case of lookup error. - */ - Map lookupMap(Class type) throws ComponentLookupException; - - /** - * Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. - * @param type the non-unique type of the components - * @param roleHints the list of hints. - * @param The type. - * @return a Map of component objects - * @throws ComponentLookupException in case of lookup error. - */ - Map lookupMap(Class type, List roleHints) throws ComponentLookupException; - - // ---------------------------------------------------------------------- - // Component Descriptor Lookup - // ---------------------------------------------------------------------- - - /** - * Returns the ComponentDescriptor with the given component role and the default role hint. - * Searches up the hierarchy until one is found, null if none is found. - * @param role a unique role for the desired component's descriptor - * @return the ComponentDescriptor with the given component role - */ - ComponentDescriptor getComponentDescriptor(String role); - - /** - * Returns the ComponentDescriptor with the given component role and hint. - * Searches up the hierarchy until one is found, null if none is found. - * @param role a unique role for the desired component's descriptor - * @param roleHint a hint showing which implementation should be used - * @return the ComponentDescriptor with the given component role - */ - ComponentDescriptor getComponentDescriptor(String role, String roleHint); - - /** - * Returns the ComponentDescriptor with the given component role and hint. - * Searches up the hierarchy until one is found, null if none is found. - * @param type the Java type of the desired component - * @param role a unique role for the desired component's descriptor - * @param roleHint a hint showing which implementation should be used - * @param The type. - * @return the ComponentDescriptor with the given component role - */ - ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint); - - /** - * Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. Searches up the hierarchy until - * all are found, an empty Map if none are found. - * @param role a non-unique key for the desired components - * @return a Map of component descriptors keyed by role-hint - */ - Map> getComponentDescriptorMap(String role); - - /** - * Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. Searches up the hierarchy until - * all are found, an empty Map if none are found. - * @param type the Java type of the desired components - * @param role a non-unique key for the desired components - * @param The type. - * @return a Map of component descriptors keyed by role-hint - */ - Map> getComponentDescriptorMap(Class type, String role); - - /** - * Returns a List of ComponentDescriptors with the given role. Searches up the hierarchy until all are found, an - * empty List if none are found. - * @param role a non-unique key for the desired components - * @return a List of component descriptors - */ - List> getComponentDescriptorList(String role); - - /** - * Returns a List of ComponentDescriptors with the given role. Searches up the hierarchy until all are found, an - * empty List if none are found. - * @param type the Java type of the desired components - * @param role a non-unique key for the desired components - * @param The type. - * @return a List of component descriptors - */ - List> getComponentDescriptorList(Class type, String role); - - /** - * Adds a component descriptor to this container. componentDescriptor should have realmId set. - * @param componentDescriptor {@link ComponentDescriptor} - * @throws CycleDetectedInComponentGraphException In case of an error. - */ - void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException; - - /** - * Releases the component from the container. This is dependent upon how the implementation manages the component, - * but usually enacts some standard lifecycle shutdown procedure on the component. In every case, the component is - * no longer accessible from the container (unless another is created). - * @param component the plexus component object to release - * @throws ComponentLifecycleException in case of an error. - */ - void release(Object component) throws ComponentLifecycleException; - - /** - * Releases all Mapped component values from the container. - * @see PlexusContainer#release( Object component ) - * @param components Map of plexus component objects to release - * @throws ComponentLifecycleException in case of an error. - */ - void releaseAll(Map components) throws ComponentLifecycleException; - - /** - * Releases all Listed components from the container. - * @see PlexusContainer#release( Object component ) - * @param components List of plexus component objects to release - * @throws ComponentLifecycleException in case of an error. - */ - void releaseAll(List components) throws ComponentLifecycleException; - - /** - * Returns true if this container has the keyed component. - * @param role a non-unique key for the desired component - * @return true if this container has the keyed component - */ - boolean hasComponent(String role); - - /** - * Returns true if this container has a component with the given role/role-hint. - * @param role a non-unique key for the desired component - * @param roleHint a hint for the desired component implementation - * @return true if this container has a component with the given role/role-hint - */ - boolean hasComponent(String role, String roleHint); - - /** - * Returns true if this container has a component with the given role/role-hint. - * @param type the non-unique type of the component - * @return true if this container has a component with the given role/role-hint - */ - boolean hasComponent(Class type); - - /** - * Returns true if this container has a component with the given role/role-hint. - * @param type the non-unique type of the component - * @param roleHint a hint for the desired component implementation - * @return true if this container has a component with the given role/role-hint - */ - boolean hasComponent(Class type, String roleHint); - - /** - * Returns true if this container has a component with the given role/role-hint. - * @param type the non-unique type of the component - * @param role a non-unique key for the desired component - * @param roleHint a hint for the desired component implementation - * @return true if this container has a component with the given role/role-hint - */ - boolean hasComponent(Class type, String role, String roleHint); - - /** - * Disposes of this container, which in turn disposes all of it's components. This container should also remove - * itself from the container hierarchy. - */ - void dispose(); - - // ---------------------------------------------------------------------- - // Context - // ---------------------------------------------------------------------- - - /** - * Add a key/value pair to this container's Context. - * @param key any unique object valid to the Context's implementation - * @param value any object valid to the Context's implementation - */ - void addContextValue(Object key, Object value); - - /** - * Returns this container's context. A Context is a simple data store used to hold values which may alter the - * execution of the Container. - * @return this container's context. - */ - Context getContext(); - - /** - * Returns the Classworld's ClassRealm of this Container, which acts as the default parent for all contained - * components. - * @return the ClassRealm of this Container - */ - ClassRealm getContainerRealm(); - - // ---------------------------------------------------------------------- - // Discovery - // ---------------------------------------------------------------------- - - /** - * Adds the listener to this container. ComponentDiscoveryListeners have the ability to respond to various - * ComponentDiscoverer events. - * @param listener A listener which responds to different ComponentDiscoveryEvents - */ - void registerComponentDiscoveryListener(ComponentDiscoveryListener listener); - - /** - * Removes the listener from this container. - * @param listener A listener to remove - */ - void removeComponentDiscoveryListener(ComponentDiscoveryListener listener); - - /** - * Discovers components in the given realm. - * @param childRealm {@link ClassRealm} - * @return list {@link ComponentDescriptor} - * @throws PlexusConfigurationException in case of an error. - * @throws CycleDetectedInComponentGraphException in case of an error. - */ - List> discoverComponents(ClassRealm childRealm) - throws PlexusConfigurationException, CycleDetectedInComponentGraphException; - - /** - * Discovers components in the given realm. - * @param realm the {@link ClassRealm}. - * @param data The data. - * @return list {@link ComponentDescriptor} - * @throws PlexusConfigurationException in case of an error. - * @throws CycleDetectedInComponentGraphException in case of an error. - */ - List> discoverComponents(ClassRealm realm, Object data) - throws PlexusConfigurationException, CycleDetectedInComponentGraphException; - - // ---------------------------------------------------------------------------- - // Component/Plugin ClassRealm creation - // ---------------------------------------------------------------------------- - - ClassRealm createChildRealm(String id); - - ClassRealm getComponentRealm(String realmId); - - /** - * Dissociate the realm with the specified id from the container. This will - * remove all components contained in the realm from the component repository. - * - * @param componentRealm Realm to remove from the container. - * @throws PlexusContainerException {@link PlexusContainerException}. - */ - void removeComponentRealm(ClassRealm componentRealm) throws PlexusContainerException; - - /** - * Returns the lookup realm for this container, which is either - * the container realm or the realm set by {@link MutablePlexusContainer#setLookupRealm(ClassRealm)}. - * @return {@link ClassRealm} - */ - ClassRealm getLookupRealm(); - - /** - * Sets the lookup realm to use for lookup calls that don't have a ClassRealm parameter. - * @param realm the new realm to use. - * @return The previous lookup realm. It is advised to set it back once the old-style lookups have completed. - */ - ClassRealm setLookupRealm(ClassRealm realm); - - /** - * XXX ideally i'd like to place this in a plexus container specific utility class. - * - * Utility method to retrieve the lookup realm for a component instance. - * If the component's classloader is a ClassRealm, that realm is returned, - * otherwise the result of getLookupRealm is returned. - * @param component The component. - * @return {@link ClassRealm} - */ - ClassRealm getLookupRealm(Object component); - - void addComponent(Object component, String role) throws CycleDetectedInComponentGraphException; - - /** - * Adds live component instance to this container. - * - * Component instance is not associated with any class realm and will - * be ignored during lookup is lookup realm is provided using thread context - * classloader. - * @param component The component. - * @param role The role. - * @param roleHint The hint. - * @param The type. - */ - void addComponent(T component, Class role, String roleHint); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainerException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainerException.java deleted file mode 100644 index 89ca080a1..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusContainerException.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Container execution exception. - * - * @author Brett Porter - */ -public class PlexusContainerException extends Exception { - private static final long serialVersionUID = 2213861902264275451L; - - /** - * Construct a new PlexusContainerException instance. - * @param message exception message - * @param throwable causing exception to chain - */ - public PlexusContainerException(String message, Throwable throwable) { - super(message, throwable); - } - - /** - * Construct a new PlexusContainerException instance. - * @param message exception message - */ - public PlexusContainerException(String message) { - super(message); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusJUnit4TestCase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusJUnit4TestCase.java deleted file mode 100644 index 29316b77e..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusJUnit4TestCase.java +++ /dev/null @@ -1,250 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.io.InputStream; - -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupRuntimeException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.DefaultContext; -import org.junit.After; -import org.junit.Before; - -import static org.junit.Assert.fail; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @author Michal Maczka - */ -public abstract class PlexusJUnit4TestCase { - private PlexusContainer container; - - private static String basedir; - - @Before - public void beforeTest() throws Exception { - basedir = getBasedir(); - } - - protected void setupContainer() { - // ---------------------------------------------------------------------------- - // Context Setup - // ---------------------------------------------------------------------------- - - DefaultContext context = new DefaultContext(); - - context.put("basedir", getBasedir()); - - customizeContext(context); - - boolean hasPlexusHome = context.contains("plexus.home"); - - if (!hasPlexusHome) { - File f = getTestFile("target/plexus-home"); - - if (!f.isDirectory()) { - f.mkdir(); - } - - context.put("plexus.home", f.getAbsolutePath()); - } - - // ---------------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------------- - - String config = getCustomConfigurationName(); - - ContainerConfiguration containerConfiguration = - new DefaultContainerConfiguration().setName("test").setContext(context.getContextData()); - - if (config != null) { - containerConfiguration.setContainerConfiguration(config); - } else { - String resource = getConfigurationName(null); - - containerConfiguration.setContainerConfiguration(resource); - } - - customizeContainerConfiguration(containerConfiguration); - - try { - container = new DefaultPlexusContainer(containerConfiguration); - } catch (PlexusContainerException e) { - e.printStackTrace(); - fail("Failed to create plexus container."); - } - } - - /** - * Allow custom test case implementations do augment the default container configuration before - * executing tests. - * - * @param containerConfiguration The configuration - */ - protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration) {} - - protected void customizeContext(Context context) {} - - protected PlexusConfiguration customizeComponentConfiguration() { - return null; - } - - @After - public void afterTest() throws Exception { - if (container != null) { - container.dispose(); - - container = null; - } - } - - protected PlexusContainer getContainer() { - if (container == null) { - setupContainer(); - } - - return container; - } - - protected InputStream getConfiguration() { - return getConfiguration(null); - } - - protected InputStream getConfiguration(String subname) { - return getResourceAsStream(getConfigurationName(subname)); - } - - protected String getCustomConfigurationName() { - return null; - } - - /** - * Allow the retrieval of a container configuration that is based on the name - * of the test class being run. So if you have a test class called org.foo.FunTest, then - * this will produce a resource name of org/foo/FunTest.xml which would be used to - * configure the Plexus container before running your test. - * - * @param subname the subname (not used) - * @return A configuration name - */ - protected String getConfigurationName(String subname) { - return getClass().getName().replace('.', '/') + ".xml"; - } - - protected InputStream getResourceAsStream(String resource) { - return getClass().getResourceAsStream(resource); - } - - protected ClassLoader getClassLoader() { - return getClass().getClassLoader(); - } - - // ---------------------------------------------------------------------- - // Container access - // ---------------------------------------------------------------------- - - protected Object lookup(String componentKey) { - try { - return getContainer().lookup(componentKey); - } catch (ComponentLookupException e) { - throw new ComponentLookupRuntimeException(e); - } - } - - protected Object lookup(String role, String roleHint) throws ComponentLookupRuntimeException { - try { - return getContainer().lookup(role, roleHint); - } catch (ComponentLookupException e) { - throw new ComponentLookupRuntimeException(e); - } - } - - protected T lookup(Class componentClass) throws ComponentLookupRuntimeException { - try { - return getContainer().lookup(componentClass); - } catch (ComponentLookupException e) { - throw new ComponentLookupRuntimeException(e); - } - } - - protected T lookup(Class componentClass, String roleHint) throws ComponentLookupRuntimeException { - try { - return getContainer().lookup(componentClass, roleHint); - } catch (ComponentLookupException e) { - throw new ComponentLookupRuntimeException(e); - } - } - - protected void release(Object component) throws Exception { - getContainer().release(component); - } - - // ---------------------------------------------------------------------- - // Helper methods for sub classes - // ---------------------------------------------------------------------- - - public static File getTestFile(String path) { - return new File(getBasedir(), path); - } - - public static File getTestFile(String basedir, String path) { - File basedirFile = new File(basedir); - - if (!basedirFile.isAbsolute()) { - basedirFile = getTestFile(basedir); - } - - return new File(basedirFile, path); - } - - public static String getTestPath(String path) { - return getTestFile(path).getAbsolutePath(); - } - - public static String getTestPath(String basedir, String path) { - return getTestFile(basedir, path).getAbsolutePath(); - } - - public static String getBasedir() { - if (basedir != null) { - return basedir; - } - - basedir = System.getProperty("basedir"); - - if (basedir == null) { - basedir = new File("").getAbsolutePath(); - } - - return basedir; - } - - public String getTestConfiguration() { - return getTestConfiguration(getClass()); - } - - public static String getTestConfiguration(Class clazz) { - String s = clazz.getName().replace('.', '/'); - - return s.substring(0, s.indexOf("$")) + ".xml"; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusTestCase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusTestCase.java deleted file mode 100644 index e41806f5e..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/PlexusTestCase.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.io.InputStream; - -import junit.framework.TestCase; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.DefaultContext; - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - * @author Michal Maczka - */ -public abstract class PlexusTestCase extends TestCase { - private PlexusContainer container; - - private static String basedir; - - protected void setUp() throws Exception { - basedir = getBasedir(); - } - - @SuppressWarnings("ResultOfMethodCallIgnored") - protected void setupContainer() { - // ---------------------------------------------------------------------------- - // Context Setup - // ---------------------------------------------------------------------------- - - DefaultContext context = new DefaultContext(); - - context.put("basedir", getBasedir()); - - customizeContext(context); - - boolean hasPlexusHome = context.contains("plexus.home"); - - if (!hasPlexusHome) { - File f = getTestFile("target/plexus-home"); - - if (!f.isDirectory()) { - f.mkdir(); - } - - context.put("plexus.home", f.getAbsolutePath()); - } - - // ---------------------------------------------------------------------------- - // Configuration - // ---------------------------------------------------------------------------- - - String config = getCustomConfigurationName(); - - ContainerConfiguration containerConfiguration = - new DefaultContainerConfiguration().setName("test").setContext(context.getContextData()); - - if (config != null) { - containerConfiguration.setContainerConfiguration(config); - } else { - String resource = getConfigurationName(null); - - containerConfiguration.setContainerConfiguration(resource); - } - - customizeContainerConfiguration(containerConfiguration); - - try { - container = new DefaultPlexusContainer(containerConfiguration); - } catch (PlexusContainerException e) { - e.printStackTrace(); - fail("Failed to create plexus container."); - } - } - - /** - * Allow custom test case implementations do augment the default container configuration before - * executing tests. - * - * @param containerConfiguration {@link ContainerConfiguration}. - */ - protected void customizeContainerConfiguration(ContainerConfiguration containerConfiguration) {} - - protected void customizeContext(Context context) {} - - protected PlexusConfiguration customizeComponentConfiguration() { - return null; - } - - protected void tearDown() throws Exception { - if (container != null) { - container.dispose(); - - container = null; - } - } - - protected PlexusContainer getContainer() { - if (container == null) { - setupContainer(); - } - - return container; - } - - protected InputStream getConfiguration() throws Exception { - return getConfiguration(null); - } - - protected InputStream getConfiguration(String subname) throws Exception { - return getResourceAsStream(getConfigurationName(subname)); - } - - protected String getCustomConfigurationName() { - return null; - } - - /** - * Allow the retrieval of a container configuration that is based on the name - * of the test class being run. So if you have a test class called org.foo.FunTest, then - * this will produce a resource name of org/foo/FunTest.xml which would be used to - * configure the Plexus container before running your test. - * - * @param subname the subname - * @return A configruation name - */ - protected String getConfigurationName(String subname) { - return getClass().getName().replace('.', '/') + ".xml"; - } - - protected InputStream getResourceAsStream(String resource) { - return getClass().getResourceAsStream(resource); - } - - protected ClassLoader getClassLoader() { - return getClass().getClassLoader(); - } - - // ---------------------------------------------------------------------- - // Container access - // ---------------------------------------------------------------------- - - @SuppressWarnings("unchecked") - protected T lookup(String componentKey) throws Exception { - return (T) getContainer().lookup(componentKey); - } - - @SuppressWarnings("unchecked") - protected T lookup(String role, String roleHint) throws Exception { - return (T) getContainer().lookup(role, roleHint); - } - - protected T lookup(Class componentClass) throws Exception { - return getContainer().lookup(componentClass); - } - - protected T lookup(Class componentClass, String roleHint) throws Exception { - return getContainer().lookup(componentClass, roleHint); - } - - protected void release(Object component) throws Exception { - getContainer().release(component); - } - - // ---------------------------------------------------------------------- - // Helper methods for sub classes - // ---------------------------------------------------------------------- - - public static File getTestFile(String path) { - return new File(getBasedir(), path); - } - - public static File getTestFile(String basedir, String path) { - File basedirFile = new File(basedir); - - if (!basedirFile.isAbsolute()) { - basedirFile = getTestFile(basedir); - } - - return new File(basedirFile, path); - } - - public static String getTestPath(String path) { - return getTestFile(path).getAbsolutePath(); - } - - public static String getTestPath(String basedir, String path) { - return getTestFile(basedir, path).getAbsolutePath(); - } - - public static String getBasedir() { - if (basedir != null) { - return basedir; - } - - basedir = System.getProperty("basedir"); - - if (basedir == null) { - basedir = new File("").getAbsolutePath(); - } - - return basedir; - } - - public String getTestConfiguration() { - return getTestConfiguration(getClass()); - } - - public static String getTestConfiguration(Class clazz) { - String s = clazz.getName().replace('.', '/'); - - return s.substring(0, s.indexOf("$")) + ".xml"; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/CastUtils.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/CastUtils.java deleted file mode 100644 index 3c57179f4..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/CastUtils.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.codehaus.plexus.component; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.xbean.recipe.RecipeHelper; - -@SuppressWarnings({"unchecked", "UnusedDeclaration"}) -public final class CastUtils { - private CastUtils() { - // utility class, never constructed - } - - public static Map cast(Map p) { - return (Map) p; - } - - public static Map cast(Map p, Class t, Class u) { - return (Map) p; - } - - public static Collection cast(Collection p) { - return (Collection) p; - } - - public static Collection cast(Collection p, Class cls) { - return (Collection) p; - } - - public static List cast(List p) { - return (List) p; - } - - public static List cast(List p, Class cls) { - return (List) p; - } - - public static Iterator cast(Iterator p) { - return (Iterator) p; - } - - public static Iterator cast(Iterator p, Class cls) { - return (Iterator) p; - } - - public static Set cast(Set p) { - return (Set) p; - } - - public static Set cast(Set p, Class cls) { - return (Set) p; - } - - public static Map.Entry cast(Map.Entry p) { - return (Map.Entry) p; - } - - public static Map.Entry cast(Map.Entry p, Class pc, Class uc) { - return (Map.Entry) p; - } - - // todo remove when recipe helper accecpts nulls - public static boolean isAssignableFrom(Class expected, Class actual) { - return actual != null && RecipeHelper.isAssignableFrom(expected, actual); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/MapOrientedComponent.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/MapOrientedComponent.java deleted file mode 100644 index aaa108907..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/MapOrientedComponent.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.component; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Map; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.repository.ComponentRequirement; - -public interface MapOrientedComponent { - - void addComponentRequirement(ComponentRequirement requirementDescriptor, Object requirementValue) - throws ComponentConfigurationException; - - void setComponentConfiguration(Map componentConfiguration) throws ComponentConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/AbstractComponentBuildListener.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/AbstractComponentBuildListener.java deleted file mode 100644 index a6ecd66f6..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/AbstractComponentBuildListener.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.codehaus.plexus.component.builder; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public abstract class AbstractComponentBuildListener implements ComponentBuildListener { - public void beforeComponentCreate(ComponentDescriptor componentDescriptor, ClassRealm realm) {} - - public void componentCreated(ComponentDescriptor componentDescriptor, Object component, ClassRealm realm) {} - - public void componentConfigured(ComponentDescriptor componentDescriptor, Object component, ClassRealm realm) {} -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuildListener.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuildListener.java deleted file mode 100644 index 9ec6e7ee1..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuildListener.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.codehaus.plexus.component.builder; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public interface ComponentBuildListener { - - void beforeComponentCreate(ComponentDescriptor componentDescriptor, ClassRealm realm); - - void componentCreated(ComponentDescriptor componentDescriptor, Object component, ClassRealm realm); - - void componentConfigured(ComponentDescriptor componentDescriptor, Object component, ClassRealm realm); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuilder.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuilder.java deleted file mode 100644 index 99bbdd158..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/ComponentBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.codehaus.plexus.component.builder; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; - -public interface ComponentBuilder { - - T build(ComponentDescriptor descriptor, ClassRealm realm, ComponentBuildListener listener) - throws ComponentInstantiationException, ComponentLifecycleException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/XBeanComponentBuilder.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/XBeanComponentBuilder.java deleted file mode 100644 index 950c7986d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/builder/XBeanComponentBuilder.java +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.codehaus.plexus.component.builder; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.apache.xbean.recipe.AbstractRecipe; -import org.apache.xbean.recipe.ConstructionException; -import org.apache.xbean.recipe.ObjectRecipe; -import org.apache.xbean.recipe.Option; -import org.apache.xbean.recipe.RecipeHelper; -import org.codehaus.plexus.ComponentRegistry; -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.MapOrientedComponent; -import org.codehaus.plexus.component.collections.ComponentList; -import org.codehaus.plexus.component.collections.ComponentMap; -import org.codehaus.plexus.component.configurator.BasicComponentConfigurator; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.composite.MapConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup; -import org.codehaus.plexus.component.configurator.converters.special.ClassRealmConverter; -import org.codehaus.plexus.component.configurator.expression.DefaultExpressionEvaluator; -import org.codehaus.plexus.component.factory.ComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.factory.java.JavaComponentFactory; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.component.repository.ComponentRequirementList; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; -import org.codehaus.plexus.util.StringUtils; - -import static org.apache.xbean.recipe.RecipeHelper.toClass; - -public class XBeanComponentBuilder implements ComponentBuilder { - private static final ThreadLocal>> STACK = - new ThreadLocal>>() { - protected LinkedHashSet> initialValue() { - return new LinkedHashSet>(); - } - }; - - private ComponentManager componentManager; - - public XBeanComponentBuilder() {} - - public XBeanComponentBuilder(ComponentManager componentManager) { - setComponentManager(componentManager); - } - - public ComponentManager getComponentManager() { - return componentManager; - } - - public void setComponentManager(ComponentManager componentManager) { - this.componentManager = componentManager; - } - - protected MutablePlexusContainer getContainer() { - return componentManager.getContainer(); - } - - public T build(ComponentDescriptor descriptor, ClassRealm realm, ComponentBuildListener listener) - throws ComponentInstantiationException, ComponentLifecycleException { - LinkedHashSet> stack = STACK.get(); - if (stack.contains(descriptor)) { - // create list of circularity - List> circularity = new ArrayList>(stack); - circularity.subList(circularity.indexOf(descriptor), circularity.size()); - circularity.add(descriptor); - - // nice circularity message - String message = "Creation circularity: "; - for (ComponentDescriptor componentDescriptor : circularity) { - message += "\n\t[" + componentDescriptor.getRole() + ", " + componentDescriptor.getRoleHint() + "]"; - } - throw new ComponentInstantiationException(message); - } - stack.add(descriptor); - try { - if (listener != null) { - listener.beforeComponentCreate(descriptor, realm); - } - - T component = createComponentInstance(descriptor, realm); - - if (listener != null) { - listener.componentCreated(descriptor, component, realm); - } - - startComponentLifecycle(component, realm); - - if (listener != null) { - listener.componentConfigured(descriptor, component, realm); - } - - return component; - } finally { - stack.remove(descriptor); - } - } - - protected T createComponentInstance(ComponentDescriptor descriptor, ClassRealm realm) - throws ComponentInstantiationException, ComponentLifecycleException { - MutablePlexusContainer container = getContainer(); - if (realm == null) { - realm = descriptor.getRealm(); - } - - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(realm); - try { - ObjectRecipe recipe; - - T instance; - ComponentFactory componentFactory = - container.getComponentFactoryManager().findComponentFactory(descriptor.getComponentFactory()); - if (JavaComponentFactory.class.equals(componentFactory.getClass())) { - // xbean-reflect will create object and do injection - recipe = createObjectRecipe(null, descriptor, realm); - instance = (T) recipe.create(); - } else { - // todo figure out how to easily let xbean use the factory to construct the component - // use object factory to construct component and then inject into that object - instance = (T) componentFactory.newInstance(descriptor, realm, container); - recipe = createObjectRecipe(instance, descriptor, realm); - recipe.setProperties(instance); - } - - // todo figure out how to easily let xbean do this map oriented stuff (if it is actually used in plexus) - if (instance instanceof MapOrientedComponent) { - MapOrientedComponent mapOrientedComponent = (MapOrientedComponent) instance; - processMapOrientedComponent(descriptor, mapOrientedComponent, realm); - } - - return instance; - } catch (Exception e) { - throw new ComponentLifecycleException( - "Error constructing component " + descriptor.getHumanReadableKey(), e); - } catch (LinkageError e) { - throw new ComponentLifecycleException( - "Error constructing component " + descriptor.getHumanReadableKey(), e); - } finally { - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - public ObjectRecipe createObjectRecipe(T instance, ComponentDescriptor descriptor, ClassRealm realm) - throws ComponentInstantiationException, PlexusConfigurationException { - String factoryMethod = null; - String[] constructorArgNames = null; - Class[] constructorArgTypes = null; - - Class implClass = (instance != null) ? instance.getClass() : descriptor.getImplementationClass(); - - if (implClass == null || implClass == Object.class) { - // if the descriptor could not load the class, it's time to report this up to the caller now - try { - realm.loadClass(descriptor.getImplementation()); - } catch (ClassNotFoundException e) { - throw new ComponentInstantiationException( - "Could not load implementation class for component " + descriptor.getHumanReadableKey() - + " from class realm " + realm, - e); - } catch (LinkageError e) { - throw new ComponentInstantiationException( - "Could not load implementation class for component " + descriptor.getHumanReadableKey() - + " from class realm " + realm, - e); - } - } - - ObjectRecipe recipe = new ObjectRecipe(implClass, factoryMethod, constructorArgNames, constructorArgTypes); - recipe.allow(Option.FIELD_INJECTION); - recipe.allow(Option.PRIVATE_PROPERTIES); - - // MapOrientedComponents don't get normal injection - if (!MapOrientedComponent.class.isAssignableFrom(implClass)) { - for (ComponentRequirement requirement : descriptor.getRequirements()) { - String name = requirement.getFieldName(); - RequirementRecipe requirementRecipe = - new RequirementRecipe(descriptor, requirement, getContainer(), name == null); - - if (name != null) { - recipe.setProperty(name, requirementRecipe); - } else { - recipe.setAutoMatchProperty(requirement.getRole(), requirementRecipe); - } - } - - // add configuration data - if (shouldConfigure(descriptor)) { - PlexusConfiguration configuration = descriptor.getConfiguration(); - if (configuration != null) { - for (String name : configuration.getAttributeNames()) { - String value; - try { - value = configuration.getAttribute(name); - } catch (PlexusConfigurationException e) { - throw new ComponentInstantiationException("Error getting value for attribute " + name, e); - } - name = fromXML(name); - recipe.setProperty(name, value); - } - for (PlexusConfiguration child : configuration.getChildren()) { - String name = child.getName(); - name = fromXML(name); - if (StringUtils.isNotEmpty(child.getValue(null))) { - recipe.setProperty(name, child.getValue()); - } else { - recipe.setProperty(name, new PlexusConfigurationRecipe(child)); - } - } - } - } - } - return recipe; - } - - protected boolean shouldConfigure(ComponentDescriptor descriptor) { - String configuratorId = descriptor.getComponentConfigurator(); - - if (StringUtils.isEmpty(configuratorId)) { - return true; - } - - try { - ComponentConfigurator componentConfigurator = - getContainer().lookup(ComponentConfigurator.class, configuratorId); - return componentConfigurator == null - || componentConfigurator.getClass().equals(BasicComponentConfigurator.class); - } catch (ComponentLookupException e) { - } - - return true; - } - - protected String fromXML(String elementName) { - return StringUtils.lowercaseFirstLetter(StringUtils.removeAndHump(elementName, "-")); - } - - protected void startComponentLifecycle(Object component, ClassRealm realm) throws ComponentLifecycleException { - try { - componentManager.start(component); - } catch (PhaseExecutionException e) { - throw new ComponentLifecycleException("Error starting component", e); - } - } - - public static class RequirementRecipe extends AbstractRecipe { - private ComponentDescriptor componentDescriptor; - private ComponentRequirement requirement; - private MutablePlexusContainer container; - private boolean autoMatch; - - public RequirementRecipe( - ComponentDescriptor componentDescriptor, - ComponentRequirement requirement, - MutablePlexusContainer container, - boolean autoMatch) { - this.componentDescriptor = componentDescriptor; - this.requirement = requirement; - this.container = container; - this.autoMatch = autoMatch; - } - - public boolean canCreate(Type expectedType) { - if (!autoMatch) { - return true; - } - - Class propertyType = toClass(expectedType); - - // Never auto match array, map or collection - if (propertyType.isArray() - || Map.class.isAssignableFrom(propertyType) - || Collection.class.isAssignableFrom(propertyType) - || requirement instanceof ComponentRequirementList) { - return false; - } - - // if the type to be created is an instance of the expected type, return true - try { - ComponentRegistry componentRegistry = container.getComponentRegistry(); - - return componentRegistry.getComponentDescriptor( - propertyType, requirement.getRole(), requirement.getRoleHint()) - != null; - } catch (Exception e) { - } - - return false; - } - - @Override - protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throws ConstructionException { - Class propertyType = toClass(expectedType); - - try { - String role = requirement.getRole(); - List roleHints = null; - if (requirement instanceof ComponentRequirementList) { - roleHints = ((ComponentRequirementList) requirement).getRoleHints(); - } - - Object assignment; - if (propertyType.isArray()) { - assignment = new ArrayList(container.lookupList(role, roleHints)); - } - - // Map.class.isAssignableFrom( clazz ) doesn't make sense, since Map.class doesn't really - // have a meaningful superclass. - else { - if (Map.class.equals(propertyType)) { - // todo this is a lazy map - - // get component type - Type keyType = Object.class; - Type valueType = Object.class; - Type[] typeParameters = RecipeHelper.getTypeParameters(Collection.class, expectedType); - if (typeParameters != null && typeParameters.length == 2) { - if (typeParameters[0] instanceof Class) { - keyType = typeParameters[0]; - } - if (typeParameters[1] instanceof Class) { - valueType = typeParameters[1]; - } - } - - // todo verify key type is String - - assignment = new ComponentMap( - container, - toClass(valueType), - role, - roleHints, - componentDescriptor.getHumanReadableKey()); - } - // List.class.isAssignableFrom( clazz ) doesn't make sense, since List.class doesn't really - // have a meaningful superclass other than Collection.class, which we'll handle next. - else if (List.class.equals(propertyType)) { - // todo this is a lazy list - - // get component type - Type[] typeParameters = RecipeHelper.getTypeParameters(Collection.class, expectedType); - Type componentType = Object.class; - if (typeParameters != null - && typeParameters.length == 1 - && typeParameters[0] instanceof Class) { - componentType = typeParameters[0]; - } - - assignment = new ComponentList( - container, - toClass(componentType), - role, - roleHints, - componentDescriptor.getHumanReadableKey()); - } - // Set.class.isAssignableFrom( clazz ) doesn't make sense, since Set.class doesn't really - // have a meaningful superclass other than Collection.class, and that would make this - // if-else cascade unpredictable (both List and Set extend Collection, so we'll put another - // check in for Collection.class. - else if (Set.class.equals(propertyType) || Collection.class.isAssignableFrom(propertyType)) { - // todo why isn't this lazy as above? - assignment = container.lookupMap(role, roleHints); - } else if (Logger.class.equals(propertyType)) { - // todo magic reference - assignment = container.getLoggerManager().getLoggerForComponent(componentDescriptor.getRole()); - } else if (PlexusContainer.class.equals(propertyType)) { - // todo magic reference - assignment = container; - } else { - String roleHint = requirement.getRoleHint(); - assignment = container.lookup(propertyType, role, roleHint); - } - } - - return assignment; - } catch (ComponentLookupException e) { - if (requirement.isOptional()) { - return null; - } - - throw new ConstructionException( - "Composition failed of field " + requirement.getFieldName() + " " - + "in object of type " + componentDescriptor.getImplementation() - + " because the requirement " - + requirement + " was missing)", - e); - } - } - - @Override - public String toString() { - return "RequirementRecipe[fieldName=" + requirement.getFieldName() + ", role=" - + componentDescriptor.getRole() + "]"; - } - } - - private class PlexusConfigurationRecipe extends AbstractRecipe { - private final PlexusConfiguration child; - - public PlexusConfigurationRecipe(PlexusConfiguration child) { - this.child = child; - } - - public boolean canCreate(Type type) { - try { - ConverterLookup lookup = createConverterLookup(); - lookup.lookupConverterForType(toClass(type)); - return true; - } catch (ComponentConfigurationException e) { - return false; - } - } - - @Override - protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throws ConstructionException { - try { - ConverterLookup lookup = createConverterLookup(); - ConfigurationConverter converter = lookup.lookupConverterForType(toClass(expectedType)); - - // todo this will not work for static factories - ObjectRecipe caller = (ObjectRecipe) RecipeHelper.getCaller(); - Class parentClass = toClass(caller.getType()); - - Object value = converter.fromConfiguration( - lookup, - child, - toClass(expectedType), - parentClass, - Thread.currentThread().getContextClassLoader(), - new DefaultExpressionEvaluator()); - return value; - } catch (ComponentConfigurationException e) { - throw new ConstructionException("Unable to convert configuration for property " + child.getName() - + " to " + toClass(expectedType).getName()); - } - } - - private ConverterLookup createConverterLookup() { - ClassRealm realm = (ClassRealm) Thread.currentThread().getContextClassLoader(); - ConverterLookup lookup = new DefaultConverterLookup(); - lookup.registerConverter(new ClassRealmConverter(realm)); - return lookup; - } - } - - private void processMapOrientedComponent( - ComponentDescriptor descriptor, MapOrientedComponent mapOrientedComponent, ClassRealm realm) - throws ComponentConfigurationException, ComponentLookupException { - MutablePlexusContainer container = getContainer(); - - for (ComponentRequirement requirement : descriptor.getRequirements()) { - String role = requirement.getRole(); - String hint = requirement.getRoleHint(); - String mappingType = requirement.getFieldMappingType(); - - Object value; - - // if the hint is not empty (and not default), we don't care about mapping type... - // it's a single-value, not a collection. - if (StringUtils.isNotEmpty(hint) && !hint.equals(PlexusConstants.PLEXUS_DEFAULT_HINT)) { - value = container.lookup(role, hint); - } else if ("single".equals(mappingType)) { - value = container.lookup(role, hint); - } else if ("map".equals(mappingType)) { - value = container.lookupMap(role); - } else if ("set".equals(mappingType)) { - value = new HashSet(container.lookupList(role)); - } else { - value = container.lookup(role, hint); - } - - mapOrientedComponent.addComponentRequirement(requirement, value); - } - - MapConverter converter = new MapConverter(); - ConverterLookup converterLookup = new DefaultConverterLookup(); - DefaultExpressionEvaluator expressionEvaluator = new DefaultExpressionEvaluator(); - PlexusConfiguration configuration = container.getConfigurationSource().getConfiguration(descriptor); - - if (configuration != null) { - Map context = (Map) converter.fromConfiguration( - converterLookup, configuration, null, null, realm, expressionEvaluator, null); - - mapOrientedComponent.setComponentConfiguration(context); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/AbstractComponentCollection.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/AbstractComponentCollection.java deleted file mode 100644 index bd1bd0593..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/AbstractComponentCollection.java +++ /dev/null @@ -1,165 +0,0 @@ -package org.codehaus.plexus.component.collections; - -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.logging.Logger; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** @author Jason van Zyl */ - -// We need to have the collection notified when a new implementation of a given role has -// been added to the container. We probably need some options so that we know when new -// component descriptors have been added to the system, and an option to keep the collection -// up-to-date when new implementations are added. -// -// NOTE: This includes component additions, but also component purges from the -// container, as when a component realm is disposed -// (and PlexusContainer.removeComponentRealm(..) is called). -public abstract class AbstractComponentCollection { - /** The reference to the PlexusContainer */ - protected MutablePlexusContainer container; - - /** The type of the components held by this collection*/ - protected final Class componentType; - - /** The role of the components we are holding in this Collection. */ - protected String role; - - /** The role hint of the components we are holding in this Collection. */ - protected List roleHints; - - /** The component that requires this collection of components */ - protected String hostComponent; - - /** Used to log errors in the component lookup process. */ - protected Logger logger; - - private ClassLoader tccl; - private Collection realms; - - private Map> componentDescriptorMap; - private final ClassWorld world; - - public AbstractComponentCollection( - final MutablePlexusContainer container, - final Class componentType, - final String role, - final List roleHints, - final String hostComponent) { - this.container = container; - - this.componentType = componentType; - - this.role = role; - - this.roleHints = roleHints; - - this.hostComponent = hostComponent; - - logger = container.getLoggerManager().getLoggerForComponent(role); - - world = container.getContainerRealm().getWorld(); - } - - private boolean realmsHaveChanged() { - return (tccl != Thread.currentThread().getContextClassLoader()) - || (realms == null) - || (!realms.equals(world.getRealms())); - } - - protected synchronized Map> getComponentDescriptorMap() { - checkUpdate(); - - return componentDescriptorMap; - } - - @SuppressWarnings("unchecked") - protected boolean checkUpdate() { - if (componentDescriptorMap != null && !realmsHaveChanged()) { - return false; - } - - tccl = Thread.currentThread().getContextClassLoader(); - Collection fromWorld = world.getRealms(); - if (fromWorld == null || fromWorld.isEmpty()) { - realms = null; - } else { - realms = new HashSet(fromWorld); - } - - Map> componentMap = container.getComponentDescriptorMap(componentType, role); - Map> newComponentDescriptors = - new HashMap>(componentMap.size() * 2); - - if (roleHints != null && !roleHints.isEmpty()) { - for (String roleHint : roleHints) { - ComponentDescriptor componentDescriptor = componentMap.get(roleHint); - if (componentDescriptor != null) { - newComponentDescriptors.put(roleHint, componentDescriptor); - } - } - } else { - newComponentDescriptors.putAll(componentMap); - } - - if (componentDescriptorMap == null || !newComponentDescriptors.equals(componentDescriptorMap)) { - componentDescriptorMap = newComponentDescriptors; - - return true; - } - - return false; - } - - protected T lookup(ComponentDescriptor componentDescriptor) { - T component = null; - - try { - if (componentDescriptor != null) { - component = container.lookup(componentDescriptor); - } - } catch (ComponentLookupException e) { - logger.debug( - "Failed to lookup a member of active collection with role: " + role + " and role-hint: " - + componentDescriptor.getRoleHint(), - e); - } - - return component; - } - - public synchronized void clear() { - releaseAllCallback(); - - componentDescriptorMap = null; - - tccl = null; - realms = null; - } - - protected abstract void releaseAllCallback(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentList.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentList.java deleted file mode 100644 index 6db2e8ea4..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentList.java +++ /dev/null @@ -1,223 +0,0 @@ -package org.codehaus.plexus.component.collections; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; -import java.util.Map; -import java.util.Map.Entry; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; - -/** - * @author Jason van Zyl FIXME: [jdcasey] We need to review the efficiency (in speed and memory) of this collection... - */ -public class ComponentList extends AbstractComponentCollection implements List { - private List components; - - public ComponentList( - MutablePlexusContainer container, - Class type, - String role, - List roleHints, - String hostComponent) { - super(container, type, role, roleHints, hostComponent); - } - - public int size() { - return getComponentDescriptorMap().size(); - } - - public boolean isEmpty() { - return getComponentDescriptorMap().isEmpty(); - } - - public boolean contains(Object object) { - return getList().contains(object); - } - - public Iterator iterator() { - return getList().iterator(); - } - - public Object[] toArray() { - return getList().toArray(); - } - - public X[] toArray(X[] ts) { - return getList().toArray(ts); - } - - public synchronized boolean add(T object) { - getList().add(object); - - /* - * PLX-352 This is strictly to support the hack in the Ant Run plugin that tries to poke in a custom converter. - * We need a better way to register converters to plexus and not hit the default converter lookup directly. - * throw new UnsupportedOperationException( "You cannot modify this list. This list is a requirement of " + - * hostComponent + " and managed by the container." ); - */ - - return true; - } - - public boolean remove(Object object) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public boolean containsAll(Collection collection) { - return getList().containsAll(collection); - } - - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public boolean addAll(int i, Collection collection) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public synchronized boolean removeAll(Collection collection) { - return getList().removeAll(collection); - } - - public synchronized boolean retainAll(Collection collection) { - return getList().retainAll(collection); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof List)) { - return false; - } - - List other = (List) o; - return getList().equals(other); - } - - public int hashCode() { - return getList().hashCode(); - } - - public T get(int i) { - return getList().get(i); - } - - public T set(int i, T object) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public void add(int i, T object) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public T remove(int i) { - throw new UnsupportedOperationException("You cannot modify this list. This list is a requirement of " - + hostComponent + " and managed by the container."); - } - - public int indexOf(Object object) { - return getList().indexOf(object); - } - - public int lastIndexOf(Object object) { - return getList().lastIndexOf(object); - } - - public ListIterator listIterator() { - return getList().listIterator(); - } - - public ListIterator listIterator(int index) { - return getList().listIterator(index); - } - - public List subList(int fromIndex, int toIndex) { - return getList().subList(fromIndex, toIndex); - } - - private synchronized List getList() { - // NOTE: If we cache the component map, we have a problem with releasing any of the - // components in this map...we need to be able to release them all. - if ((components == null) || checkUpdate()) { - List componentList = new ArrayList(); - - Map> descriptorMap = getComponentDescriptorMap(); - - if (roleHints != null) { - // we must follow the order in roleHints - for (String roleHint : roleHints) { - ComponentDescriptor componentDescriptor = descriptorMap.get(roleHint); - - T component = lookup(componentDescriptor); - - if (component != null) { - componentList.add(component); - } - } - } else { - for (Entry> entry : descriptorMap.entrySet()) { - ComponentDescriptor componentDescriptor = entry.getValue(); - - T component = lookup(componentDescriptor); - - if (component != null) { - componentList.add(component); - } - } - } - components = componentList; - } - - return components; - } - - @Override - protected boolean checkUpdate() { - if (super.checkUpdate()) { - components = null; - - return true; - } - - return false; - } - - protected void releaseAllCallback() { - if (components != null) { - try { - container.releaseAll(components); - } catch (ComponentLifecycleException e) { - logger.debug("Error releasing components in active collection: " + e.getMessage(), e); - } - - components = null; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentMap.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentMap.java deleted file mode 100644 index 740a4f5f2..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/collections/ComponentMap.java +++ /dev/null @@ -1,196 +0,0 @@ -package org.codehaus.plexus.component.collections; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; - -/** - * @author Jason van Zyl FIXME: [jdcasey] We need to review the efficiency (in speed and memory) of this collection... - */ -public class ComponentMap extends AbstractComponentCollection implements Map { - private Map components; - - private Map customAdditions = new LinkedHashMap(); - - public ComponentMap( - MutablePlexusContainer container, - Class type, - String role, - List roleHints, - String hostComponent) { - super(container, type, role, roleHints, hostComponent); - } - - public int size() { - return getComponentDescriptorMap().size(); - } - - public boolean isEmpty() { - return getComponentDescriptorMap().isEmpty(); - } - - public boolean containsKey(Object key) { - return getComponentDescriptorMap().containsKey(key); - } - - public boolean containsValue(Object value) { - return getMap().containsValue(value); - } - - public T get(Object k) { - return getMap().get(k); - } - - public synchronized T put(String key, T value) { - logger.warn("Custom " - + role - + " implementations should NOT be added directly to this Map. Instead, add them as Plexus components."); - - T prev = customAdditions.put(key, value); - if (prev == null) { - prev = getComponentMap().get(key); - } - - return prev; - } - - public synchronized void putAll(Map map) { - logger.warn("Custom " - + role - + " implementations should NOT be added directly to this Map. Instead, add them as Plexus components."); - - customAdditions.putAll(map); - } - - public Set keySet() { - return getMap().keySet(); - } - - public Collection values() { - return getMap().values(); - } - - public Set> entrySet() { - return getMap().entrySet(); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof Map)) { - return false; - } - - Map object = (Map) o; - return getMap().equals(object); - } - - public int hashCode() { - return getMap().hashCode(); - } - - public synchronized T remove(Object key) { - logger.warn( - "Items in this Map should NOT be removed directly. If the matching entry is a component, it will NOT be removed."); - - if (key instanceof String) { - if (customAdditions.containsKey(key)) { - return customAdditions.remove(key); - } - } - - return null; - } - - private synchronized Map getMap() { - Map result = getComponentMap(); - - if (!customAdditions.isEmpty()) { - result.putAll(customAdditions); - } - - return result; - } - - private synchronized Map getComponentMap() { - if ((components == null) || checkUpdate()) { - Map componentMap = new LinkedHashMap(); - - Map> descriptorMap = getComponentDescriptorMap(); - - if (roleHints != null) { - // we must follow the order given in roleHints - for (String roleHint : roleHints) { - ComponentDescriptor componentDescriptor = descriptorMap.get(roleHint); - - T component = lookup(componentDescriptor); - - if (component != null) { - componentMap.put(roleHint, component); - } - } - } else { - for (Entry> entry : descriptorMap.entrySet()) { - String roleHint = entry.getKey(); - - ComponentDescriptor componentDescriptor = entry.getValue(); - - T component = lookup(componentDescriptor); - - if (component != null) { - componentMap.put(roleHint, component); - } - } - } - components = componentMap; - } - - return components; - } - - @Override - protected boolean checkUpdate() { - if (super.checkUpdate()) { - components = null; - - return true; - } - - return false; - } - - protected void releaseAllCallback() { - if (components != null) { - try { - container.releaseAll(components); - } catch (ComponentLifecycleException e) { - logger.debug("Error releasing components in active collection: " + e.getMessage(), e); - } - - components = null; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CompositionResolver.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CompositionResolver.java deleted file mode 100644 index bea3da55f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CompositionResolver.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * @author Jason van Zyl - * @author Michal Maczka - */ -public interface CompositionResolver { - public static final char SEPARATOR_CHAR = ':'; - - /** - * @param componentDescriptor {@link ComponentDescriptor}. - * @throws CycleDetectedInComponentGraphException when cycle is detected - */ - void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException; - - /** - * Returns the list of names of components which are required - * by the component of given role and roleHint. - * The names returned are in the form role:hint, where : is defined in SEPARATOR_CHAR. - * - * @param role The name of the component - * @param roleHint The implementation hint of the component - * @return The list of components which are required by given component - */ - List getRequirements(String role, String roleHint); - - /** - * Returns the list of names of components which are using the component. - * of given role and roleHint. - * The names returned are in the form role:hint, where : is defined in SEPARATOR_CHAR. - * - * @param role The name of the component - * @param roleHint The implementation hint of the component - * @return The list of components which are requiring given component - */ - List findRequirements(String role, String roleHint); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CycleDetectedInComponentGraphException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CycleDetectedInComponentGraphException.java deleted file mode 100644 index f2398fdc7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/CycleDetectedInComponentGraphException.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Thrown when component composition goes awry. - * - * @author Jason van Zyl - * @author Michal Maczka - */ -public class CycleDetectedInComponentGraphException extends Exception { - private static final long serialVersionUID = -5587124702588800322L; - - /** - * Construct a new CompositionException instance. - * - * @param message The detail message for this exception. - */ - public CycleDetectedInComponentGraphException(String message) { - super(message); - } - - /** - * Construct a new CompositionException instance. - * - * @param message The detail message for this exception. - * @param throwable the root cause of the exception - */ - public CycleDetectedInComponentGraphException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/DefaultCompositionResolver.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/DefaultCompositionResolver.java deleted file mode 100644 index 9ed986ebd..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/DefaultCompositionResolver.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.component.repository.ComponentRequirementList; -import org.codehaus.plexus.util.StringUtils; -import org.codehaus.plexus.util.dag.CycleDetectedException; -import org.codehaus.plexus.util.dag.DAG; - -/** - * @author Jason van Zyl - * @author Michal Maczka - */ -public class DefaultCompositionResolver implements CompositionResolver { - private DAG dag = new DAG(); - - public void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException { - String key = getDAGKey(componentDescriptor.getRole(), componentDescriptor.getRoleHint()); - - List requirements = componentDescriptor.getRequirements(); - - for (ComponentRequirement requirement : requirements) { - try { - if (requirement instanceof ComponentRequirementList) { - for (String hint : ((ComponentRequirementList) requirement).getRoleHints()) { - dag.addEdge(key, getDAGKey(requirement.getRole(), hint)); - } - } else { - dag.addEdge(key, getDAGKey(requirement.getRole(), requirement.getRoleHint())); - } - } catch (CycleDetectedException e) { - throw new CycleDetectedInComponentGraphException("Cyclic requirement detected", e); - } - } - } - - /** - * @see org.codehaus.plexus.component.composition.CompositionResolver#getRequirements(String,String) - */ - public List getRequirements(String role, String roleHint) { - return dag.getChildLabels(getDAGKey(role, roleHint)); - } - - /** - * @see org.codehaus.plexus.component.composition.CompositionResolver#findRequirements(String,String) - */ - public List findRequirements(String role, String roleHint) { - return dag.getParentLabels(getDAGKey(role, roleHint)); - } - - private String getDAGKey(String role, String roleHint) { - return role - + SEPARATOR_CHAR - + (StringUtils.isNotEmpty(roleHint) ? roleHint : PlexusConstants.PLEXUS_DEFAULT_HINT); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/UndefinedComponentComposerException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/UndefinedComponentComposerException.java deleted file mode 100644 index bfd22a553..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/composition/UndefinedComponentComposerException.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Michal Maczka - */ -public class UndefinedComponentComposerException extends Exception { - public UndefinedComponentComposerException(String message) { - super(message); - } - - public UndefinedComponentComposerException(String message, Throwable cause) { - super(message, cause); - } - - public UndefinedComponentComposerException(Throwable cause) { - super(cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/AbstractComponentConfigurator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/AbstractComponentConfigurator.java deleted file mode 100644 index 320747827..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/AbstractComponentConfigurator.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.codehaus.classworlds.ClassRealmAdapter; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup; -import org.codehaus.plexus.component.configurator.expression.DefaultExpressionEvaluator; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Brett Porter - */ -public abstract class AbstractComponentConfigurator implements ComponentConfigurator { - /** - * This is being instantiated here because there are old component factories (beanshell) that directly access - * the converterLookup but do not yet state the ConverterLookup as a requirement in the component metadata. - * Once these are wired up as standard components properly then we won't have to instantiate the - * converter lookup here and we can let the container do it. - * - */ - protected ConverterLookup converterLookup = new DefaultConverterLookup(); - - public void configureComponent(Object component, PlexusConfiguration configuration, ClassRealm containerRealm) - throws ComponentConfigurationException { - configureComponent(component, configuration, new DefaultExpressionEvaluator(), containerRealm); - } - - public void configureComponent( - Object component, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ClassRealm containerRealm) - throws ComponentConfigurationException { - configureComponent(component, configuration, expressionEvaluator, containerRealm, null); - } - - public void configureComponent( - final Object component, - final PlexusConfiguration configuration, - final ExpressionEvaluator expressionEvaluator, - final ClassRealm containerRealm, - final ConfigurationListener listener) - throws ComponentConfigurationException { - // ---------------------------------------------------------------------------- - // For compatibility with old ComponentFactories that use old ClassWorlds - // ---------------------------------------------------------------------------- - - final org.codehaus.classworlds.ClassRealm cr = ClassRealmAdapter.getInstance(containerRealm); - - Method method; - - try { - try { - method = getClass() - .getMethod( - "configureComponent", - Object.class, - PlexusConfiguration.class, - ExpressionEvaluator.class, - org.codehaus.classworlds.ClassRealm.class, - ConfigurationListener.class); - method.invoke(this, component, configuration, expressionEvaluator, cr, listener); - } catch (final NoSuchMethodException e) { - method = getClass() - .getMethod( - "configureComponent", - Object.class, - PlexusConfiguration.class, - ExpressionEvaluator.class, - org.codehaus.classworlds.ClassRealm.class); - method.invoke(this, component, configuration, expressionEvaluator, cr); - } - } catch (final InvocationTargetException e) { - if (e.getCause() instanceof ComponentConfigurationException) { - throw (ComponentConfigurationException) e.getCause(); - } else if (e.getCause() instanceof RuntimeException) { - throw (RuntimeException) e.getCause(); - } else if (e.getCause() instanceof Error) { - throw (Error) e.getCause(); - } - throw new ComponentConfigurationException( - "Incompatible configurator " + getClass().getName(), e); - } catch (final Exception e) { - throw new ComponentConfigurationException( - "Incompatible configurator " + getClass().getName(), e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/BasicComponentConfigurator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/BasicComponentConfigurator.java deleted file mode 100644 index 671d4311a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/BasicComponentConfigurator.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter; -import org.codehaus.plexus.component.configurator.converters.special.ClassRealmConverter; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - * @author Michal Maczka - */ -public class BasicComponentConfigurator extends AbstractComponentConfigurator { - public void configureComponent( - Object component, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ClassRealm containerRealm, - ConfigurationListener listener) - throws ComponentConfigurationException { - // ---------------------------------------------------------------------- - // We should probably take into consideration the realm that the component - // came from in order to load the correct classes. - // ---------------------------------------------------------------------- - - converterLookup.registerConverter(new ClassRealmConverter(containerRealm)); - - ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); - - converter.processConfiguration( - converterLookup, component, containerRealm, configuration, expressionEvaluator, listener); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurationException.java deleted file mode 100644 index 3c5331f10..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurationException.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ComponentConfigurationException extends Exception { - private PlexusConfiguration failedConfiguration; - - public ComponentConfigurationException(String message) { - super(message); - } - - public ComponentConfigurationException(String message, Throwable cause) { - super(message, cause); - } - - public ComponentConfigurationException(Throwable cause) { - super(cause); - } - - public ComponentConfigurationException(PlexusConfiguration failedConfiguration, String message) { - super(message); - this.failedConfiguration = failedConfiguration; - } - - public ComponentConfigurationException(PlexusConfiguration failedConfiguration, String message, Throwable cause) { - super(message, cause); - this.failedConfiguration = failedConfiguration; - } - - public ComponentConfigurationException(PlexusConfiguration failedConfiguration, Throwable cause) { - super(cause); - this.failedConfiguration = failedConfiguration; - } - - public void setFailedConfiguration(PlexusConfiguration failedConfiguration) { - this.failedConfiguration = failedConfiguration; - } - - public PlexusConfiguration getFailedConfiguration() { - return failedConfiguration; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java deleted file mode 100644 index 9e53e9de7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ComponentConfigurator.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - */ -public interface ComponentConfigurator { - String ROLE = ComponentConfigurator.class.getName(); - - void configureComponent(Object component, PlexusConfiguration configuration, ClassRealm containerRealm) - throws ComponentConfigurationException; - - void configureComponent( - Object component, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ClassRealm containerRealm) - throws ComponentConfigurationException; - - void configureComponent( - Object component, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ClassRealm containerRealm, - ConfigurationListener listener) - throws ComponentConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ConfigurationListener.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ConfigurationListener.java deleted file mode 100644 index 3a881122b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/ConfigurationListener.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004-5, The Codehaus - * - * 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. - */ - -/** - * Listen for configuration changes on an object. - * - * @author Brett Porter - */ -public interface ConfigurationListener { - /** - * Notify the listener that a field has been set using its setter. - * @param fieldName the field - * @param value the value set - * @param target the target object - */ - void notifyFieldChangeUsingSetter(String fieldName, Object value, Object target); - - /** - * Notify the listener that a field has been set using private field injection. - * @param fieldName the field - * @param value the value set - * @param target the target object - */ - void notifyFieldChangeUsingReflection(String fieldName, Object value, Object target); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/MapOrientedComponentConfigurator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/MapOrientedComponentConfigurator.java deleted file mode 100644 index 547c3814f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/MapOrientedComponentConfigurator.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -import java.util.Map; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.MapOrientedComponent; -import org.codehaus.plexus.component.configurator.converters.composite.MapConverter; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/* - * Copyright 2001-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class MapOrientedComponentConfigurator extends AbstractComponentConfigurator { - - public void configureComponent( - Object component, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ClassRealm containerRealm, - ConfigurationListener listener) - throws ComponentConfigurationException { - if (!(component instanceof MapOrientedComponent)) { - throw new ComponentConfigurationException( - "This configurator can only process implementations of " + MapOrientedComponent.class.getName()); - } - - MapConverter converter = new MapConverter(); - - Map context = (Map) converter.fromConfiguration( - converterLookup, configuration, null, null, containerRealm, expressionEvaluator, listener); - - ((MapOrientedComponent) component).setComponentConfiguration(context); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/AbstractConfigurationConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/AbstractConfigurationConverter.java deleted file mode 100644 index 380bbb4d7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/AbstractConfigurationConverter.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Michal Maczka - */ -public abstract class AbstractConfigurationConverter implements ConfigurationConverter { - private static final String IMPLEMENTATION = "implementation"; - - /** - * We will check if user has provided a hint which class should be used for given field. - * So we will check if something like {@code } is present in configuraion. - * If 'implementation' hint was provided we will try to load correspoding class - * If we are unable to do so error will be reported - * @param type {@link Class}. - * @param configuration {@link PlexusConfiguration}. - * @param classLoader {@link ClassLoader}. - * @return The class. - * @throws ComponentConfigurationException in case of an error. - */ - protected Class getClassForImplementationHint( - Class type, PlexusConfiguration configuration, ClassLoader classLoader) - throws ComponentConfigurationException { - Class retValue = type; - - String implementation = configuration.getAttribute(IMPLEMENTATION, null); - - if (implementation != null) { - try { - retValue = classLoader.loadClass(implementation); - - } catch (ClassNotFoundException e) { - String msg = "ClassNotFoundException: Class name which was explicitly given in configuration using" - + " 'implementation' attribute: '" + implementation + "' cannot be loaded"; - - throw new ComponentConfigurationException(msg, e); - } catch (UnsupportedClassVersionError e) { - String msg = "UnsupportedClassVersionError: Class name which was explicitly given in configuration" - + " using 'implementation' attribute: '" + implementation + "' cannot be loaded"; - - throw new ComponentConfigurationException(msg, e); - } catch (LinkageError e) { - String msg = "LinkageError: Class name which was explicitly given in configuration using" - + " 'implementation' attribute: '" + implementation + "' cannot be loaded"; - - throw new ComponentConfigurationException(msg, e); - } - } - - return retValue; - } - - protected Class loadClass(String classname, ClassLoader classLoader) throws ComponentConfigurationException { - Class retValue; - - try { - retValue = classLoader.loadClass(classname); - } catch (ClassNotFoundException e) { - throw new ComponentConfigurationException("Error loading class '" + classname + "'", e); - } - - return retValue; - } - - protected Object instantiateObject(String classname, ClassLoader classLoader) - throws ComponentConfigurationException { - Class clazz = loadClass(classname, classLoader); - - return instantiateObject(clazz); - } - - protected Object instantiateObject(Class clazz) throws ComponentConfigurationException { - Object retValue; - - try { - retValue = clazz.newInstance(); - - return retValue; - } catch (IllegalAccessException e) { - throw new ComponentConfigurationException("Class '" + clazz.getName() + "' cannot be instantiated", e); - } catch (InstantiationException e) { - throw new ComponentConfigurationException("Class '" + clazz.getName() + "' cannot be instantiated", e); - } - } - - // first-name --> firstName - protected String fromXML(String elementName) { - return StringUtils.lowercaseFirstLetter(StringUtils.removeAndHump(elementName, "-")); - } - - // firstName --> first-name - protected String toXML(String fieldName) { - return StringUtils.addAndDeHump(fieldName); - } - - protected Object fromExpression( - PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, Class type) - throws ComponentConfigurationException { - Object v = fromExpression(configuration, expressionEvaluator); - - if (v != null) { - if (!type.isAssignableFrom(v.getClass())) { - String msg = "Cannot assign configuration entry '" + configuration.getName() + "' to '" + type - + "' from '" + configuration.getValue(null) + "', which is of type " + v.getClass(); - throw new ComponentConfigurationException(configuration, msg); - } - } - return v; - } - - protected Object fromExpression(PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator) - throws ComponentConfigurationException { - Object v = null; - String value = configuration.getValue(null); - if (value != null && value.length() > 0) { - // Object is provided by an expression - // This seems a bit ugly... canConvert really should return false in this instance, but it doesn't have the - // configuration to know better - try { - v = expressionEvaluator.evaluate(value); - } catch (ExpressionEvaluationException e) { - String msg = "Error evaluating the expression '" + value + "' for configuration value '" - + configuration.getName() + "'"; - throw new ComponentConfigurationException(configuration, msg, e); - } - } - if (v == null) { - value = configuration.getAttribute("default-value", null); - if (value != null && value.length() > 0) { - try { - v = expressionEvaluator.evaluate(value); - } catch (ExpressionEvaluationException e) { - String msg = "Error evaluating the expression '" + value + "' for configuration value '" - + configuration.getName() + "'"; - throw new ComponentConfigurationException(configuration, msg, e); - } - } - } - return v; - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator) - throws ComponentConfigurationException { - return fromConfiguration( - converterLookup, configuration, type, baseType, classLoader, expressionEvaluator, null); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ComponentValueSetter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ComponentValueSetter.java deleted file mode 100644 index f448f0e80..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ComponentValueSetter.java +++ /dev/null @@ -1,219 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters; - -/* - * Copyright 2005-2007 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.util.ReflectionUtils; - -/** @author Kenney Westerhof */ -public class ComponentValueSetter { - private Object object; - - private String fieldName; - - private ConverterLookup lookup; - - private Method setter; - - private Class setterParamType; - - private ConfigurationConverter setterTypeConverter; - - private Field field; - - private Class fieldType; - - private ConfigurationConverter fieldTypeConverter; - - private ConfigurationListener listener; - - public ComponentValueSetter(String fieldName, Object object, ConverterLookup lookup) - throws ComponentConfigurationException { - this(fieldName, object, lookup, null); - } - - public ComponentValueSetter(String fieldName, Object object, ConverterLookup lookup, ConfigurationListener listener) - throws ComponentConfigurationException { - this.fieldName = fieldName; - this.object = object; - this.lookup = lookup; - this.listener = listener; - - if (object == null) { - throw new ComponentConfigurationException("Component is null"); - } - - initSetter(); - - initField(); - - if (setter == null && field == null) { - throw new ComponentConfigurationException( - "Cannot find setter nor field in " + object.getClass().getName() + " for '" + fieldName + "'"); - } - - if (setterTypeConverter == null && fieldTypeConverter == null) { - throw new ComponentConfigurationException("Cannot find converter for " + setterParamType.getName() - + (fieldType != null && !fieldType.equals(setterParamType) ? " or " + fieldType.getName() : "")); - } - } - - private void initSetter() { - setter = ReflectionUtils.getSetter(fieldName, object.getClass()); - - if (setter == null) { - return; - } - - setterParamType = setter.getParameterTypes()[0]; - - try { - setterTypeConverter = lookup.lookupConverterForType(setterParamType); - } catch (ComponentConfigurationException e) { - // ignore, handle later - } - } - - private void initField() { - field = ReflectionUtils.getFieldByNameIncludingSuperclasses(fieldName, object.getClass()); - - if (field == null) { - return; - } - - fieldType = field.getType(); - - try { - fieldTypeConverter = lookup.lookupConverterForType(fieldType); - } catch (ComponentConfigurationException e) { - // ignore, handle later - } - } - - private void setValueUsingField(Object value) throws ComponentConfigurationException { - try { - boolean wasAccessible = field.isAccessible(); - - if (!wasAccessible) { - field.setAccessible(true); - } - - if (listener != null) { - listener.notifyFieldChangeUsingReflection(fieldName, value, object); - } - - field.set(object, value); - - if (!wasAccessible) { - field.setAccessible(false); - } - } catch (IllegalAccessException e) { - throw new ComponentConfigurationException("Cannot access field: " + field, e); - } catch (IllegalArgumentException e) { - throw new ComponentConfigurationException( - "Cannot assign value '" + value + "' (type: " + value.getClass() + ") to " + field, e); - } - } - - private void setValueUsingSetter(Object value) throws ComponentConfigurationException { - if (setterParamType == null || setter == null) { - throw new ComponentConfigurationException("No setter found"); - } - - String exceptionInfo = object.getClass().getName() + "." + setter.getName() + "( " - + setterParamType.getClass().getName() + " )"; - - if (listener != null) { - listener.notifyFieldChangeUsingSetter(fieldName, value, object); - } - - try { - setter.invoke(object, new Object[] {value}); - } catch (IllegalAccessException e) { - throw new ComponentConfigurationException("Cannot access method: " + exceptionInfo, e); - } catch (IllegalArgumentException e) { - throw new ComponentConfigurationException( - "Invalid parameter supplied while setting '" + value + "' to " + exceptionInfo, e); - } catch (InvocationTargetException e) { - throw new ComponentConfigurationException( - "Setter " + exceptionInfo + " threw exception when called with parameter '" + value + "': " - + e.getTargetException().getMessage(), - e); - } - } - - public void configure(PlexusConfiguration config, ClassLoader classLoader, ExpressionEvaluator evaluator) - throws ComponentConfigurationException { - Object value = null; - - // try setter converter + method first - - if (setterTypeConverter != null) { - try { - value = setterTypeConverter.fromConfiguration( - lookup, config, setterParamType, object.getClass(), classLoader, evaluator, listener); - - if (value != null) { - setValueUsingSetter(value); - - return; - } - } catch (ComponentConfigurationException e) { - if (fieldTypeConverter == null - || fieldTypeConverter.getClass().equals(setterTypeConverter.getClass())) { - throw e; - } - } - } - - // try setting field using value found with method - // converter, if present. - - ComponentConfigurationException savedEx = null; - - if (value != null) { - try { - setValueUsingField(value); - return; - } catch (ComponentConfigurationException e) { - savedEx = e; - } - } - - // either no value or setting went wrong. Try - // new converter. - - value = fieldTypeConverter.fromConfiguration( - lookup, config, fieldType, object.getClass(), classLoader, evaluator, listener); - - if (value != null) { - setValueUsingField(value); - } - // FIXME: need this? - else if (savedEx != null) { - throw savedEx; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ConfigurationConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ConfigurationConverter.java deleted file mode 100644 index d161d026c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/ConfigurationConverter.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public interface ConfigurationConverter { - boolean canConvert(Class type); - - /** - * @param converterLookup Repository of available converters - * @param configuration {@link PlexusConfiguration} - * @param type the type of object to read - * @param baseType the type of object the the source is - * @param classLoader ClassLoader which should be used for loading classes - * @param expressionEvaluator the expression evaluator to use for expressions - * @return the object - * @throws ComponentConfigurationException in case of an error. - * TODO: a better way, instead of baseType, would be to pass in a factory for new classes that could be based from the given package - */ - Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator) - throws ComponentConfigurationException; - - /** - * @param converterLookup Repository of available converters - * @param configuration {@link PlexusConfiguration} - * @param type the type of object to read - * @param baseType the type of object the the source is - * @param classLoader ClassLoader which should be used for loading classes - * @param expressionEvaluator the expression evaluator to use for expressions - * @param listener {@link ConfigurationListener}. - * @return the object - * @throws ComponentConfigurationException in case of an error. - * TODO: a better way, instead of baseType, would be to pass in a factory for new classes that could be based from the given package - */ - Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/AbstractBasicConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/AbstractBasicConverter.java deleted file mode 100644 index 1bd7bcbe8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/AbstractBasicConverter.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.component.configurator.expression.TypeAwareExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - */ -public abstract class AbstractBasicConverter extends AbstractConfigurationConverter { - protected abstract Object fromString(String str) throws ComponentConfigurationException; - - protected Object fromExpression( - PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator, Class type) - throws ComponentConfigurationException { - Object v = null; - - String value = configuration.getValue(null); - - if (value != null && value.length() > 0) { - // Object is provided by an expression - // This seems a bit ugly... canConvert really should return false in this instance, but it doesn't have the - // configuration to know better - try { - if (expressionEvaluator instanceof TypeAwareExpressionEvaluator) { - v = ((TypeAwareExpressionEvaluator) expressionEvaluator).evaluate(value, type); - } else { - v = expressionEvaluator.evaluate(value); - } - } catch (ExpressionEvaluationException e) { - String msg = "Error evaluating the expression '" + value + "' for configuration value '" - + configuration.getName() + "'"; - throw new ComponentConfigurationException(configuration, msg, e); - } - } - - if (v == null) { - value = configuration.getAttribute("default-value", null); - - if (value != null && value.length() > 0) { - try { - if (expressionEvaluator instanceof TypeAwareExpressionEvaluator) { - v = ((TypeAwareExpressionEvaluator) expressionEvaluator).evaluate(value, type); - } else { - v = expressionEvaluator.evaluate(value); - } - } catch (ExpressionEvaluationException e) { - String msg = "Error evaluating the expression '" + value + "' for configuration value '" - + configuration.getName() + "'"; - throw new ComponentConfigurationException(configuration, msg, e); - } - } - } - - /* - * NOTE: We don't check the type here which would be ugly to do correctly (e.g. value=Short -> type=int), the - * reflective setter/field injection will fail by itself when the type didn't match. - */ - - return v; - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - if (configuration.getChildCount() > 0) { - throw new ComponentConfigurationException("When configuring a basic element the configuration cannot " - + "contain any child elements. " + "Configuration element '" + configuration.getName() + "'."); - } - - Object retValue = fromExpression(configuration, expressionEvaluator, type); - - if (retValue instanceof String) { - try { - retValue = fromString((String) retValue); - } catch (ComponentConfigurationException e) { - if (e.getFailedConfiguration() == null) { - e.setFailedConfiguration(configuration); - } - - throw e; - } - } - - return retValue; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/BooleanConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/BooleanConverter.java deleted file mode 100644 index 7ac6aeb38..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/BooleanConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class BooleanConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(boolean.class) || type.equals(Boolean.class); - } - - public Object fromString(String str) { - return str.equals("true") ? Boolean.TRUE : Boolean.FALSE; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ByteConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ByteConverter.java deleted file mode 100644 index da0fd57cc..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ByteConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class ByteConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(byte.class) || type.equals(Byte.class); - } - - public Object fromString(String str) { - return (byte) Integer.parseInt(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/CharConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/CharConverter.java deleted file mode 100644 index 4d0af27c9..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/CharConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class CharConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(char.class) || type.equals(Character.class); - } - - public Object fromString(String str) { - return str.charAt(0); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ClassConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ClassConverter.java deleted file mode 100644 index 77ae3b1ef..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ClassConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; - -/** - * @author Brett Porter - */ -public class ClassConverter extends AbstractBasicConverter { - public boolean canConvert(Class type) { - return type.equals(Class.class); - } - - public Object fromString(String str) throws ComponentConfigurationException { - try { - return Class.forName(str); - } catch (ClassNotFoundException e) { - throw new ComponentConfigurationException("Unable to find class in conversion", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/Converter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/Converter.java deleted file mode 100644 index b5e61c328..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/Converter.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * Translates the String representation of a class into - * an instance of the class and vice versa - * - */ -public interface Converter { - boolean canConvert(Class type); - - /** - * Parses a given String and return - * - * @param str String representation of the class - * @return an instance of the class - */ - Object fromString(String str); - - String toString(Object obj); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DateConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DateConverter.java deleted file mode 100644 index 710b39da6..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DateConverter.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class DateConverter extends AbstractBasicConverter { - /*** - * @todo DateFormat is not thread safe! - */ - private static final DateFormat[] formats = { - new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S a"), new SimpleDateFormat("yyyy-MM-dd HH:mm:ssa") - }; - - public boolean canConvert(Class type) { - return type.equals(Date.class); - } - - public Object fromString(String str) { - for (DateFormat format : formats) { - try { - return format.parse(str); - } catch (ParseException e) { - // no worries, let's try the next format. - } - } - - return null; - } - - public String toString(Object obj) { - Date date = (Date) obj; - return formats[0].format(date); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DoubleConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DoubleConverter.java deleted file mode 100644 index 9037251e7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DoubleConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class DoubleConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(double.class) || type.equals(Double.class); - } - - public Object fromString(String str) { - return Double.valueOf(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/EnumConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/EnumConverter.java deleted file mode 100644 index b4d62381a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/EnumConverter.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Benjamin Bentmann - */ -public class EnumConverter extends AbstractConfigurationConverter { - - public boolean canConvert(Class type) { - return type.isEnum(); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - if (configuration.getChildCount() > 0) { - throw new ComponentConfigurationException("When configuring a basic element the configuration cannot " - + "contain any child elements. " + "Configuration element '" + configuration.getName() + "'."); - } - - Object retValue = fromExpression(configuration, expressionEvaluator); - - if (retValue instanceof String) { - try { - retValue = Enum.valueOf(type, (String) retValue); - } catch (RuntimeException e) { - throw new ComponentConfigurationException( - "Cannot assign value " + retValue + " to property " + configuration.getName() + " of " - + baseType.getName() + ": " + e.getMessage(), - e); - } - } - - return retValue; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FileConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FileConverter.java deleted file mode 100644 index 69ebb4ddb..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FileConverter.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.io.File; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Brett Porter - */ -public class FileConverter extends AbstractBasicConverter { - public boolean canConvert(Class type) { - return type.equals(File.class); - } - - public Object fromString(String str) { - str = str.replace('\\', File.separatorChar).replace('/', File.separatorChar); - return new File(str); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - File f = (File) super.fromConfiguration( - converterLookup, configuration, type, baseType, classLoader, expressionEvaluator, listener); - - if (f != null) { - // Hmmm... is this cheating? Can't think of a better way right now - return expressionEvaluator.alignToBaseDirectory(f); - } else { - return null; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FloatConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FloatConverter.java deleted file mode 100644 index 38db43779..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FloatConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class FloatConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(float.class) || type.equals(Float.class); - } - - public Object fromString(String str) { - return Float.valueOf(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/IntConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/IntConverter.java deleted file mode 100644 index 19f422846..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/IntConverter.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class IntConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(int.class) || type.equals(Integer.class); - } - - public Object fromString(String str) throws ComponentConfigurationException { - try { - return Integer.valueOf(str); - } catch (NumberFormatException e) { - throw new ComponentConfigurationException("Not a number: '" + str + "'", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/LongConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/LongConverter.java deleted file mode 100644 index c549bc417..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/LongConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class LongConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(long.class) || type.equals(Long.class); - } - - public Object fromString(String str) { - return Long.valueOf(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ShortConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ShortConverter.java deleted file mode 100644 index 6fba68c08..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ShortConverter.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class ShortConverter extends AbstractBasicConverter { - - public boolean canConvert(Class type) { - return type.equals(short.class) || type.equals(Short.class); - } - - public Object fromString(String str) { - return Short.valueOf(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBufferConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBufferConverter.java deleted file mode 100644 index 2a42198b5..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBufferConverter.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class StringBufferConverter extends AbstractBasicConverter { - public boolean canConvert(Class type) { - return type.equals(StringBuffer.class); - } - - public Object fromString(String str) { - return new StringBuffer(str); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringConverter.java deleted file mode 100644 index 0a72a9834..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringConverter.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class StringConverter extends AbstractBasicConverter { - public boolean canConvert(Class type) { - return type.equals(String.class); - } - - public Object fromString(String str) { - return str; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UriConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UriConverter.java deleted file mode 100644 index 39b84143f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UriConverter.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2007 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.codehaus.plexus.component.configurator.converters.basic; - -import java.net.URI; -import java.net.URISyntaxException; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; - -/** - * Converter for {@link URI} objects. - * - */ -public class UriConverter extends AbstractBasicConverter { - public boolean canConvert(final Class type) { - assert type != null; - - return type.equals(URI.class); - } - - public Object fromString(final String str) throws ComponentConfigurationException { - assert str != null; - - try { - return new URI(str); - } catch (URISyntaxException e) { - throw new ComponentConfigurationException("Unable to convert to URI: " + str, e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UrlConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UrlConverter.java deleted file mode 100644 index 05ef952c8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UrlConverter.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.basic; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.net.MalformedURLException; -import java.net.URL; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; - -/** - * @author Brett Porter - */ -public class UrlConverter extends AbstractBasicConverter { - public boolean canConvert(Class type) { - return type.equals(URL.class); - } - - public Object fromString(String str) throws ComponentConfigurationException { - try { - return new URL(str); - } catch (MalformedURLException e) { - throw new ComponentConfigurationException("Unable to convert '" + str + "' to an URL", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ArrayConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ArrayConverter.java deleted file mode 100644 index aded3b09c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ArrayConverter.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Kenney Westerhof - */ -public class ArrayConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - return type.isArray(); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - Object retValue = fromExpression(configuration, expressionEvaluator, type); - if (retValue != null) { - return retValue; - } - - List values = new ArrayList(); - - for (int i = 0; i < configuration.getChildCount(); i++) { - PlexusConfiguration childConfiguration = configuration.getChild(i); - - String configEntry = childConfiguration.getName(); - - String name = fromXML(configEntry); - - Class childType = getClassForImplementationHint(null, childConfiguration, classLoader); - - // check if the name is a fully qualified classname - - if (childType == null && name.indexOf('.') > 0) { - try { - childType = classLoader.loadClass(name); - } catch (ClassNotFoundException e) { - // doesn't exist - continue processing - } - } - - if (childType == null) { - // try to find the class in the package of the baseType - // (which is the component being configured) - - String baseTypeName = baseType.getName(); - - int lastDot = baseTypeName.lastIndexOf('.'); - - String className; - - if (lastDot == -1) { - className = name; - } else { - String basePackage = baseTypeName.substring(0, lastDot); - className = basePackage + "." + StringUtils.capitalizeFirstLetter(name); - } - - try { - childType = classLoader.loadClass(className); - } catch (ClassNotFoundException e) { - // doesn't exist, continue processing - } - } - - // finally just try the component type of the array - - if (childType == null) { - childType = type.getComponentType(); - } - - ConfigurationConverter converter = converterLookup.lookupConverterForType(childType); - - Object object = converter.fromConfiguration( - converterLookup, - childConfiguration, - childType, - baseType, - classLoader, - expressionEvaluator, - listener); - - values.add(object); - } - - try { - return values.toArray((Object[]) Array.newInstance(type.getComponentType(), 0)); - } catch (ArrayStoreException e) { - throw new ComponentConfigurationException("Cannot assign configuration values to array of type " - + type.getComponentType().getName() + ": " + values); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/CollectionConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/CollectionConverter.java deleted file mode 100644 index 46a6bc003..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/CollectionConverter.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.lang.reflect.Modifier; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Michal Maczka - */ -public class CollectionConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - return Collection.class.isAssignableFrom(type) && !Map.class.isAssignableFrom(type); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - Object retValue = fromExpression(configuration, expressionEvaluator, type); - if (retValue != null) { - return retValue; - } - - Class implementation = getClassForImplementationHint(null, configuration, classLoader); - - if (implementation != null) { - retValue = instantiateObject(implementation); - } else { - // we can have 2 cases here: - // - provided collection class which is not abstract - // like Vector, ArrayList, HashSet - so we will just instantantiate it - // - we have an abtract class so we have to use default collection type - int modifiers = type.getModifiers(); - - if (Modifier.isAbstract(modifiers)) { - retValue = getDefaultCollection(type); - } else { - try { - retValue = type.newInstance(); - } catch (IllegalAccessException e) { - String msg = "An attempt to convert configuration entry " + configuration.getName() + "' into " - + type + " object failed: " + e.getMessage(); - - throw new ComponentConfigurationException(msg, e); - } catch (InstantiationException e) { - String msg = "An attempt to convert configuration entry " + configuration.getName() + "' into " - + type + " object failed: " + e.getMessage(); - - throw new ComponentConfigurationException(msg, e); - } - } - } - // now we have collection and we have to add some objects to it - - for (int i = 0; i < configuration.getChildCount(); i++) { - PlexusConfiguration c = configuration.getChild(i); - // Object o = null; - - String configEntry = c.getName(); - - String name = fromXML(configEntry); - - Class childType = getClassForImplementationHint(null, c, classLoader); - - if (childType == null && name.indexOf('.') > 0) { - try { - childType = classLoader.loadClass(name); - } catch (ClassNotFoundException e) { - // not found, continue processing - } - } - - if (childType == null) { - // Some classloaders don't create Package objects for classes - // so we have to resort to slicing up the class name - - String baseTypeName = baseType.getName(); - - int lastDot = baseTypeName.lastIndexOf('.'); - - String className; - - if (lastDot == -1) { - className = name; - } else { - String basePackage = baseTypeName.substring(0, lastDot); - - className = basePackage + "." + StringUtils.capitalizeFirstLetter(name); - } - - try { - childType = classLoader.loadClass(className); - } catch (ClassNotFoundException e) { - if (c.getChildCount() == 0) { - // If no children, try a String. - // TODO: If we had generics we could try that instead - or could the component descriptor list - // an impl? - childType = String.class; - } else { - throw new ComponentConfigurationException("Error loading class '" + className + "'", e); - } - } - } - - ConfigurationConverter converter = converterLookup.lookupConverterForType(childType); - - Object object = converter.fromConfiguration( - converterLookup, c, childType, baseType, classLoader, expressionEvaluator, listener); - - Collection collection = (Collection) retValue; - collection.add(object); - } - - return retValue; - } - - protected Collection getDefaultCollection(Class collectionType) { - Collection retValue = null; - - if (List.class.isAssignableFrom(collectionType)) { - retValue = new ArrayList(); - } else if (SortedSet.class.isAssignableFrom(collectionType)) { - retValue = new TreeSet(); - } else if (Set.class.isAssignableFrom(collectionType)) { - retValue = new HashSet(); - } - - return retValue; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/MapConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/MapConverter.java deleted file mode 100644 index d5cebe3ed..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/MapConverter.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.Map; -import java.util.Properties; -import java.util.TreeMap; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * Converter for java.util.Properties. - * - * @author Michal Maczka - */ -public class MapConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - return Map.class.isAssignableFrom(type) && !Properties.class.isAssignableFrom(type); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - Object retValue; - - String expression = configuration.getValue(null); - - if (expression == null) { - expression = configuration.getAttribute("default-value", null); - } - - if (expression == null) { - Map map = new TreeMap(); - - PlexusConfiguration[] children = configuration.getChildren(); - - for (PlexusConfiguration child : children) { - String name = child.getName(); - - map.put(name, fromExpression(child, expressionEvaluator)); - } - retValue = map; - } else { - retValue = fromExpression(configuration, expressionEvaluator); - } - return retValue; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ObjectWithFieldsConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ObjectWithFieldsConverter.java deleted file mode 100644 index 5d4bb6964..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/ObjectWithFieldsConverter.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.Collection; -import java.util.Dictionary; -import java.util.Map; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.ComponentValueSetter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Michal Maczka - */ -public class ObjectWithFieldsConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - boolean retValue = true; - - if (Dictionary.class.isAssignableFrom(type)) { - retValue = false; - } else if (Map.class.isAssignableFrom(type)) { - retValue = false; - } else if (Collection.class.isAssignableFrom(type)) { - retValue = false; - } - - return retValue; - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - Object retValue = fromExpression(configuration, expressionEvaluator, type); - - if (retValue == null) { - try { - // it is a "composite" - we compose it from its children. It does not have a value of its own - Class implementation = getClassForImplementationHint(type, configuration, classLoader); - - if (type == implementation && type.isInterface() && configuration.getChildCount() <= 0) { - return null; - } - - retValue = instantiateObject(implementation); - - processConfiguration( - converterLookup, retValue, classLoader, configuration, expressionEvaluator, listener); - } catch (ComponentConfigurationException e) { - if (e.getFailedConfiguration() == null) { - e.setFailedConfiguration(configuration); - } - - throw e; - } - } - return retValue; - } - - public void processConfiguration( - ConverterLookup converterLookup, Object object, ClassLoader classLoader, PlexusConfiguration configuration) - throws ComponentConfigurationException { - processConfiguration(converterLookup, object, classLoader, configuration, null); - } - - public void processConfiguration( - ConverterLookup converterLookup, - Object object, - ClassLoader classLoader, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator) - throws ComponentConfigurationException { - processConfiguration(converterLookup, object, classLoader, configuration, expressionEvaluator, null); - } - - public void processConfiguration( - ConverterLookup converterLookup, - Object object, - ClassLoader classLoader, - PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - int items = configuration.getChildCount(); - - for (int i = 0; i < items; i++) { - PlexusConfiguration childConfiguration = configuration.getChild(i); - - String elementName = childConfiguration.getName(); - - ComponentValueSetter valueSetter = - new ComponentValueSetter(fromXML(elementName), object, converterLookup, listener); - - valueSetter.configure(childConfiguration, classLoader, expressionEvaluator); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PlexusConfigurationConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PlexusConfigurationConverter.java deleted file mode 100644 index d8723994f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PlexusConfigurationConverter.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * Converter for org.codehaus.plexus.configuration.PlexusConfiguration - * - * @author Michal Maczka - */ -public class PlexusConfigurationConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - return PlexusConfiguration.class.isAssignableFrom(type); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - return configuration; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PropertiesConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PropertiesConverter.java deleted file mode 100644 index b6a6463a1..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/composite/PropertiesConverter.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.composite; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.Properties; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * Converter for java.util.Properties. - * - * @author Michal Maczka - */ -public class PropertiesConverter extends AbstractConfigurationConverter { - public boolean canConvert(Class type) { - return Properties.class.isAssignableFrom(type); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - - Object retValueInterpolated = fromExpression(configuration, expressionEvaluator, type); - if (retValueInterpolated != null) { - return retValueInterpolated; - } - - String element = configuration.getName(); - - Properties retValue = new Properties(); - - PlexusConfiguration[] children = configuration.getChildren("property"); - - if (children != null && children.length > 0) { - for (PlexusConfiguration child : children) { - addEntry(retValue, element, child, expressionEvaluator); - } - } - - return retValue; - } - - private void addEntry( - Properties properties, - String element, - PlexusConfiguration property, - ExpressionEvaluator expressionEvaluator) - throws ComponentConfigurationException { - Object name = fromExpression(property.getChild("name"), expressionEvaluator); - - if (name == null) { - String msg = "Trying to convert the configuration element: '" + element - + "', missing child element 'name' for property."; - - throw new ComponentConfigurationException(msg); - } - - Object value = fromExpression(property.getChild("value"), expressionEvaluator); - - if (value == null) { - properties.setProperty(name.toString(), ""); - } else { - properties.setProperty(name.toString(), value.toString()); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/ConverterLookup.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/ConverterLookup.java deleted file mode 100644 index 2696d75bc..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/ConverterLookup.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.lookup; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; - -/** @version $Id$ */ -public interface ConverterLookup { - void registerConverter(ConfigurationConverter converter); - - ConfigurationConverter lookupConverterForType(Class type) throws ComponentConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/DefaultConverterLookup.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/DefaultConverterLookup.java deleted file mode 100644 index e8afde898..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/DefaultConverterLookup.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.lookup; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.CopyOnWriteArrayList; - -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.basic.BooleanConverter; -import org.codehaus.plexus.component.configurator.converters.basic.ByteConverter; -import org.codehaus.plexus.component.configurator.converters.basic.CharConverter; -import org.codehaus.plexus.component.configurator.converters.basic.DateConverter; -import org.codehaus.plexus.component.configurator.converters.basic.DoubleConverter; -import org.codehaus.plexus.component.configurator.converters.basic.EnumConverter; -import org.codehaus.plexus.component.configurator.converters.basic.FileConverter; -import org.codehaus.plexus.component.configurator.converters.basic.FloatConverter; -import org.codehaus.plexus.component.configurator.converters.basic.IntConverter; -import org.codehaus.plexus.component.configurator.converters.basic.LongConverter; -import org.codehaus.plexus.component.configurator.converters.basic.ShortConverter; -import org.codehaus.plexus.component.configurator.converters.basic.StringBufferConverter; -import org.codehaus.plexus.component.configurator.converters.basic.StringConverter; -import org.codehaus.plexus.component.configurator.converters.basic.UriConverter; -import org.codehaus.plexus.component.configurator.converters.basic.UrlConverter; -import org.codehaus.plexus.component.configurator.converters.composite.ArrayConverter; -import org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter; -import org.codehaus.plexus.component.configurator.converters.composite.MapConverter; -import org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter; -import org.codehaus.plexus.component.configurator.converters.composite.PlexusConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.composite.PropertiesConverter; - -public class DefaultConverterLookup implements ConverterLookup { - private final List converters = new ArrayList(); - - private final List customConverters = new CopyOnWriteArrayList(); - - private final Map, ConfigurationConverter> converterMap = - new ConcurrentHashMap, ConfigurationConverter>(); - - public DefaultConverterLookup() { - registerDefaultBasicConverters(); - - registerDefaultCompositeConverters(); - } - - public synchronized void registerConverter(ConfigurationConverter converter) { - customConverters.add(converter); - } - - protected void registerDefaultConverter(ConfigurationConverter converter) { - converters.add(converter); - } - - public ConfigurationConverter lookupConverterForType(Class type) throws ComponentConfigurationException { - ConfigurationConverter retValue = converterMap.get(type); - - if (retValue == null) { - if (customConverters != null) { - retValue = findConverterForType(customConverters, type); - } - - if (retValue == null) { - retValue = findConverterForType(converters, type); - } - - if (retValue == null) { - // this is highly irregular - throw new ComponentConfigurationException("Configuration converter lookup failed for type: " + type); - } - - converterMap.put(type, retValue); - } - - return retValue; - } - - private ConfigurationConverter findConverterForType(List converters, Class type) { - for (ConfigurationConverter converter : converters) { - if (converter.canConvert(type)) { - return converter; - } - } - - return null; - } - - private void registerDefaultBasicConverters() { - registerDefaultConverter(new BooleanConverter()); - - registerDefaultConverter(new ByteConverter()); - - registerDefaultConverter(new CharConverter()); - - registerDefaultConverter(new DoubleConverter()); - - registerDefaultConverter(new FloatConverter()); - - registerDefaultConverter(new IntConverter()); - - registerDefaultConverter(new LongConverter()); - - registerDefaultConverter(new ShortConverter()); - - registerDefaultConverter(new StringBufferConverter()); - - registerDefaultConverter(new StringConverter()); - - registerDefaultConverter(new DateConverter()); - - registerDefaultConverter(new FileConverter()); - - registerDefaultConverter(new UrlConverter()); - - registerDefaultConverter(new UriConverter()); - - registerDefaultConverter(new EnumConverter()); - } - - private void registerDefaultCompositeConverters() { - registerDefaultConverter(new MapConverter()); - - registerDefaultConverter(new ArrayConverter()); - - registerDefaultConverter(new CollectionConverter()); - - registerDefaultConverter(new PropertiesConverter()); - - registerDefaultConverter(new PlexusConfigurationConverter()); - - // this converter should be always registred as the last one - registerDefaultConverter(new ObjectWithFieldsConverter()); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/special/ClassRealmConverter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/special/ClassRealmConverter.java deleted file mode 100644 index 9c2c2cdae..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/converters/special/ClassRealmConverter.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.component.configurator.converters.special; - -import org.codehaus.classworlds.ClassRealmAdapter; -import org.codehaus.classworlds.ClassRealmReverseAdapter; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ConfigurationListener; -import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; -import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * ConfigurationConverter to set up ClassRealm component fields. - * - * @author Kenney Westerhof - */ -public class ClassRealmConverter extends AbstractConfigurationConverter { - public static final String ROLE = ConfigurationConverter.class.getName(); - - private ClassRealm classRealm; - - /** - * Constructs this ClassRealmConverter with the given ClassRealm. - * If there's a way to automatically configure this component - * using the current classrealm, this method can go away. - * - * @param classRealm {@link ClassRealm}. - */ - public ClassRealmConverter(ClassRealm classRealm) { - setClassRealm(classRealm); - } - - @Deprecated - public ClassRealmConverter(final org.codehaus.classworlds.ClassRealm classRealm) { - setClassRealm(classRealm); - } - - public void setClassRealm(final ClassRealm classRealm) { - this.classRealm = classRealm; - } - - @Deprecated - public void setClassRealm(final org.codehaus.classworlds.ClassRealm classRealm) { - if (classRealm.getClassLoader() instanceof ClassRealm) { - setClassRealm((ClassRealm) classRealm.getClassLoader()); - } else { - setClassRealm(ClassRealmReverseAdapter.getInstance(classRealm)); - } - } - - public boolean canConvert(Class type) { - // backwards compatibility for old ClassWorld fields - return org.codehaus.classworlds.ClassRealm.class.isAssignableFrom(type) - || ClassRealm.class.isAssignableFrom(type); - } - - public Object fromConfiguration( - ConverterLookup converterLookup, - PlexusConfiguration configuration, - Class type, - Class baseType, - ClassLoader classLoader, - ExpressionEvaluator expressionEvaluator, - ConfigurationListener listener) - throws ComponentConfigurationException { - Object retValue = fromExpression(configuration, expressionEvaluator, type); - - if (retValue == null) { - retValue = classRealm; - } - - // backwards compatibility for old ClassWorld fields - if (retValue instanceof ClassRealm && org.codehaus.classworlds.ClassRealm.class.isAssignableFrom(type)) { - retValue = ClassRealmAdapter.getInstance((ClassRealm) retValue); - } - - return retValue; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/DefaultExpressionEvaluator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/DefaultExpressionEvaluator.java deleted file mode 100644 index f6fed31de..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/DefaultExpressionEvaluator.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.component.configurator.expression; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Evaluate an expression. - * - * @author Brett Porter - */ -public class DefaultExpressionEvaluator implements ExpressionEvaluator { - /** - * Evaluate an expression. - * - * @param expression the expression - * @return the value of the expression - */ - public Object evaluate(String expression) { - return expression; - } - - public File alignToBaseDirectory(File file) { - return file; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluationException.java deleted file mode 100644 index 78b7ca313..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluationException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.component.configurator.expression; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that occurs during the evaluation of an expression. - * - * @author Brett Porter - */ -public class ExpressionEvaluationException extends Exception { - public ExpressionEvaluationException(String message) { - super(message); - } - - public ExpressionEvaluationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluator.java deleted file mode 100644 index f14d96937..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluator.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.component.configurator.expression; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -/** - * Evaluate an expression. - * - * @author Brett Porter - */ -public interface ExpressionEvaluator { - String ROLE = ExpressionEvaluator.class.getName(); - - /** - * Evaluate an expression. - * - * @param expression the expression - * @return the value of the expression - * @throws ExpressionEvaluationException in case of an error. - */ - Object evaluate(String expression) throws ExpressionEvaluationException; - - /** - * Align a given path to the base directory that can be evaluated by this expression evaluator, if known. - * - * @param file the file - * @return the aligned file - */ - File alignToBaseDirectory(File file); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/TypeAwareExpressionEvaluator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/TypeAwareExpressionEvaluator.java deleted file mode 100644 index 871999c6a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/configurator/expression/TypeAwareExpressionEvaluator.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.component.configurator.expression; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Evaluate an expression. - * - * @author Brett Porter - */ -public interface TypeAwareExpressionEvaluator extends ExpressionEvaluator { - - /** - * Evaluate an expression. The optional type provided to this method is a hint (not a requirement) for the evaluator - * to resolve the expression to a compatible value. The evaluator is not expected to perform any conversion but - * rather filter out incompatible values from its result. - * - * @param expression the expression - * @param type The expected type of expression result, may be {@code null}. - * @return the value of the expression - * @throws ExpressionEvaluationException in case of an error. - */ - Object evaluate(String expression, Class type) throws ExpressionEvaluationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AbstractResourceBasedComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AbstractResourceBasedComponentDiscoverer.java deleted file mode 100644 index 71f75a009..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AbstractResourceBasedComponentDiscoverer.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.IOException; -import java.io.Reader; -import java.net.URL; -import java.net.URLConnection; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; -import java.util.List; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextMapAdapter; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.InterpolationFilterReader; -import org.codehaus.plexus.util.ReaderFactory; - -// TODO: this should be a default strategy of searching through classloaders. a discoverer should really not have to be -// concerned finding a particular resource and how to turn it into a set of component descriptors. - -/** - * @author Jason van Zyl - */ -public abstract class AbstractResourceBasedComponentDiscoverer implements ComponentDiscoverer { - protected abstract String getComponentDescriptorLocation(); - - protected abstract ComponentSetDescriptor createComponentDescriptors(Reader reader, String source, ClassRealm realm) - throws PlexusConfigurationException; - - public List findComponents(Context context, ClassRealm realm) - throws PlexusConfigurationException { - List componentSetDescriptors = new ArrayList(); - - Enumeration resources; - - try { - resources = realm.getResources(getComponentDescriptorLocation()); - } catch (IOException e) { - throw new PlexusConfigurationException("Unable to retrieve resources for: " - + getComponentDescriptorLocation() + " in class realm: " + realm.getId()); - } - - for (URL url : Collections.list(resources)) { - Reader reader = null; - - try { - URLConnection conn = url.openConnection(); - - conn.setUseCaches(false); - - conn.connect(); - - reader = ReaderFactory.newXmlReader(conn.getInputStream()); - - InterpolationFilterReader interpolationFilterReader = - new InterpolationFilterReader(reader, new ContextMapAdapter(context)); - - ComponentSetDescriptor componentSetDescriptor = - createComponentDescriptors(interpolationFilterReader, url.toString(), realm); - - componentSetDescriptors.add(componentSetDescriptor); - } catch (IOException ex) { - throw new PlexusConfigurationException("Error reading configuration " + url, ex); - } finally { - IOUtil.close(reader); - } - } - - return componentSetDescriptors; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AnnotationBasedComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AnnotationBasedComponentDiscoverer.java deleted file mode 100644 index 3b0230685..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/AnnotationBasedComponentDiscoverer.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/** - * Component discoverer which relies on annotation information to define component definitions. - * - * @author jvanzyl - */ -public interface AnnotationBasedComponentDiscoverer extends ComponentDiscoverer {} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoverer.java deleted file mode 100644 index f3c63e1bb..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoverer.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.context.Context; - -/** - * @author Jason van Zyl - */ -public interface ComponentDiscoverer { - List findComponents(Context context, ClassRealm classRealm) - throws PlexusConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscovererManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscovererManager.java deleted file mode 100644 index c4a72eb02..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscovererManager.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -/** - * ComponentDiscovererManager is a simple index (registry) of ComponentDiscovers and ComponentDiscoveryListener. - */ -public interface ComponentDiscovererManager { - void addComponentDiscoverer(ComponentDiscoverer componentDiscoverer); - - List getComponentDiscoverers(); - - // todo dain change this to Set (requires change to maven) - Map getComponentDiscoveryListeners(); - - void registerComponentDiscoveryListener(ComponentDiscoveryListener listener); - - void removeComponentDiscoveryListener(ComponentDiscoveryListener listener); - - void fireComponentDiscoveryEvent(ComponentDiscoveryEvent event); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryEvent.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryEvent.java deleted file mode 100644 index a47ce3f12..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryEvent.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; - -/** - * Signals to a ComponentDiscoveryListener that an event has taken place - * involving a set of components. It is up to the Listener to decide what - * to do with that information. - */ -public class ComponentDiscoveryEvent { - private ComponentSetDescriptor componentSetDescriptor; - - private Object data; - - /** - * Constructs a ComponentDiscoveryEvent with a set of - * ComponentDescriptors. - * @param componentSetDescriptor a set of ComponentDescriptors - */ - public ComponentDiscoveryEvent(ComponentSetDescriptor componentSetDescriptor) { - this.componentSetDescriptor = componentSetDescriptor; - } - - public ComponentDiscoveryEvent(ComponentSetDescriptor componentSetDescriptor, Object data) { - this.componentSetDescriptor = componentSetDescriptor; - this.data = data; - } - - /** - * Returns this event's set of ComponentDescriptors. - * @return this event's set of ComponentDescriptors - */ - public ComponentSetDescriptor getComponentSetDescriptor() { - return componentSetDescriptor; - } - - public Object getData() { - return data; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryListener.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryListener.java deleted file mode 100644 index 02ce760ae..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ComponentDiscoveryListener.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A listener which responds in some way to component discovery by a PlexusContainer. - */ -public interface ComponentDiscoveryListener { - /** - * Signals to this listener that a component has been discovered. - * @param event the event that signals what components have been discovered - */ - void componentDiscovered(ComponentDiscoveryEvent event); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscoverer.java deleted file mode 100644 index 40a040825..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscoverer.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.Reader; -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * @author Jason van Zyl - */ -public class DefaultComponentDiscoverer extends AbstractResourceBasedComponentDiscoverer { - public String getComponentDescriptorLocation() { - return "META-INF/plexus/components.xml"; - } - - public ComponentSetDescriptor createComponentDescriptors( - Reader componentDescriptorReader, String source, ClassRealm realm) throws PlexusConfigurationException { - PlexusConfiguration componentDescriptorConfiguration = - PlexusTools.buildConfiguration(source, componentDescriptorReader); - - ComponentSetDescriptor componentSetDescriptor = new ComponentSetDescriptor(); - - List> componentDescriptors = new ArrayList>(); - - PlexusConfiguration[] componentConfigurations = - componentDescriptorConfiguration.getChild("components").getChildren("component"); - - for (PlexusConfiguration componentConfiguration : componentConfigurations) { - ComponentDescriptor componentDescriptor; - try { - componentDescriptor = PlexusTools.buildComponentDescriptor(componentConfiguration, realm); - } catch (PlexusConfigurationException e) { - // This is not the most accurate of exceptions as the only real case where this exception - // will be thrown is when the implementation class of the component sited cannot be loaded. - // In the case where role and implementation classes do not exist then we just shouldn't - // create the component descriptor. All information should be taken from annotations which - // will be correct, so in the case we can't load the class it must be coming from and older - // hand written descriptor which is incorrect. - - continue; - } - - componentDescriptor.setSource(source); - - componentDescriptor.setComponentType("plexus"); - - componentDescriptor.setComponentSetDescriptor(componentSetDescriptor); - - componentDescriptors.add(componentDescriptor); - } - - componentSetDescriptor.setComponents(componentDescriptors); - - componentSetDescriptor.setSource(source); - - return componentSetDescriptor; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscovererManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscovererManager.java deleted file mode 100644 index 6ed22f80d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DefaultComponentDiscovererManager.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -public class DefaultComponentDiscovererManager implements ComponentDiscovererManager { - private final List componentDiscoverers = new ArrayList(); - - // todo dain change this to LinkedHashSet (requires change to maven) - private final Map listeners = - new LinkedHashMap(); - - public synchronized void addComponentDiscoverer(ComponentDiscoverer discoverer) { - componentDiscoverers.add(discoverer); - } - - // todo this is not thread safe... we are returning the raw collection - public synchronized List getComponentDiscoverers() { - return componentDiscoverers; - } - - // Listeners - - // todo this is not thread safe... we are returning the raw collection - public synchronized Map getComponentDiscoveryListeners() { - return listeners; - } - - public synchronized void registerComponentDiscoveryListener(ComponentDiscoveryListener listener) { - if (!listeners.containsKey(listener)) { - listeners.put(listener, new Object()); - } - } - - public synchronized void removeComponentDiscoveryListener(ComponentDiscoveryListener listener) { - listeners.remove(listener); - } - - public void fireComponentDiscoveryEvent(ComponentDiscoveryEvent event) { - Set listeners; - synchronized (this) { - listeners = this.listeners.keySet(); - } - - for (ComponentDiscoveryListener listener : listeners) { - listener.componentDiscovered(event); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DiscoveryListenerDescriptor.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DiscoveryListenerDescriptor.java deleted file mode 100644 index a2e7135e5..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/DiscoveryListenerDescriptor.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * - */ -public class DiscoveryListenerDescriptor { - private String role; - - private String roleHint; - - public String getRole() { - return role; - } - - public String getRoleHint() { - return roleHint; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/PlexusXmlComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/PlexusXmlComponentDiscoverer.java deleted file mode 100644 index e812c0d00..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/PlexusXmlComponentDiscoverer.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -import java.io.Reader; -import java.util.Arrays; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -public class PlexusXmlComponentDiscoverer extends AbstractResourceBasedComponentDiscoverer { - public String getComponentDescriptorLocation() { - return "META-INF/plexus/plexus.xml"; - } - - @Override - protected ComponentSetDescriptor createComponentDescriptors(Reader reader, String source, ClassRealm realm) - throws PlexusConfigurationException { - ComponentSetDescriptor componentSetDescriptor = new ComponentSetDescriptor(); - - PlexusConfiguration configuration = PlexusTools.buildConfiguration(source, reader); - - if (configuration != null) { - PlexusConfiguration[] componentConfigurations = - configuration.getChild("components").getChildren("component"); - - for (PlexusConfiguration componentConfiguration : componentConfigurations) { - ComponentDescriptor componentDescriptor; - - try { - componentDescriptor = PlexusTools.buildComponentDescriptor(componentConfiguration, realm); - - if (componentDescriptor == null) { - continue; - } - } catch (PlexusConfigurationException e) { - throw new PlexusConfigurationException( - "Cannot build component descriptor from resource found in:\n" - + Arrays.asList(realm.getURLs()), - e); - } - - componentDescriptor.setComponentType("plexus"); - - componentDescriptor.setComponentSetDescriptor(componentSetDescriptor); - - componentSetDescriptor.addComponentDescriptor(componentDescriptor); - } - } - - return componentSetDescriptor; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ResourceBasedComponentDiscoverer.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ResourceBasedComponentDiscoverer.java deleted file mode 100644 index 02edfb1fa..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/discovery/ResourceBasedComponentDiscoverer.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/** - * Component discoverer which relies on the metadata for the components residing in a resource that - * can be found in a classloader. - * - * @author jvanzyl - */ -public interface ResourceBasedComponentDiscoverer extends ComponentDiscoverer { - String getComponentDescriptorLocation(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/AbstractComponentFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/AbstractComponentFactory.java deleted file mode 100644 index 68bce9d94..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/AbstractComponentFactory.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.classworlds.ClassRealmAdapter; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * - * - * @author Jason van Zyl - * - */ -public abstract class AbstractComponentFactory implements ComponentFactory { - // This is for backward compatibility - private String id; - - public Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException { - // for backward-compatibility with the old component factories delegate to the old-style method - return newInstance(componentDescriptor, ClassRealmAdapter.getInstance(classRealm), container); - } - - protected Object newInstance( - ComponentDescriptor componentDescriptor, - org.codehaus.classworlds.ClassRealm classRealm, - PlexusContainer container) - throws ComponentInstantiationException { - throw new IllegalStateException(getClass().getName() + " does not implement component creation."); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactory.java deleted file mode 100644 index d4545b9a8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** A ServiceFactory is responsible for instantiating a component. - * - * @author Jason van Zyl - * @author Michal Maczka - * - * @version $Id$ - */ -public interface ComponentFactory { - /** Component role. */ - static String ROLE = ComponentFactory.class.getName(); - - String getId(); - - Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactoryManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactoryManager.java deleted file mode 100644 index 7f6a36add..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentFactoryManager.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentFactoryManager { - ComponentFactory findComponentFactory(String id) throws UndefinedComponentFactoryException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentInstantiationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentInstantiationException.java deleted file mode 100644 index a226a160f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/ComponentInstantiationException.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Michal Maczka - * - */ -public class ComponentInstantiationException extends Exception { - public ComponentInstantiationException(String message) { - super(message); - } - - public ComponentInstantiationException(String message, Throwable cause) { - super(message, cause); - } - - public ComponentInstantiationException(Throwable cause) { - super(cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/DefaultComponentFactoryManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/DefaultComponentFactoryManager.java deleted file mode 100644 index 5db9fc347..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/DefaultComponentFactoryManager.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.factory.java.JavaComponentFactory; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; - -/** - * @author Jason van Zyl - */ -public class DefaultComponentFactoryManager implements ComponentFactoryManager, Contextualizable { - private ComponentFactory defaultComponentFactory = new JavaComponentFactory(); - - private PlexusContainer container; - - public ComponentFactory findComponentFactory(String id) throws UndefinedComponentFactoryException { - if (id == null || id.equals("java")) { - return defaultComponentFactory; - } - - try { - return container.lookup(ComponentFactory.class, id); - } catch (ComponentLookupException e) { - throw new UndefinedComponentFactoryException("Specified component factory cannot be found: " + id); - } - } - - public void contextualize(Context context) throws ContextException { - container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/UndefinedComponentFactoryException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/UndefinedComponentFactoryException.java deleted file mode 100644 index a1b50e748..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/UndefinedComponentFactoryException.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class UndefinedComponentFactoryException extends Exception { - public UndefinedComponentFactoryException(String message) { - super(message); - } - - public UndefinedComponentFactoryException(String message, Throwable cause) { - super(message, cause); - } - - public UndefinedComponentFactoryException(Throwable cause) { - super(cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/java/JavaComponentFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/java/JavaComponentFactory.java deleted file mode 100644 index 82250064d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/factory/java/JavaComponentFactory.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.codehaus.plexus.component.factory.java; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.lang.reflect.Modifier; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.factory.AbstractComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * Component Factory for components written in Java Language which have default no parameter constructor - * - * @author Jason van Zyl - * @author Michal Maczka - */ -public class JavaComponentFactory extends AbstractComponentFactory { - public String getId() { - return "java"; - } - - public Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException { - Class implementationClass = null; - - try { - String implementation = componentDescriptor.getImplementation(); - - implementationClass = classRealm.loadClass(implementation); - - int modifiers = implementationClass.getModifiers(); - - if (Modifier.isInterface(modifiers)) { - throw new ComponentInstantiationException( - "Cannot instantiate implementation '" + implementation + "' because the class is a interface."); - } - - if (Modifier.isAbstract(modifiers)) { - throw new ComponentInstantiationException( - "Cannot instantiate implementation '" + implementation + "' because the class is abstract."); - } - - Object instance = implementationClass.newInstance(); - - return instance; - } catch (InstantiationException e) { - // PLXAPI: most probably cause of this is the implementation class not having - // a default constructor. - throw makeException(classRealm, componentDescriptor, implementationClass, e); - } catch (ClassNotFoundException e) { - throw makeException(classRealm, componentDescriptor, implementationClass, e); - } catch (IllegalAccessException e) { - throw makeException(classRealm, componentDescriptor, implementationClass, e); - } catch (LinkageError e) { - throw makeException(classRealm, componentDescriptor, implementationClass, e); - } - } - - private ComponentInstantiationException makeException( - ClassRealm componentClassRealm, - ComponentDescriptor componentDescriptor, - Class implementationClass, - Throwable e) { - // ---------------------------------------------------------------------- - // Display the realm when there is an error, We should probably return a string here so we - // can incorporate this into the error message for easy debugging. - // ---------------------------------------------------------------------- - - String msg; - - if (componentClassRealm == null) { - msg = "classRealm is null for " + componentDescriptor; - } else { - msg = "Could not instantiate component: " + componentDescriptor.getHumanReadableKey() + " realm: " - + componentClassRealm.getId(); - } - - return new ComponentInstantiationException(msg, e); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/AbstractComponentManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/AbstractComponentManager.java deleted file mode 100644 index 381a8ab6d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/AbstractComponentManager.java +++ /dev/null @@ -1,203 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Collections; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.builder.AbstractComponentBuildListener; -import org.codehaus.plexus.component.builder.ComponentBuilder; -import org.codehaus.plexus.component.builder.XBeanComponentBuilder; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -public abstract class AbstractComponentManager implements ComponentManager { - protected final MutablePlexusContainer container; - - private final ClassRealm realm; - - protected final ComponentDescriptor componentDescriptor; - - private final Class type; - - private final String role; - - private final String roleHint; - - protected final ComponentBuilder builder = new XBeanComponentBuilder(this); - - private final LifecycleHandler lifecycleHandler; - - /** - * Contains a mapping from singleton instances to the realms - * they were used to configure with. This realm will be used to - * call all lifecycle methods. - * This will define a synchronized map, make sure to synchronize the map when iterating. - */ - protected final Map componentContextRealms = - Collections.synchronizedMap(new HashMap()); - - private int connections; - - private long startId; - - public AbstractComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint) { - if (container == null) { - throw new NullPointerException("container is null"); - } - this.container = container; - - if (lifecycleHandler == null) { - throw new NullPointerException("lifecycleHandler is null"); - } - this.lifecycleHandler = lifecycleHandler; - - if (componentDescriptor == null) { - throw new NullPointerException("componentDescriptor is null"); - } - this.componentDescriptor = componentDescriptor; - - if (role == null) { - throw new NullPointerException("role is null"); - } - this.role = role; - - if (roleHint == null) { - throw new NullPointerException("roleHint is null"); - } - this.roleHint = roleHint; - - this.realm = componentDescriptor.getRealm(); - - this.type = componentDescriptor.getImplementationClass(); - } - - public ComponentDescriptor getComponentDescriptor() { - return componentDescriptor; - } - - public Class getType() { - return type; - } - - public ClassRealm getRealm() { - return realm; - } - - public String getRole() { - return role; - } - - public String getRoleHint() { - return roleHint; - } - - public LifecycleHandler getLifecycleHandler() { - return lifecycleHandler; - } - - protected void incrementConnectionCount() { - connections++; - } - - protected void decrementConnectionCount() { - connections--; - } - - protected boolean connected() { - return connections > 0; - } - - public int getConnections() { - return connections; - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - public void start(Object component) throws PhaseExecutionException { - startId = NEXT_START_ID.getAndIncrement(); - getLifecycleHandler().start(component, this, componentDescriptor.getRealm()); - } - - /** - * @deprecated for internal use only.. will be removed - */ - public long getStartId() { - return startId; - } - - protected T createComponentInstance() throws ComponentInstantiationException, ComponentLifecycleException { - return builder.build(componentDescriptor, realm, new AbstractComponentBuildListener() { - public void componentCreated( - ComponentDescriptor componentDescriptor, Object component, ClassRealm realm) { - componentContextRealms.put(component, realm); - } - }); - } - - protected void endComponentLifecycle(Object component) throws ComponentLifecycleException { - ClassRealm contextRealm = componentContextRealms.remove(component); - if (contextRealm == null) { - contextRealm = container.getLookupRealm(component); - } - - try { - getLifecycleHandler().end(component, this, contextRealm); - } catch (PhaseExecutionException e) { - throw new ComponentLifecycleException("Error ending component lifecycle", e); - } - } - - public MutablePlexusContainer getContainer() { - return container; - } - - public Logger getLogger() { - return container.getLogger(); - } - - public void dissociateComponentRealm(ClassRealm realm) throws ComponentLifecycleException { - synchronized (componentContextRealms) { - for (Iterator> iterator = - componentContextRealms.entrySet().iterator(); - iterator.hasNext(); ) { - Entry entry = iterator.next(); - ClassRealm componentRealm = entry.getValue(); - - if (componentRealm.getId().equals(realm.getId())) { - iterator.remove(); - } - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManager.java deleted file mode 100644 index c79ca59bd..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManager.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.concurrent.atomic.AtomicLong; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -/** - * Manages a component manager. - * Determines when a component is shutdown, and when it's started up. Each - * manager deals with only one component class, though may handle multiple - * instances of this class. - * - * @author Jason van Zyl - * - */ -public interface ComponentManager { - String ROLE = ComponentManager.class.getName(); - - /** - * @deprecated for internal use only.. will be removed - */ - AtomicLong NEXT_START_ID = new AtomicLong(1); - - int getConnections(); - - /** - * @return {@link LifecycleHandler}. - * @deprecated use start instead - */ - LifecycleHandler getLifecycleHandler(); - - void dispose() throws ComponentLifecycleException; - - void release(Object component) throws ComponentLifecycleException; - - T getComponent() throws ComponentInstantiationException, ComponentLifecycleException; - - ComponentDescriptor getComponentDescriptor(); - - Class getType(); - - String getRole(); - - String getRoleHint(); - - MutablePlexusContainer getContainer(); - - void dissociateComponentRealm(ClassRealm realm) throws ComponentLifecycleException; - - ClassRealm getRealm(); - - void start(Object component) throws PhaseExecutionException; - - /** - * @return The start id. - * @deprecated for internal use only.. will be removed - */ - long getStartId(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManagerFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManagerFactory.java deleted file mode 100644 index ae8aaf05f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/ComponentManagerFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.component.manager; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.lifecycle.LifecycleHandler; - -public interface ComponentManagerFactory { - /** - * Gets the unique identifier of this ComponentManagerFactory. This id is the instantiation strategy specified - * in a component descriptor. - * @return the unique identifier and instantiation strategy name - */ - String getId(); - - /** - * Creates a new component manager for the specified component descriptor. - * @param container {@link MutablePlexusContainer}. - * @param lifecycleHandler {@link LifecycleHandler}. - * @param componentDescriptor {@link ComponentDescriptor} - * @param role The role. - * @param roleHint The hint for the role. - * @param The type. - * @return {@link ComponentManager} - */ - ComponentManager createComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManager.java deleted file mode 100644 index 1abd43c08..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManager.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.lifecycle.LifecycleHandler; - -/** - * Creates a new component manager for every lookup - * - * @author Jason van Zyl - * - */ -public class PerLookupComponentManager extends AbstractComponentManager { - public PerLookupComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint) { - super(container, lifecycleHandler, componentDescriptor, role, roleHint); - } - - public void dispose() {} - - public T getComponent() throws ComponentInstantiationException, ComponentLifecycleException { - T component = createComponentInstance(); - - return component; - } - - public void release(Object component) throws ComponentLifecycleException { - decrementConnectionCount(); - endComponentLifecycle(component); - // non cleanup map references for per-lookup cause leak - componentContextRealms.remove(component); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManagerFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManagerFactory.java deleted file mode 100644 index 414a5f0e0..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/PerLookupComponentManagerFactory.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.component.manager; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.lifecycle.LifecycleHandler; - -public class PerLookupComponentManagerFactory implements ComponentManagerFactory { - public String getId() { - return "per-lookup"; - } - - @SuppressWarnings({"RawUseOfParameterizedType"}) - public ComponentManager createComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint) { - return new PerLookupComponentManager(container, lifecycleHandler, componentDescriptor, role, roleHint); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManager.java deleted file mode 100644 index e0ff6c2a8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManager.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.lifecycle.LifecycleHandler; - -/** - * This ensures a component is only used as a singleton, and is only shutdown when the container - * shuts down. - * - * @author Jason van Zyl - */ -public class SingletonComponentManager extends AbstractComponentManager { - private T singleton; - - public SingletonComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint) { - super(container, lifecycleHandler, componentDescriptor, role, roleHint); - } - - public synchronized void release(Object component) throws ComponentLifecycleException { - if (singleton == component) { - dispose(); - } - } - - public synchronized void dispose() throws ComponentLifecycleException { - if (singleton != null) { - endComponentLifecycle(singleton); - singleton = null; - } - } - - public synchronized T getComponent() throws ComponentInstantiationException, ComponentLifecycleException { - if (singleton == null) { - singleton = createComponentInstance(); - } - - incrementConnectionCount(); - - return singleton; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManagerFactory.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManagerFactory.java deleted file mode 100644 index 60c12f239..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/SingletonComponentManagerFactory.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.component.manager; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.lifecycle.LifecycleHandler; - -public class SingletonComponentManagerFactory implements ComponentManagerFactory { - public String getId() { - return "singleton"; - } - - @SuppressWarnings({"RawUseOfParameterizedType"}) - public ComponentManager createComponentManager( - MutablePlexusContainer container, - LifecycleHandler lifecycleHandler, - ComponentDescriptor componentDescriptor, - String role, - String roleHint) { - return new SingletonComponentManager(container, lifecycleHandler, componentDescriptor, role, roleHint); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/UndefinedComponentManagerException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/UndefinedComponentManagerException.java deleted file mode 100644 index b91f2499f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/manager/UndefinedComponentManagerException.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - */ -public class UndefinedComponentManagerException extends Exception { - public UndefinedComponentManagerException(String message) { - super(message); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDependency.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDependency.java deleted file mode 100644 index e440ba371..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDependency.java +++ /dev/null @@ -1,118 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * This represents a project which this component depends upon to function - * properly, for example, a required jar file. See Apache Maven for an - * example of a dependency in action. - * - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class ComponentDependency { - private static final String DEAULT_DEPENDENCY_TYPE = "jar"; - - private String groupId; - - private String artifactId; - - private String type = DEAULT_DEPENDENCY_TYPE; - - private String version; - - /** - * Gets a key for an artifact, which is an alias for a specific - * project timeline in a group. - * @return a key for an artifact - */ - public String getArtifactId() { - return artifactId; - } - - /** - * Sets the dependency's artifact ID. - * @param artifactId the artifact ID - */ - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - - /** - * Gets a key for a group, which represents a set of artifacts timelines. - * @return a key for a group - */ - public String getGroupId() { - return groupId; - } - - /** - * Sets the dependency's group ID. - * @param groupId the group ID - */ - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - /** - * Gets the type of dependency, for example a "jar". - * @return the type of dependency - */ - public String getType() { - return type; - } - - /** - * Sets the dependency project's type. - * @param type the dependency's type - */ - public void setType(String type) { - this.type = type; - } - - /** - * Returns a specific point in a project's timeline. - * i.e. version 1, or 2.1.4 - * @return a specific point in a project's timeline - */ - public String getVersion() { - return version; - } - - /** - * Sets the point in a project's development timeline - * @param version the project's version - */ - public void setVersion(String version) { - this.version = version; - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - - sb.append("groupId = ") - .append(groupId) - .append(", artifactId = ") - .append(artifactId) - .append(", version = ") - .append(version) - .append(", type = ") - .append(type); - - return sb.toString(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDescriptor.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDescriptor.java deleted file mode 100644 index 2f4eb096a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentDescriptor.java +++ /dev/null @@ -1,628 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * Component instantiation description. - * - * @author Jason van Zyl - * @author bob mcwhirter - * @author Michal Maczka - */ -public class ComponentDescriptor { - private String alias = null; - - private String role = null; - - private Class roleClass; - - private String roleHint = PlexusConstants.PLEXUS_DEFAULT_HINT; - - private String implementation; - - private Class implementationClass; - - private String version; - - private String componentType; - - private PlexusConfiguration configuration; - - private String instantiationStrategy; - - private String lifecycleHandler; - - private String componentProfile; - - private final List requirements = new ArrayList(); - - private String componentFactory; - - private String componentComposer; - - private String componentConfigurator; - - private String description; - - private ClassRealm realm; - - // ---------------------------------------------------------------------- - // These two fields allow for the specification of an isolated class realm - // and dependencies that might be specified in a component configuration - // setup by a user i.e. this is here to allow isolation for components - // that are not picked up by the discovery mechanism. - // ---------------------------------------------------------------------- - - private boolean isolatedRealm; - - // ---------------------------------------------------------------------- - - private ComponentSetDescriptor componentSetDescriptor; - - private String source; - - // ---------------------------------------------------------------------- - // Instance methods - // ---------------------------------------------------------------------- - - public ComponentDescriptor() {} - - public ComponentDescriptor(Class implementationClass, ClassRealm realm) { - this.implementationClass = implementationClass; - this.implementation = implementationClass.getName(); - this.realm = realm; - } - - /** - * The location this information came from (descriptor file URI). - * @param source The source of the descriptor. - */ - public void setSource(String source) { - this.source = source; - } - - /** - * The location this information came from (descriptor file URI). - * @return The source. - */ - public String getSource() { - return source; - } - - /** - * Returns a human-friendly key, suitable for display. - * - * @return a human-friendly key - */ - public String getHumanReadableKey() { - StringBuilder key = new StringBuilder(); - - key.append("role: '").append(getRole()).append("'"); - - key.append(", implementation: '").append(getImplementation()).append("'"); - - if (roleHint != null) { - key.append(", role hint: '").append(getRoleHint()).append("'"); - } - - if (alias != null) { - key.append(", alias: '").append(getAlias()).append("'"); - } - - return key.toString(); - } - - /** - * Returns an alias for this component. An alias as an alternate name other than the normal key. - * - * @return an alias for this component - */ - public String getAlias() { - return alias; - } - - /** - * Sets the alias for this component. - * - * @param alias alternate name to set - */ - public void setAlias(String alias) { - this.alias = alias; - } - - /** - * Returns the role of this component. - * - * @return the role of this component - */ - public String getRole() { - return role; - } - - public Class getRoleClass() { - attemptRoleLoad(); - - if (roleClass == null) { - return (Class) Object.class; - } - return (Class) roleClass; - } - - private void attemptRoleLoad() { - if (roleClass == null && getRole() != null && getRealm() != null) { - try { - roleClass = (Class) getRealm().loadClass(getRole()); - Thread.currentThread(); - } catch (Throwable ignored) { - Thread.currentThread(); - } - } - } - - /** - * Sets the role of this component. - * - * @param role this component's role - */ - public void setRole(String role) { - this.role = role; - - // reload role class - roleClass = null; - attemptRoleLoad(); - } - - public void setRoleClass(Class roleClass) { - this.roleClass = roleClass; - - if (roleClass == null) { - role = null; - } else { - role = roleClass.getName(); - } - } - - /** - * Returns the role-hint of this component. - * - * @return the role-hint of this component - */ - public String getRoleHint() { - return roleHint; - } - - /** - * Sets the role-hint of this component. Pasing null will set the hint to the default value. - * - * @param roleHint this component's role-hint - */ - public void setRoleHint(String roleHint) { - if ((roleHint == null) || roleHint.trim().equals("")) { - this.roleHint = PlexusConstants.PLEXUS_DEFAULT_HINT; - } else { - this.roleHint = roleHint; - } - } - - /** - * Returns the implementation of this componet. Implementation is a string denoting a FQCN in normal Java - * components, or some other name or file for other component factory implementations. - * - * @return the implementation of this componet's role. - */ - public String getImplementation() { - return implementation; - } - - /** - * Sets the implementation of this componet. - * - * @param implementation string denoting a FQCN in normal Java components, or some other name or file for other - * component factory implementations - */ - public void setImplementation(String implementation) { - this.implementation = implementation; - - // reload implementation class - implementationClass = null; - attemptImplementationLoad(); - } - - /** - * Returns the implementation class of this componet, or null if the implementation class can not be loaded. - * - * @return the implementation of this componet's role. - */ - public Class getImplementationClass() { - attemptImplementationLoad(); - - if (implementationClass == null) { - return (Class) Object.class; - } - return (Class) implementationClass; - } - - private void attemptImplementationLoad() { - if (implementationClass == null && getImplementation() != null && getRealm() != null) { - try { - implementationClass = (Class) getRealm().loadClass(getImplementation()); - Thread.currentThread(); - } catch (Throwable ignored) { - Thread.currentThread(); - } - } - } - - public void setImplementationClass(Class implementationClass) { - this.implementationClass = implementationClass; - if (implementationClass == null) { - implementation = null; - } else { - implementation = implementationClass.getName(); - } - } - - /** - * Returns a specific point in a components's project timeline. i.e. version 1, or 2.1.4 - * - * @return a specific point in a components's project timeline - */ - public String getVersion() { - return version; - } - - /** - * Sets the point in a components's project development timeline - * - * @param version the components's version - */ - public void setVersion(String version) { - this.version = version; - } - - /** - * Returns the type of this component. - * - * @return the type of this component - */ - public String getComponentType() { - return componentType; - } - - /** - * Sets this component's type. - * - * @param componentType the type to set - */ - public void setComponentType(String componentType) { - this.componentType = componentType; - } - - /** - * Returns the type of instantiation strategy for this component. - * - * @return the type of instantiation strategy for this component - */ - public String getInstantiationStrategy() { - return instantiationStrategy; - } - - /** - * Returns configuration values defined for this component. - * - * @return configuration values defined for this component - */ - public PlexusConfiguration getConfiguration() { - return configuration; - } - - /** - * Sets the configuration hierarchy for this component. - * - * @param configuration the configuration hierarchy to set - */ - public void setConfiguration(PlexusConfiguration configuration) { - this.configuration = configuration; - } - - /** - * Returns true if this component has a configuration. - * - * @return true if this component has a configuration - */ - public boolean hasConfiguration() { - return configuration != null; - } - - /** - * Returns the lifecycle-handler for this component. - * - * @return the lifecycle-handler for this component - */ - public String getLifecycleHandler() { - return lifecycleHandler; - } - - /** - * Sets the lifecycle-handler for this component. For example, "basic", "passive", "bootstrap". - * - * @param lifecycleHandler the lifecycle handler string to set - */ - public void setLifecycleHandler(String lifecycleHandler) { - this.lifecycleHandler = lifecycleHandler; - } - - public String getComponentProfile() { - return componentProfile; - } - - public void setComponentProfile(String componentProfile) { - this.componentProfile = componentProfile; - } - - /** - * Add a project requirement to this component. - * - * @param requirement the requirement to add - */ - public void addRequirement(ComponentRequirement requirement) { - this.requirements.add(requirement); - } - - /** - * Add a project requirement to this component. - * - * @param requirement the requirement to add - */ - public void addRequirement(ComponentRequirement... requirement) { - this.requirements.addAll(Arrays.asList(requirement)); - } - - /** - * Adds a list of requirements to this component. - * - * @param requirements the requirements to add - */ - public void addRequirements(List requirements) { - this.requirements.addAll(requirements); - } - - /** - * Remove a project requirement from this component. - * - * @param requirement the requirement to remove - */ - public void removeRequirement(ComponentRequirement... requirement) { - this.requirements.removeAll(Arrays.asList(requirement)); - } - - /** - * Removes a list of requirements from this component. - * - * @param requirements the requirements to remove - */ - public void removeRequirements(List requirements) { - this.requirements.removeAll(requirements); - } - - /** - * Returns all project requirements of this component. - * - * @return all project requirements of this component - */ - public List getRequirements() { - return Collections.unmodifiableList(requirements); - } - - /** - * Returns an id of the factory used to create this component. - * - * @return an id of the factory used to create this component - */ - public String getComponentFactory() { - return componentFactory; - } - - /** - * Sets the id of the factory to use to create this component. For example, "jruby" will use a JRuby factory. - * - * @param componentFactory The componentFactor. - */ - public void setComponentFactory(String componentFactory) { - this.componentFactory = componentFactory; - } - - /** - * Returns the ID of the type of composer this component will use. For example, "setter" or "field" for the - * different types of dependency injection. - * - * @return the ID of the type of composer this component will use - */ - public String getComponentComposer() { - return componentComposer; - } - - /** - * Sets a representation of the composer this component uses. - * - * @param componentComposer string representation of the composer to use - */ - public void setComponentComposer(String componentComposer) { - this.componentComposer = componentComposer; - } - - /** - * Return a human-readable description of this component. - * - * @return a human-readable description of this component - */ - public String getDescription() { - return description; - } - - /** - * Sets a description of this component for users to read. - * - * @param description a human-readable description of this component - */ - public void setDescription(String description) { - this.description = description; - } - - /** - * Sets the instantiation-strategy for this component. For example, "container". - * - * @param instantiationStrategy The strategy. - */ - public void setInstantiationStrategy(String instantiationStrategy) { - this.instantiationStrategy = instantiationStrategy; - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - /** - * Returns true if this may be in an isolated classrealm. - * - * @return true if this may be in an isolated classrealm - */ - public boolean isIsolatedRealm() { - return isolatedRealm; - } - - /** - * Sets the component set descriptor of components and dependencies for this component. - * - * @param componentSetDescriptor the component set descriptor of components and dependencies - */ - public void setComponentSetDescriptor(ComponentSetDescriptor componentSetDescriptor) { - this.componentSetDescriptor = componentSetDescriptor; - } - - /** - * Returns the component set descriptor. - * - * @return the component set descriptor - */ - public ComponentSetDescriptor getComponentSetDescriptor() { - return componentSetDescriptor; - } - - /** - * Sets that this component may be in an isolated classrealm. - * - * @param isolatedRealm true if this component may be in an isolated classrealm - */ - public void setIsolatedRealm(boolean isolatedRealm) { - this.isolatedRealm = isolatedRealm; - } - - /** - * Returns the type of component configurator for this project. For example "basic" for normal, or "map-oriented" - * for map oriented components. - * - * @return the type of component configurator for this project - */ - public String getComponentConfigurator() { - return componentConfigurator; - } - - /** - * Sets the type of component configurator for this project. - * - * @param componentConfigurator The component configurator. - */ - public void setComponentConfigurator(String componentConfigurator) { - this.componentConfigurator = componentConfigurator; - } - - /** - * The ClassRealm that this component lives under. - * - * @return ClassRealm that this component lives under - */ - public ClassRealm getRealm() { - return realm; - } - - /** - * Set the ClassRealm that this component lives under. - * - * @param realm the ClassRealm that this component lives under - */ - public void setRealm(ClassRealm realm) { - this.realm = realm; - - // reload implementation class - implementationClass = null; - attemptImplementationLoad(); - - // reload role class - roleClass = null; - attemptRoleLoad(); - } - - public String toString() { - return getClass().getName() + " [role: '" + getRole() + "', hint: '" + getRoleHint() + "', realm: " - + (realm == null ? "NULL" : "'" + realm + "'") + "]"; - } - - // Component identity established here! - public boolean equals(Object other) { - if (this == other) { - return true; - } - - if (!(other instanceof ComponentDescriptor)) { - return false; - } - - ComponentDescriptor that = (ComponentDescriptor) other; - - return eq(getRole(), that.getRole()) - && eq(getRoleHint(), that.getRoleHint()) - && eq(getRealm(), that.getRealm()); - } - - private static boolean eq(T o1, T o2) { - return (o1 != null) ? o1.equals(o2) : o2 == null; - } - - public int hashCode() { - int hash = 17; - - hash = hash * 31 + hash(getRole()); - hash = hash * 31 + hash(getRoleHint()); - hash = hash * 31 + hash(getRealm()); - - return hash; - } - - private static int hash(Object obj) { - return (obj != null) ? obj.hashCode() : 0; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRepository.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRepository.java deleted file mode 100644 index ca735ebaa..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRepository.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; - -public interface ComponentRepository { - void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException; - - ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint); - - @Deprecated - ComponentDescriptor getComponentDescriptor(String role, String roleHint, ClassRealm realm); - - Map> getComponentDescriptorMap(Class type, String role); - - List> getComponentDescriptorList(Class type, String role); - - void removeComponentRealm(ClassRealm classRealm); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirement.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirement.java deleted file mode 100644 index aa6a10dd8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirement.java +++ /dev/null @@ -1,167 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * This represents a component this is required by another component. - * - * @author Michal Maczka - */ -public class ComponentRequirement { - private String role; - - private String roleHint = ""; - - private String fieldName; - - private String fieldMappingType; - - private boolean optional; - - /** - * Returns the field name that this component requirement will inject. - * @return the field name that this component requirement will inject - */ - public String getFieldName() { - return fieldName; - } - - /** - * Sets the name of the field that will be populated by the required - * component. - * @param fieldName the name of the field to be populated - */ - public void setFieldName(String fieldName) { - this.fieldName = fieldName; - } - - /** - * Returns the role of the required component. - * @return the role of the required component - */ - public String getRole() { - return role; - } - - /** - * Sets the role of the require component. - * @param role the required component's role - */ - public void setRole(String role) { - this.role = role; - } - - /** - * Returns the role-hint of the required component. - * @return the role-hint of the required component - */ - public String getRoleHint() { - return roleHint; - } - - /** - * Sets the role-hint of the require component. - * Passing null or an empty string will match any available implementation. - * @param roleHint the required component's role-hint - */ - public void setRoleHint(String roleHint) { - this.roleHint = (roleHint != null) ? roleHint : ""; - } - - /** - * Returns the type of the field this component requirement will inject. - * @return the type of the field this component requirement will inject - */ - public String getFieldMappingType() { - return fieldMappingType; - } - - /** - * Sets the type of the field that will be populated by the required - * component. - * @param fieldType the type of the field to be populated - */ - public void setFieldMappingType(String fieldType) { - this.fieldMappingType = fieldType; - } - - /** - * Whether this component requirement is optional and needs not be satisfied - * - * @return {@code true} if the requested component may be missing, {@code false} if the component is mandatory. - * @since 1.3.0 - */ - public boolean isOptional() { - return optional; - } - - /** - * Controls whether a failure to satisfy this requirement can be tolerated by host component or whether construction - * of the host component should also fail. - * - * @param optional {@code true} if the requested component may be missing, {@code false} if the component is - * mandatory. - * @since 1.3.0 - */ - public void setOptional(boolean optional) { - this.optional = optional; - } - - public String toString() { - return "ComponentRequirement{" + "role='" - + getRole() + "'" + ", " + "roleHint='" - + getRoleHint() + "', " + "fieldName='" - + getFieldName() + "'" + "}"; - } - - /** - * Returns a human-friendly key, suitable for display. - * @return a human-friendly key - */ - public String getHumanReadableKey() { - StringBuilder key = new StringBuilder(); - - key.append("role: '").append(getRole()).append("'"); - - if (getRoleHint() != null) { - key.append(", role-hint: '").append(getRoleHint()).append("'. "); - } - - if (getFieldName() != null) { - key.append(", field name: '").append(getFieldName()).append("' "); - } - - return key.toString(); - } - - public boolean equals(Object other) { - if (other instanceof ComponentRequirement) { - String myId = role + ":" + roleHint; - - ComponentRequirement req = (ComponentRequirement) other; - String otherId = req.role + ":" + req.roleHint; - - return myId.equals(otherId); - } - - return false; - } - - public int hashCode() { - return (role + ":" + roleHint).hashCode(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirementList.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirementList.java deleted file mode 100644 index 288a1f766..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirementList.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.component.repository; - -import java.util.List; - -/** - * Created by IntelliJ IDEA. - * - * @author Andrew Williams - * @since 1.0 - */ -public class ComponentRequirementList extends ComponentRequirement { - private List roleHints; - - public List getRoleHints() { - return roleHints; - } - - public void setRoleHints(List roleHints) { - this.roleHints = roleHints; - } - - public String getRoleHint() { - StringBuilder buffer = new StringBuilder(); - for (String hint : roleHints) { - if (buffer.length() > 0) { - buffer.append(","); - } - - buffer.append(hint); - } - - return buffer.toString(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentSetDescriptor.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentSetDescriptor.java deleted file mode 100644 index 53c21455b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/ComponentSetDescriptor.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.List; - -/** - * Contains a set of ComponentDescriptors and the set's dependencies. - * - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class ComponentSetDescriptor { - // This field is not currently used in Maven, or Plexus - private String id; - - /** The source location of this component source descriptor */ - private String source; - - /** Flag to indicate whether this component should be loaded in a realm/classloader of its own. */ - private boolean isolatedRealm; - - /** The component descriptors that can be found within this component set descriptor. */ - private final List> components = new ArrayList>(); - - /** The dependencies that are required by the set of components found in this component set descriptor. */ - private final List dependencies = new ArrayList(); - - /** - * Returns a list of components in this set. - * @return a list of components - */ - public List> getComponents() { - return components; - } - - /** - * Add a new ComponentDescriptor to this set. - * @param cd the ComponentDescriptor to add - */ - public void addComponentDescriptor(ComponentDescriptor cd) { - components.add(cd); - } - - /** - * Sets a List of components as this set's contents. - * @param components the List of components to set - */ - public void setComponents(List> components) { - this.components.clear(); - this.components.addAll(components); - } - - /** - * Returns a List of dependencies of this set of components. - * @return a List of dependencies of this set of components - */ - public List getDependencies() { - return dependencies; - } - - /** - * Add a depenency to this set's contents. - * @param cd the ComponentDependency to add - */ - public void addDependency(ComponentDependency cd) { - dependencies.add(cd); - } - - /** - * Sets a List of dependencies as this set's component dependencies. - * @param dependencies the List of components to set - */ - public void setDependencies(List dependencies) { - this.dependencies.clear(); - this.dependencies.addAll(dependencies); - } - - /** - * Sets that this set of components may be in an isolated classrealm. - * @param isolatedRealm true if this set of components may be in an - * isolated classrealm - */ - public void setIsolatedRealm(boolean isolatedRealm) { - this.isolatedRealm = isolatedRealm; - } - - /** - * Returns true if this set may be in an isolated classrealm. - * @return true if this set may be in an isolated classrealm - */ - public boolean isIsolatedRealm() { - return isolatedRealm; - } - - /** - * Returns the identifier of this set. - * @return the identifier of this set - */ - public String getId() { - return id; - } - - /** - * Sets the identifier of this set. - * @param id the identifier to set - */ - public void setId(String id) { - this.id = id; - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - - sb.append("Component Descriptor: "); - - for (ComponentDescriptor cd : components) { - sb.append(cd.getHumanReadableKey()).append("\n"); - } - - sb.append("---"); - - return sb.toString(); - } - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/DefaultComponentRepository.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/DefaultComponentRepository.java deleted file mode 100644 index 44e0e1106..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/DefaultComponentRepository.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.SortedMap; -import java.util.TreeMap; - -import org.codehaus.plexus.ClassRealmUtil; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.composition.CompositionResolver; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.composition.DefaultCompositionResolver; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.util.StringUtils; - -import static org.codehaus.plexus.component.CastUtils.isAssignableFrom; - -/** - * @author Jason van Zyl - */ -public class DefaultComponentRepository extends AbstractLogEnabled implements ComponentRepository { - private final Map>>>> index = - new LinkedHashMap>>>>(); - - private final CompositionResolver compositionResolver = new DefaultCompositionResolver(); - - public DefaultComponentRepository() {} - - // ---------------------------------------------------------------------- - // Accessors - // ---------------------------------------------------------------------- - - private Map>> getComponentDescriptors(String role) { - // verify arguments - if (role == null) { - throw new NullPointerException("role is null"); - } - - // determine realms to search - Set realms = ClassRealmUtil.getContextRealms(null); - if (realms.isEmpty()) { - realms.addAll(index.keySet()); - } - - // Get all valid component descriptors - Map>> roleHintIndex = - new LinkedHashMap>>(); - for (ClassRealm realm : realms) { - SortedMap>>> roleIndex = index.get(realm); - if (roleIndex != null) { - Map>> descriptors = roleIndex.get(role); - if (descriptors != null) { - for (Entry>> descriptor : descriptors.entrySet()) { - Set> componentDescriptors = roleHintIndex.get(descriptor.getKey()); - if (componentDescriptors == null) { - componentDescriptors = new LinkedHashSet>(); - roleHintIndex.put(descriptor.getKey(), componentDescriptors); - } - componentDescriptors.addAll(descriptor.getValue()); - } - } - } - } - return Collections.unmodifiableMap(roleHintIndex); - } - - public ComponentDescriptor getComponentDescriptor(Class type, String role, String roleHint) { - Map>> roleHintIndex = getComponentDescriptors(role); - - Collection> descriptors; - - if (StringUtils.isNotEmpty(roleHint)) { - // specific role hint -> get only those - descriptors = roleHintIndex.get(roleHint); - } else { - // missing role hint -> get all (wildcard) - Collection> allDescriptors = new ArrayList>(); - - descriptors = roleHintIndex.get(PlexusConstants.PLEXUS_DEFAULT_HINT); - if (descriptors != null) { - allDescriptors.addAll(descriptors); - } - - for (String hint : roleHintIndex.keySet()) { - descriptors = roleHintIndex.get(hint); - if (descriptors != null) { - allDescriptors.addAll(descriptors); - } - } - - descriptors = allDescriptors; - } - - if (descriptors != null) { - for (ComponentDescriptor descriptor : descriptors) { - Class implClass = descriptor.getImplementationClass(); - if (isAssignableFrom(type, implClass) || Object.class == implClass && role.equals(type.getName())) { - return (ComponentDescriptor) descriptor; - } - } - } - - return null; - } - - public Map> getComponentDescriptorMap(Class type, String role) { - Map> descriptors = new TreeMap>(); - for (Set> componentDescriptors : - getComponentDescriptors(role).values()) { - for (ComponentDescriptor descriptor : componentDescriptors) { - if (!descriptors.containsKey(descriptor.getRoleHint()) - && isAssignableFrom(type, descriptor.getImplementationClass())) { - descriptors.put(descriptor.getRoleHint(), (ComponentDescriptor) descriptor); - } - } - } - return descriptors; - } - - public List> getComponentDescriptorList(Class type, String role) { - List> descriptors = new ArrayList>(); - for (Set> componentDescriptors : - getComponentDescriptors(role).values()) { - for (ComponentDescriptor descriptor : componentDescriptors) { - if (isAssignableFrom(type, descriptor.getImplementationClass())) { - descriptors.add((ComponentDescriptor) descriptor); - } - } - } - return descriptors; - } - - @Deprecated - public ComponentDescriptor getComponentDescriptor(String role, String roleHint, ClassRealm realm) { - // find all realms from our realm to the root realm - Set realms = new HashSet(); - for (ClassRealm r = realm; r != null; r = r.getParentRealm()) { - realms.add(r); - } - - // get the component descriptors by roleHint - for (ComponentDescriptor componentDescriptor : - getComponentDescriptors(role).get(roleHint)) { - // return the first descriptor from our target realms - if (realms.contains(componentDescriptor.getRealm())) { - return componentDescriptor; - } - } - - return null; - } - - public void removeComponentRealm(ClassRealm classRealm) { - index.remove(classRealm); - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - // ---------------------------------------------------------------------- - // Component Descriptor processing. - // ---------------------------------------------------------------------- - - public void addComponentDescriptor(ComponentDescriptor componentDescriptor) - throws CycleDetectedInComponentGraphException { - ClassRealm classRealm = componentDescriptor.getRealm(); - SortedMap>>> roleIndex = index.get(classRealm); - if (roleIndex == null) { - roleIndex = new TreeMap>>>(); - index.put(classRealm, roleIndex); - } - - String role = componentDescriptor.getRole(); - Map>> roleHintIndex = roleIndex.get(role); - if (roleHintIndex == null) { - roleHintIndex = new LinkedHashMap>>(); - roleIndex.put(role, roleHintIndex); - } - String roleHint = componentDescriptor.getRoleHint(); - Set> componentDescriptors = roleHintIndex.get(roleHint); - if (componentDescriptors == null) { - componentDescriptors = new LinkedHashSet>(); - roleHintIndex.put(roleHint, componentDescriptors); - } - componentDescriptors.add(componentDescriptor); - - compositionResolver.addComponentDescriptor(componentDescriptor); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentConfigurationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentConfigurationException.java deleted file mode 100644 index ea0139e46..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentConfigurationException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentConfigurationException extends Exception { - private static final long serialVersionUID = -921278352685045303L; - - /** - * Construct a new ComponentConfigurationException instance. - * @param message exception message - */ - public ComponentConfigurationException(String message) { - super(message); - } - - /** - * Construct a new ComponentConfigurationException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentConfigurationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentDescriptorUnmarshallingException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentDescriptorUnmarshallingException.java deleted file mode 100644 index 9e6110ca0..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentDescriptorUnmarshallingException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentDescriptorUnmarshallingException extends Exception { - private static final long serialVersionUID = 6991583130117543536L; - - /** - * Construct a new ComponentDescriptorUnmarshallingException instance. - * @param message exception message - */ - public ComponentDescriptorUnmarshallingException(String message) { - super(message); - } - - /** - * Construct a new ComponentDescriptorUnmarshallingException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentDescriptorUnmarshallingException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentImplementationNotFoundException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentImplementationNotFoundException.java deleted file mode 100644 index efa578293..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentImplementationNotFoundException.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - * - */ -public class ComponentImplementationNotFoundException extends Exception { - private static final long serialVersionUID = -9171668987729438489L; - - /** - * Construct a new ComponentImplementationNotFoundException instance. - * @param message exception message - */ - public ComponentImplementationNotFoundException(String message) { - super(message); - } - - /** - * Construct a new ComponentImplementationNotFoundException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentImplementationNotFoundException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLifecycleException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLifecycleException.java deleted file mode 100644 index b030be9c9..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLifecycleException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentLifecycleException extends Exception { - private static final long serialVersionUID = 146489359157036908L; - - /** - * Construct a new ComponentLifecycleException instance. - * @param message exception message - */ - public ComponentLifecycleException(String message) { - super(message); - } - - /** - * Construct a new ComponentLifecycleException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentLifecycleException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupException.java deleted file mode 100644 index 0cd7b2ece..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupException.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The exception which is thrown by a component repository when - * the requested component cannot be found. - * - * @author Jason van Zyl - */ -public class ComponentLookupException extends Exception { - private String LS = System.getProperty("line.separator"); - - private String role; - - private String roleHint; - - private ClassRealm realm; - - public ComponentLookupException(String message, String role, String roleHint) { - super(message); - - this.role = role; - - this.roleHint = roleHint; - } - - public ComponentLookupException(String message, String role, String roleHint, Throwable cause) { - super(message, cause); - - this.role = role; - - this.roleHint = roleHint; - } - - public ComponentLookupException(String message, String role, String roleHint, ClassRealm realm) { - super(message); - - this.role = role; - - this.roleHint = roleHint; - - this.realm = realm; - } - - public ComponentLookupException(String message, String role, String roleHint, ClassRealm realm, Throwable cause) { - super(message, cause); - - this.role = role; - - this.roleHint = roleHint; - - this.realm = realm; - } - - public String getMessage() { - StringBuilder sb = new StringBuilder() - .append(super.getMessage()) - .append(LS) - .append(" role: ") - .append(role) - .append(LS) - .append(" roleHint: ") - .append(roleHint) - .append(LS) - .append("classRealm: "); - - if (realm != null) { - sb.append(realm.getId()).append(LS); - ByteArrayOutputStream os = new ByteArrayOutputStream(1024); - PrintStream ps = new PrintStream(os); - realm.display(ps); - sb.append(os.toString()); - } else { - sb.append("none specified"); - } - - return sb.toString(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupRuntimeException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupRuntimeException.java deleted file mode 100644 index f544921ab..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLookupRuntimeException.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * The exception which is thrown by a component repository when - * the requested component cannot be found. - * - * @author Kristian Rosenvold - */ -public class ComponentLookupRuntimeException extends RuntimeException { - public ComponentLookupRuntimeException(ComponentLookupException cause) { - super(cause); - } - - public String getMessage() { - return getCause().getMessage(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentManagerImplementationNotFoundException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentManagerImplementationNotFoundException.java deleted file mode 100644 index a0bbda0a7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentManagerImplementationNotFoundException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentManagerImplementationNotFoundException extends Exception { - private static final long serialVersionUID = 2365017114180373632L; - - /** - * Construct a new ComponentManagerImplementationNotFoundException instance. - * @param message exception message - */ - public ComponentManagerImplementationNotFoundException(String message) { - super(message); - } - - /** - * Construct a new ComponentManagerImplementationNotFoundException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentManagerImplementationNotFoundException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentProfileException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentProfileException.java deleted file mode 100644 index 529af0c9c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentProfileException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentProfileException extends Exception { - private static final long serialVersionUID = -4099483467183306853L; - - /** - * Construct a new ComponentProfileException instance. - * @param message exception message - */ - public ComponentProfileException(String message) { - super(message); - } - - /** - * Construct a new ComponentProfileException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentProfileException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentRepositoryException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentRepositoryException.java deleted file mode 100644 index 3074821c7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentRepositoryException.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.repository.exception; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when the class(es) required for a component - * implementation are not available. - * - * @author Jason van Zyl - */ -public class ComponentRepositoryException extends Exception { - private static final long serialVersionUID = 3698017788731736736L; - - /** - * Construct a new ComponentRepositoryException instance. - * @param message exception message - */ - public ComponentRepositoryException(String message) { - super(message); - } - - /** - * Construct a new ComponentRepositoryException instance. - * @param message exception message - * @param cause causing exception to chain - */ - public ComponentRepositoryException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/io/PlexusTools.java b/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/io/PlexusTools.java deleted file mode 100644 index c7263ea87..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/component/repository/io/PlexusTools.java +++ /dev/null @@ -1,258 +0,0 @@ -package org.codehaus.plexus.component.repository.io; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.IOException; -import java.io.PrintStream; -import java.io.Reader; -import java.io.StringReader; -import java.util.LinkedList; -import java.util.List; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDependency; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.component.repository.ComponentRequirementList; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.configuration.io.XmlPlexusConfigurationReader; - -/** - * @author Jason van Zyl - */ -public class PlexusTools { - public static PlexusConfiguration buildConfiguration(String resourceName, Reader configuration) - throws PlexusConfigurationException { - try { - XmlPlexusConfigurationReader reader = new XmlPlexusConfigurationReader(); - - PlexusConfiguration result = reader.read(configuration); - - return result; - } catch (PlexusConfigurationException e) { - throw new PlexusConfigurationException( - "PlexusConfigurationException building configuration from: " + resourceName, e); - } catch (IOException e) { - throw new PlexusConfigurationException("IO error building configuration from: " + resourceName, e); - } - } - - public static PlexusConfiguration buildConfiguration(String configuration) throws PlexusConfigurationException { - return buildConfiguration("", new StringReader(configuration)); - } - - public static ComponentDescriptor buildComponentDescriptor(String configuration, ClassRealm realm) - throws PlexusConfigurationException { - return buildComponentDescriptor(buildConfiguration(configuration), realm); - } - - public static ComponentDescriptor buildComponentDescriptor(PlexusConfiguration configuration) - throws PlexusConfigurationException { - return buildComponentDescriptorImpl(configuration, null); - } - - public static ComponentDescriptor buildComponentDescriptor(PlexusConfiguration configuration, ClassRealm realm) - throws PlexusConfigurationException { - if (realm == null) { - throw new NullPointerException("realm is null"); - } - - return buildComponentDescriptorImpl(configuration, realm); - } - - private static ComponentDescriptor buildComponentDescriptorImpl( - PlexusConfiguration configuration, ClassRealm realm) throws PlexusConfigurationException { - String implementation = configuration.getChild("implementation").getValue(); - if (implementation == null) { - throw new PlexusConfigurationException("implementation is null"); - } - - ComponentDescriptor cd; - try { - if (realm != null) { - Class implementationClass = realm.loadClass(implementation); - cd = new ComponentDescriptor(implementationClass, realm); - } else { - cd = new ComponentDescriptor(); - cd.setImplementation(implementation); - } - } catch (Throwable e) { - throw new PlexusConfigurationException( - "Can not load implementation class " + implementation + " from realm " + realm, e); - } - - cd.setRole(configuration.getChild("role").getValue()); - - cd.setRoleHint(configuration.getChild("role-hint").getValue()); - - cd.setVersion(configuration.getChild("version").getValue()); - - cd.setComponentType(configuration.getChild("component-type").getValue()); - - cd.setInstantiationStrategy( - configuration.getChild("instantiation-strategy").getValue()); - - cd.setLifecycleHandler(configuration.getChild("lifecycle-handler").getValue()); - - cd.setComponentProfile(configuration.getChild("component-profile").getValue()); - - cd.setComponentComposer(configuration.getChild("component-composer").getValue()); - - cd.setComponentConfigurator( - configuration.getChild("component-configurator").getValue()); - - cd.setComponentFactory(configuration.getChild("component-factory").getValue()); - - cd.setDescription(configuration.getChild("description").getValue()); - - cd.setAlias(configuration.getChild("alias").getValue()); - - String s = configuration.getChild("isolated-realm").getValue(); - - if (s != null) { - cd.setIsolatedRealm(s.equals("true") ? true : false); - } - - // ---------------------------------------------------------------------- - // Here we want to look for directives for inlining external - // configurations. we probably want to take them from files or URLs. - // ---------------------------------------------------------------------- - - cd.setConfiguration(configuration.getChild("configuration")); - - // ---------------------------------------------------------------------- - // Requirements - // ---------------------------------------------------------------------- - - PlexusConfiguration[] requirements = - configuration.getChild("requirements").getChildren("requirement"); - - for (PlexusConfiguration requirement : requirements) { - ComponentRequirement cr; - - PlexusConfiguration[] hints = requirement.getChild("role-hints").getChildren("role-hint"); - if (hints != null && hints.length > 0) { - cr = new ComponentRequirementList(); - - List hintList = new LinkedList(); - for (PlexusConfiguration hint : hints) { - hintList.add(hint.getValue()); - } - - ((ComponentRequirementList) cr).setRoleHints(hintList); - } else { - cr = new ComponentRequirement(); - - cr.setRoleHint(requirement.getChild("role-hint").getValue()); - } - - cr.setRole(requirement.getChild("role").getValue()); - - cr.setOptional(Boolean.parseBoolean(requirement.getChild("optional").getValue())); - - cr.setFieldName(requirement.getChild("field-name").getValue()); - - cd.addRequirement(cr); - } - - return cd; - } - - public static ComponentSetDescriptor buildComponentSet(PlexusConfiguration c) throws PlexusConfigurationException { - return buildComponentSet(c, null); - } - - public static ComponentSetDescriptor buildComponentSet(PlexusConfiguration c, ClassRealm realm) - throws PlexusConfigurationException { - ComponentSetDescriptor csd = new ComponentSetDescriptor(); - - // ---------------------------------------------------------------------- - // Components - // ---------------------------------------------------------------------- - - PlexusConfiguration[] components = c.getChild("components").getChildren("component"); - - for (PlexusConfiguration component : components) { - csd.addComponentDescriptor(buildComponentDescriptorImpl(component, realm)); - } - - // ---------------------------------------------------------------------- - // Dependencies - // ---------------------------------------------------------------------- - - PlexusConfiguration[] dependencies = c.getChild("dependencies").getChildren("dependency"); - - for (PlexusConfiguration d : dependencies) { - ComponentDependency cd = new ComponentDependency(); - - cd.setArtifactId(d.getChild("artifact-id").getValue()); - - cd.setGroupId(d.getChild("group-id").getValue()); - - String type = d.getChild("type").getValue(); - if (type != null) { - cd.setType(type); - } - - cd.setVersion(d.getChild("version").getValue()); - - csd.addDependency(cd); - } - - return csd; - } - - public static void writeConfiguration(PrintStream out, PlexusConfiguration configuration) - throws PlexusConfigurationException { - writeConfiguration(out, configuration, ""); - } - - private static void writeConfiguration(PrintStream out, PlexusConfiguration configuration, String indent) - throws PlexusConfigurationException { - out.print(indent + "<" + configuration.getName()); - String[] atts = configuration.getAttributeNames(); - - if (atts.length > 0) { - for (String att : atts) { - out.print("\n" + indent + " " + att + "='" + configuration.getAttribute(att) + "'"); - } - } - - PlexusConfiguration[] pc = configuration.getChildren(); - - if ((configuration.getValue() != null && configuration.getValue().trim().length() > 0) || pc.length > 0) { - out.print(">" - + (configuration.getValue() == null - ? "" - : configuration.getValue().trim())); - - if (pc.length > 0) { - out.println(); - for (PlexusConfiguration aPc : pc) { - writeConfiguration(out, aPc, indent + " "); - } - out.print(indent); - } - - out.println(""); - } else { - out.println("/>"); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/DefaultPlexusConfiguration.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/DefaultPlexusConfiguration.java deleted file mode 100644 index bbad08ac7..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/DefaultPlexusConfiguration.java +++ /dev/null @@ -1,211 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -/** - */ -public class DefaultPlexusConfiguration implements PlexusConfiguration { - - private String name; - - private String value; - - private Map attributes; - - private Map> childMap; - - private List childList; - - protected DefaultPlexusConfiguration() { - this("configuration"); - } - - protected DefaultPlexusConfiguration(String name) { - this(name, null); - } - - protected DefaultPlexusConfiguration(String name, String value) { - super(); - - this.name = name; - - this.value = value; - - this.attributes = new LinkedHashMap(); - - this.childMap = new LinkedHashMap>(); - - this.childList = new ArrayList(); - } - - // ---------------------------------------------------------------------- - // Name handling - // ---------------------------------------------------------------------- - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - // ---------------------------------------------------------------------- - // Value handling - // ---------------------------------------------------------------------- - - public String getValue() { - return value; - } - - public String getValue(String defaultValue) { - String value = getValue(); - - if (value == null) { - value = defaultValue; - } - - return value; - } - - public void setValue(String val) { - value = val; - } - - public PlexusConfiguration setValueAndGetSelf(String val) { - setValue(val); - - return this; - } - - // ---------------------------------------------------------------------- - // Attribute handling - // ---------------------------------------------------------------------- - public void setAttribute(String name, String value) { - attributes.put(name, value); - } - - public String getAttribute(String name) { - return attributes.get(name); - } - - public String getAttribute(String name, String defaultValue) { - String value = getAttribute(name); - - if (value == null) { - value = defaultValue; - } - - return value; - } - - public String[] getAttributeNames() { - return attributes.keySet().toArray(new String[attributes.size()]); - } - - // ---------------------------------------------------------------------- - // Child handling - // ---------------------------------------------------------------------- - - public PlexusConfiguration getChild(String name) { - return getChild(name, true); - } - - public PlexusConfiguration getChild(int i) { - return childList.get(i); - } - - public PlexusConfiguration getChild(String name, boolean createChild) { - List childs = childMap.get(name); - - boolean noneFound = (childs == null || childs.size() == 0); - - if (noneFound && createChild) { - addChild(name); - - return getChild(name, false); - } else if (noneFound && !createChild) { - return null; - } else { - return childs.get(0); - } - } - - public PlexusConfiguration[] getChildren() { - return childList.toArray(new PlexusConfiguration[childList.size()]); - } - - public PlexusConfiguration[] getChildren(String name) { - List childs = new ArrayList(); - - List childList = childMap.get(name); - - if (childList != null) { - childs.addAll(childList); - } - - return childs.toArray(new PlexusConfiguration[childs.size()]); - } - - public void addChild(PlexusConfiguration child) { - childList.add(child); - - List children = childMap.get(child.getName()); - if (children == null) { - childMap.put(child.getName(), children = new ArrayList()); - } - - children.add(child); - } - - public PlexusConfiguration addChild(String name) { - // we are using reflection to try to create same class childs as parent is, - // since many Maven and Maven plugins stuff casts the incoming result of this call - // to the evil XmlPlexusConfiguration - PlexusConfiguration child = null; - - try { - child = getClass().newInstance(); - - child.setName(name); - } catch (Exception e) { - // we have a PlexusConfiguration that has no constructor(name) - child = new DefaultPlexusConfiguration(name); - } - - addChild(child); - - return this; - } - - public PlexusConfiguration addChild(String name, String value) { - PlexusConfiguration child = new DefaultPlexusConfiguration(name, value); - - addChild(child); - - return this; - } - - public int getChildCount() { - return this.childList.size(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusComponentDescriptorMerger.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusComponentDescriptorMerger.java deleted file mode 100644 index 286ee31d8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusComponentDescriptorMerger.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.codehaus.plexus.configuration; - -import java.io.IOException; -import java.io.StringReader; -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -/** - * - * @author Kenney Westerhof - * - */ -public class PlexusComponentDescriptorMerger { - /** - * Merges override and target, where target is updated with override. - * @param override {@link ComponentDescriptor} - * @param target {@link ComponentDescriptor}. - */ - public static void merge(ComponentDescriptor override, ComponentDescriptor target) { - if (override.getImplementation() != null) { - target.setImplementation(override.getImplementation()); - } - - mergeRequirements(override, target); - - mergeConfiguration(override, target); - - // TODO: other getters/setters. - } - - private static void mergeConfiguration(ComponentDescriptor override, ComponentDescriptor target) { - // try to parse the override dom. If this fails, do not update anything and keep - // the original target configuration. - Xpp3Dom overrideDom; - - try { - - overrideDom = Xpp3DomBuilder.build( - new StringReader(override.getConfiguration().toString())); - } catch (XmlPullParserException e1) { - return; - } catch (IOException e1) { - return; - } - - // try to parse the target dom. if this fails, replace it with the override configuration, - // dom, otherwise merge it. - - Xpp3Dom targetDom = null; - - if (target.getConfiguration() != null) { - try { - targetDom = Xpp3DomBuilder.build( - new StringReader(target.getConfiguration().toString())); - } catch (XmlPullParserException e1) { - } catch (IOException e1) { - } - } - - if (targetDom != null) { - Xpp3Dom.mergeXpp3Dom(overrideDom, targetDom); - } else { - targetDom = overrideDom; - } - - target.setConfiguration(new XmlPlexusConfiguration(targetDom)); - } - - private static void mergeRequirements(ComponentDescriptor override, ComponentDescriptor target) { - List toAdd = new ArrayList(); - List toRemove = new ArrayList(); - - for (ComponentRequirement sourceReq : override.getRequirements()) { - for (ComponentRequirement targetReq : target.getRequirements()) { - // if a fieldName is specified, only override target requirements - // that also have a fieldname. - if (sourceReq.getFieldName() != null) { - if (sourceReq.getFieldName().equals(targetReq.getFieldName())) { - toRemove.add(targetReq); - toAdd.add(sourceReq); - break; - } - } else if (targetReq.getFieldName() == null) { - // no fieldnames specified - just check for the role; hints may be - // overriden too. - - if (sourceReq.getRole().equals(targetReq.getRole())) { - toRemove.add(targetReq); - toAdd.add(sourceReq); - } - } - } - } - - target.removeRequirements(toRemove); - target.addRequirements(toAdd); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfiguration.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfiguration.java deleted file mode 100644 index d68924fda..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfiguration.java +++ /dev/null @@ -1,176 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A configuration data hierarchy for configuring aspects of plexus. For - * example, to populate a ComponentDescriptor. Implementation of - * PlexusConfiguration may be populated by any means, for example, by XML file. - */ -public interface PlexusConfiguration { - // ---------------------------------------------------------------------- - // Name handling - // ---------------------------------------------------------------------- - - /** - * Returns the name of this configuration. - * @return the name of this configuration - */ - String getName(); - - /** - * Sets the name of this configuration. - * @param name The name of the configuration. - */ - void setName(String name); - - // ---------------------------------------------------------------------- - // Value handling - // ---------------------------------------------------------------------- - - /** - * Returns the value of this configuration. - * @return the value of this configuration - * @throws PlexusConfigurationException in case of an error. - */ - String getValue() throws PlexusConfigurationException; - - /** - * Returns the value of this configuration, or default if one cannot be - * found. - * @param defaultValue value to return if none is found - * @return the value of this configuration - */ - String getValue(String defaultValue); - - /** - * Set the value of a configuration element. - * @param value The value of the configuration element. - */ - void setValue(String value); - - /** - * Set the value of a configuration element and return the PlexusConfiguration object - * so that further operations can be carried out. - * @param value set the value. - * @return {@link PlexusConfiguration} - */ - PlexusConfiguration setValueAndGetSelf(String value); - - // ---------------------------------------------------------------------- - // Attribute handling - // ---------------------------------------------------------------------- - - /** - * Sets an attribute on this configuration. - * @param name name of the attribute - * @param value the value of the attribute. - */ - void setAttribute(String name, String value); - - /** - * Returns an array of attribute names. - * @return an array of attribute names - */ - String[] getAttributeNames(); - - /** - * Returns the value of the named attribute. - * @param paramName The name of the attribute. - * @return the value of the named attribute - * @throws PlexusConfigurationException in case of an error. - */ - String getAttribute(String paramName) throws PlexusConfigurationException; - - /** - * Returns the value of the named attribute, or default if one cannot be - * found. - * @param name The name of the attribute. - * @param defaultValue value to return if none is found - * @return the value of the named attribute - */ - String getAttribute(String name, String defaultValue); - - // ---------------------------------------------------------------------- - // Child handling - // ---------------------------------------------------------------------- - - /** - * Returns the child configuration of the given name. - * @param child the name of the child to return - * @return the child configuration of the given name - */ - PlexusConfiguration getChild(String child); - - /** - * Returns the child configuration at the given location. - * @param i the position of the child under this configuration - * @return the child configuration at the given location - */ - PlexusConfiguration getChild(int i); - - /** - * Returns the child configuration of the given name. - * @param child the name of the child to return - * @param createChild true if a new child should be create, if none found - * @return the child configuration of the given name, or new child if - * created - */ - PlexusConfiguration getChild(String child, boolean createChild); - - /** - * Returns an array of all child configurations. - * @return an array of all child configurations - */ - PlexusConfiguration[] getChildren(); - - /** - * Returns an array of all child configurations with the given name. - * @param name the name of the children configurations to return - * @return an array of all child configurations with the given name - */ - PlexusConfiguration[] getChildren(String name); - - /** - * Adds a configuration under this configuration, which acts as - * a parent. - * @param configuration the child configuration to add - */ - void addChild(PlexusConfiguration configuration); - - /** - * Add a child element with a given name and return the newly created element. - * @param name The name of the element. - * @return {@link PlexusConfiguration} - */ - PlexusConfiguration addChild(String name); - - /** - * Add a child element with a given name, and given value and return the - * newly created element. - * @param name The name of the child element. - * @param value The value of the child element. - * @return {@link PlexusConfiguration} - */ - PlexusConfiguration addChild(String name, String value); - - /** - * Returns the number of directly children under this configuration. - * @return the number of directly children under this configuration. - */ - int getChildCount(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationException.java deleted file mode 100644 index 69e84fd93..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationException.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception that is thrown when an expected configuration value encounters - * problems loading correctly. - */ -public class PlexusConfigurationException extends Exception { - private static final long serialVersionUID = 7559886640184983689L; - - /** - * Construct a new PlexusConfigurationException instance. - * @param message exception message - */ - public PlexusConfigurationException(String message) { - this(message, null); - } - - /** - * Construct a new PlexusConfigurationException instance. - * @param message exception message - * @param throwable causing exception to chain - */ - public PlexusConfigurationException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationMerger.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationMerger.java deleted file mode 100644 index ab782da05..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationMerger.java +++ /dev/null @@ -1,309 +0,0 @@ -package org.codehaus.plexus.configuration; - -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * TODO: This merger explicity uses the XML implementation of the plexus configuration but - * it must work for configurations coming from any source. - */ -public class PlexusConfigurationMerger { - // -----------------------------------+----------------------------------------------------------------- - // E L E M E N T | - // -----------------------------------+----------------------------------------------------------------- - // load-on-start | user - // -----------------------------------+----------------------------------------------------------------- - // system-properties | user - // -----------------------------------+----------------------------------------------------------------- - // configurations-directory | user - // -----------------------------------+----------------------------------------------------------------- - // logging | user wins - // -----------------------------------+----------------------------------------------------------------- - // component-repository | user wins - // -----------------------------------+----------------------------------------------------------------- - // resources | user wins, but system resources show through - // -----------------------------------+----------------------------------------------------------------- - // component-manager-manager | user wins, but system resources show through - // -----------------------------------+----------------------------------------------------------------- - // component-discoverer-manager | user wins, but system resources show through - // -----------------------------------+----------------------------------------------------------------- - // component-factory-manager | user wins, but system resources show through - // -----------------------------------+----------------------------------------------------------------- - // lifecycle-handler-manager | user wins, but system lifecycles show through - // -----------------------------------+----------------------------------------------------------------- - // component-composer-manager | user wins, but system lifecycles show through - // -----------------------------------+----------------------------------------------------------------- - // components | user - // -----------------------------------+----------------------------------------------------------------- - - public static PlexusConfiguration merge(PlexusConfiguration user, PlexusConfiguration system) { - PlexusConfiguration mergedConfiguration = new XmlPlexusConfiguration("plexus"); - - // ---------------------------------------------------------------------- - // Load on start - // ---------------------------------------------------------------------- - - PlexusConfiguration loadOnStart = user.getChild("load-on-start"); - - if (loadOnStart.getChildCount() != 0) { - mergedConfiguration.addChild(loadOnStart); - } - - // ---------------------------------------------------------------------- - // System properties - // ---------------------------------------------------------------------- - - PlexusConfiguration systemProperties = user.getChild("system-properties"); - - if (systemProperties.getChildCount() != 0) { - mergedConfiguration.addChild(systemProperties); - } - - // ---------------------------------------------------------------------- - // Configurations directory - // ---------------------------------------------------------------------- - - PlexusConfiguration[] configurationsDirectories = user.getChildren("configurations-directory"); - - if (configurationsDirectories.length != 0) { - for (PlexusConfiguration configurationsDirectory : configurationsDirectories) { - mergedConfiguration.addChild(configurationsDirectory); - } - } - - // ---------------------------------------------------------------------- - // Logging - // ---------------------------------------------------------------------- - - PlexusConfiguration logging = user.getChild("logging"); - - if (logging.getChildCount() != 0) { - mergedConfiguration.addChild(logging); - } else { - mergedConfiguration.addChild(system.getChild("logging")); - } - - // ---------------------------------------------------------------------- - // Container initialization phases - // ---------------------------------------------------------------------- - - mergedConfiguration.addChild(system.getChild("container-initialization")); - - mergedConfiguration.addChild(system.getChild("component-lookup-manager")); - - // ---------------------------------------------------------------------- - // Component repository - // ---------------------------------------------------------------------- - - PlexusConfiguration componentRepository = user.getChild("component-repository"); - - if (componentRepository.getChildCount() != 0) { - mergedConfiguration.addChild(componentRepository); - } else { - mergedConfiguration.addChild(system.getChild("component-repository")); - } - - // ---------------------------------------------------------------------- - // Resources - // ---------------------------------------------------------------------- - - copyResources(system, mergedConfiguration); - - copyResources(user, mergedConfiguration); - - // ---------------------------------------------------------------------- - // Component manager manager - // ---------------------------------------------------------------------- - - PlexusConfiguration componentManagerManager = user.getChild("component-manager-manager"); - - if (componentManagerManager.getChildCount() != 0) { - mergedConfiguration.addChild(componentManagerManager); - - copyComponentManagers(system.getChild("component-manager-manager"), componentManagerManager); - } else { - mergedConfiguration.addChild(system.getChild("component-manager-manager")); - } - - // ---------------------------------------------------------------------- - // Component discoverer manager - // ---------------------------------------------------------------------- - - PlexusConfiguration componentDiscovererManager = user.getChild("component-discoverer-manager"); - - if (componentDiscovererManager.getChildCount() != 0) { - mergedConfiguration.addChild(componentDiscovererManager); - - copyComponentDiscoverers(system.getChild("component-discoverer-manager"), componentDiscovererManager); - } else { - mergedConfiguration.addChild(system.getChild("component-discoverer-manager")); - } - - // ---------------------------------------------------------------------- - // Component factory manager - // ---------------------------------------------------------------------- - - PlexusConfiguration componentFactoryManager = user.getChild("component-factory-manager"); - - if (componentFactoryManager.getChildCount() != 0) { - mergedConfiguration.addChild(componentFactoryManager); - - copyComponentFactories(system.getChild("component-factory-manager"), componentFactoryManager); - } else { - mergedConfiguration.addChild(system.getChild("component-factory-manager")); - } - - // ---------------------------------------------------------------------- - // Lifecycle handler managers - // ---------------------------------------------------------------------- - - PlexusConfiguration lifecycleHandlerManager = user.getChild("lifecycle-handler-manager"); - - if (lifecycleHandlerManager.getChildCount() != 0) { - mergedConfiguration.addChild(lifecycleHandlerManager); - - copyLifecycles(system.getChild("lifecycle-handler-manager"), lifecycleHandlerManager); - } else { - mergedConfiguration.addChild(system.getChild("lifecycle-handler-manager")); - } - - // ---------------------------------------------------------------------- - // Component factory manager - // ---------------------------------------------------------------------- - - PlexusConfiguration componentComposerManager = user.getChild("component-composer-manager"); - - if (componentComposerManager.getChildCount() != 0) { - mergedConfiguration.addChild(componentComposerManager); - - copyComponentComposers(system.getChild("component-composer-manager"), componentComposerManager); - } else { - mergedConfiguration.addChild(system.getChild("component-composer-manager")); - } - - // ---------------------------------------------------------------------- - // Components - // ---------------------------------------------------------------------- - // We grab the system components first and then add the user defined - // components so that user defined components will win. When component - // descriptors are processed the last definition wins because the component - // descriptors are stored in a Map in the component repository. - // ---------------------------------------------------------------------- - - PlexusConfiguration components = system.getChild("components"); - - mergedConfiguration.addChild(components); - - copyComponents(user.getChild("components"), components); - - return mergedConfiguration; - } - - private static void copyResources(PlexusConfiguration source, PlexusConfiguration destination) { - PlexusConfiguration handlers[] = source.getChild("resources").getChildren(); - - PlexusConfiguration dest = destination.getChild("resources"); - - for (PlexusConfiguration handler : handlers) { - dest.addChild(handler); - } - } - - private static void copyComponentManagers(PlexusConfiguration source, PlexusConfiguration destination) { - try { - PlexusConfiguration id = destination.getChild("default-component-manager-id"); - - String sid = source.getChild("default-component-manager-id").getValue(); - - if (id.getValue() == null) { - id.setValue(sid); - } - } catch (PlexusConfigurationException e) { - // do nothing - } - - PlexusConfiguration handlers[] = source.getChild("component-managers").getChildren("component-manager"); - - PlexusConfiguration dest = destination.getChild("component-managers"); - - for (PlexusConfiguration handler : handlers) { - dest.addChild(handler); - } - } - - private static void copyComponentDiscoverers(PlexusConfiguration source, PlexusConfiguration destination) { - PlexusConfiguration handlers[] = - source.getChild("component-discoverers").getChildren("component-discoverer"); - - PlexusConfiguration dest = destination.getChild("component-discoverers"); - - for (PlexusConfiguration handler : handlers) { - dest.addChild(handler); - } - } - - private static void copyComponentFactories(PlexusConfiguration source, PlexusConfiguration destination) { - PlexusConfiguration handlers[] = source.getChild("component-factories").getChildren("component-factory"); - - PlexusConfiguration dest = destination.getChild("component-factories"); - - for (PlexusConfiguration handler : handlers) { - dest.addChild(handler); - } - } - - private static void copyComponentComposers(PlexusConfiguration source, PlexusConfiguration destination) { - try { - PlexusConfiguration id = destination.getChild("default-component-composer-id"); - - String sid = source.getChild("default-component-composer-id").getValue(); - - if (id.getValue() == null) { - id.setValue(sid); - } - } catch (PlexusConfigurationException e) { - // do nothing - } - - PlexusConfiguration composers[] = source.getChild("component-composers").getChildren("component-composer"); - - PlexusConfiguration dest = destination.getChild("component-composers"); - - for (PlexusConfiguration composer : composers) { - dest.addChild(composer); - } - } - - private static void copyLifecycles(PlexusConfiguration source, PlexusConfiguration destination) { - PlexusConfiguration handlers[] = source.getChild("lifecycle-handlers").getChildren("lifecycle-handler"); - - PlexusConfiguration dest = destination.getChild("lifecycle-handlers"); - - for (PlexusConfiguration handler : handlers) { - dest.addChild(handler); - } - } - - private static void copyComponents(PlexusConfiguration source, PlexusConfiguration destination) { - PlexusConfiguration components[] = source.getChildren("component"); - - for (PlexusConfiguration component : components) { - destination.addChild(component); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationResourceException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationResourceException.java deleted file mode 100644 index 3573560ab..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationResourceException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class PlexusConfigurationResourceException extends Exception { - public PlexusConfigurationResourceException(String message) { - super(message); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationReader.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationReader.java deleted file mode 100644 index 8a93b239d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationReader.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; - -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -public interface PlexusConfigurationReader { - public PlexusConfiguration read(Reader reader) throws IOException, PlexusConfigurationException; - - public PlexusConfiguration read(InputStream inputStream) throws IOException, PlexusConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationWriter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationWriter.java deleted file mode 100644 index 1eb1df0ae..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/PlexusConfigurationWriter.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public interface PlexusConfigurationWriter { - void write(Writer writer, PlexusConfiguration configuration) throws IOException; - - void write(OutputStream outputStream, PlexusConfiguration configuration) throws IOException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReader.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReader.java deleted file mode 100644 index dd19a99b8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReader.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; - -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; -import org.codehaus.plexus.util.xml.pull.XmlPullParserException; - -public class XmlPlexusConfigurationReader implements PlexusConfigurationReader { - - public PlexusConfiguration read(InputStream inputStream) throws IOException, PlexusConfigurationException { - return read(new InputStreamReader(inputStream)); - } - - public PlexusConfiguration read(Reader reader) throws IOException, PlexusConfigurationException { - try { - Xpp3Dom dom = Xpp3DomBuilder.build(reader); - - return new XmlPlexusConfiguration(dom); - } catch (XmlPullParserException e) { - throw new PlexusConfigurationException( - "Failed to parse configuration resource!\nError was: \'" + e.getLocalizedMessage() + "\'", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriter.java deleted file mode 100644 index 7221981bf..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriter.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Writer; - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public class XmlPlexusConfigurationWriter implements PlexusConfigurationWriter { - - public void write(OutputStream outputStream, PlexusConfiguration configuration) throws IOException { - write(new OutputStreamWriter(outputStream), configuration); - } - - public void write(Writer writer, PlexusConfiguration configuration) throws IOException { - int depth = 0; - - display(configuration, writer, depth); - } - - private void display(PlexusConfiguration c, Writer w, int depth) throws IOException { - int count = c.getChildCount(); - - if (count == 0) { - displayTag(c, w, depth); - } else { - indent(depth, w); - w.write('<'); - w.write(c.getName()); - - attributes(c, w); - - w.write('>'); - w.write('\n'); - - for (int i = 0; i < count; i++) { - PlexusConfiguration child = c.getChild(i); - - display(child, w, depth + 1); - } - - indent(depth, w); - w.write('<'); - w.write('/'); - w.write(c.getName()); - w.write('>'); - w.write('\n'); - } - } - - private void displayTag(PlexusConfiguration c, Writer w, int depth) throws IOException { - String value = c.getValue(null); - - if (value != null) { - indent(depth, w); - w.write('<'); - w.write(c.getName()); - - attributes(c, w); - - w.write('>'); - w.write(c.getValue(null)); - w.write('<'); - w.write('/'); - w.write(c.getName()); - w.write('>'); - w.write('\n'); - } else { - indent(depth, w); - w.write('<'); - w.write(c.getName()); - - attributes(c, w); - - w.write('/'); - w.write('>'); - w.write("\n"); - } - } - - private void attributes(PlexusConfiguration c, Writer w) throws IOException { - String[] names = c.getAttributeNames(); - - for (String name : names) { - w.write(' '); - w.write(name); - w.write('='); - w.write('"'); - w.write(c.getAttribute(name, null)); - w.write('"'); - } - } - - private void indent(int depth, Writer w) throws IOException { - for (int i = 0; i < depth; i++) { - w.write(' '); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ChainedConfigurationSource.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ChainedConfigurationSource.java deleted file mode 100644 index 09fc5934b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ChainedConfigurationSource.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import java.util.List; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * A configuration source that delegates to any number of underlying configuration sources. If you are an application - * author and want to create a custom source of configuration for the components in your application then you would most - * likely want to create a chained configuration source where you can decide the order of processing, but still have the - * container perform its default behavior. - * - * @author Jason van Zyl - */ -public class ChainedConfigurationSource implements ConfigurationSource { - private List configurationSources; - - public ChainedConfigurationSource(List configurationSources) { - this.configurationSources = configurationSources; - } - - public PlexusConfiguration getConfiguration(ComponentDescriptor componentDescriptor) { - for (Object configurationSource1 : configurationSources) { - ConfigurationSource configurationSource = (ConfigurationSource) configurationSource1; - - PlexusConfiguration configuration = configurationSource.getConfiguration(componentDescriptor); - - if (configuration != null) { - return configuration; - } - } - - return null; - } - - public List getConfigurationSources() { - return configurationSources; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ConfigurationSource.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ConfigurationSource.java deleted file mode 100644 index 25ec1f765..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ConfigurationSource.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * A source for component configurations which may reside outside the configuration within a component descriptor. A - * common usecase for this is to create a unified configuration for a set of components. For an application it is more - * convenient to present the user with a single configuration, instead of making users work directly with a Plexus - * configuration file which exposes component details including implementation, and wiring information. - * - * @author Jason van Zyl - */ -public interface ConfigurationSource { - String ROLE = ConfigurationSource.class.getName(); - - PlexusConfiguration getConfiguration(ComponentDescriptor componentDescriptor); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ContainerConfigurationSource.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ContainerConfigurationSource.java deleted file mode 100644 index 63ae94f1f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/source/ContainerConfigurationSource.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** @author Jason van Zyl */ -public class ContainerConfigurationSource implements ConfigurationSource { - public PlexusConfiguration getConfiguration(ComponentDescriptor componentDescriptor) { - if (componentDescriptor.hasConfiguration()) { - return componentDescriptor.getConfiguration(); - } - - return null; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfiguration.java b/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfiguration.java deleted file mode 100644 index 05825fcac..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfiguration.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.plexus.configuration.xml; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.IOException; -import java.io.StringWriter; - -import org.codehaus.plexus.configuration.DefaultPlexusConfiguration; -import org.codehaus.plexus.configuration.io.XmlPlexusConfigurationWriter; -import org.codehaus.plexus.util.xml.Xpp3Dom; - -/** - */ -public class XmlPlexusConfiguration extends DefaultPlexusConfiguration { - public XmlPlexusConfiguration() { - super(); - } - - public XmlPlexusConfiguration(String name) { - super(name); - } - - public XmlPlexusConfiguration(String name, String value) { - super(name, value); - } - - public XmlPlexusConfiguration(Xpp3Dom dom) { - super(dom.getName(), dom.getValue()); - - // attrs - String[] attributes = dom.getAttributeNames(); - - for (String attribute : attributes) { - setAttribute(attribute, dom.getAttribute(attribute)); - } - - // children - int childCount = dom.getChildCount(); - for (int i = 0; i < childCount; i++) { - addChild(new XmlPlexusConfiguration(dom.getChild(i))); - } - } - - // ---------------------------------------------------------------------- - // - // ---------------------------------------------------------------------- - - public String toString() { - StringWriter sw = new StringWriter(); - - XmlPlexusConfigurationWriter xw = new XmlPlexusConfigurationWriter(); - - try { - xw.write(sw, this); - } catch (IOException e) { - // will not happen with StringWriter - } - - return sw.toString(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractContainerInitializationPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractContainerInitializationPhase.java deleted file mode 100644 index 69b656b14..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractContainerInitializationPhase.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - */ -public abstract class AbstractContainerInitializationPhase implements ContainerInitializationPhase {} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractCoreComponentInitializationPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractCoreComponentInitializationPhase.java deleted file mode 100644 index fd6709d46..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/AbstractCoreComponentInitializationPhase.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** @author Jason van Zyl */ -public abstract class AbstractCoreComponentInitializationPhase extends AbstractContainerInitializationPhase { - public void execute(ContainerInitializationContext context) throws ContainerInitializationException { - initializeCoreComponent(context); - } - - protected abstract void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationContext.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationContext.java deleted file mode 100644 index c2536e4cb..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationContext.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.ContainerConfiguration; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - */ -public class ContainerInitializationContext { - private DefaultPlexusContainer container; - - ClassWorld classWorld; - - ClassRealm containerRealm; - - PlexusConfiguration containerXmlConfiguration; - - ContainerConfiguration containerConfiguration; - - public ContainerInitializationContext( - DefaultPlexusContainer container, - ClassWorld classWorld, - ClassRealm containerRealm, - PlexusConfiguration configuration, - ContainerConfiguration containerConfiguration) { - this.container = container; - - this.classWorld = classWorld; - - this.containerRealm = containerRealm; - - this.containerXmlConfiguration = configuration; - - this.containerConfiguration = containerConfiguration; - } - - public DefaultPlexusContainer getContainer() { - return container; - } - - public ClassWorld getClassWorld() { - return classWorld; - } - - public ClassRealm getContainerRealm() { - return containerRealm; - } - - public PlexusConfiguration getContainerXmlConfiguration() { - return containerXmlConfiguration; - } - - public ContainerConfiguration getContainerConfiguration() { - return containerConfiguration; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationException.java deleted file mode 100644 index 9571143e9..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationException.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - */ -public class ContainerInitializationException extends Exception { - public ContainerInitializationException(String id) { - super(id); - } - - public ContainerInitializationException(String id, Throwable throwable) { - super(id, throwable); - } - - public ContainerInitializationException(Throwable throwable) { - super(throwable); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationPhase.java deleted file mode 100644 index cc030d93d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/ContainerInitializationPhase.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - */ -public interface ContainerInitializationPhase { - String ROLE = ContainerInitializationPhase.class.getName(); - - void execute(ContainerInitializationContext context) throws ContainerInitializationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentDiscovererManagerPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentDiscovererManagerPhase.java deleted file mode 100644 index 22e85fe6a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentDiscovererManagerPhase.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.component.discovery.ComponentDiscovererManager; -import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener; - -/** - * @author Jason van Zyl - */ -public class InitializeComponentDiscovererManagerPhase extends AbstractCoreComponentInitializationPhase { - public void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException { - ComponentDiscovererManager componentDiscovererManager = - context.getContainerConfiguration().getComponentDiscovererManager(); - - context.getContainer().setComponentDiscovererManager(componentDiscovererManager); - - for (ComponentDiscoveryListener listener : - componentDiscovererManager.getComponentDiscoveryListeners().keySet()) { - try { - // This is a hack until we have completely live components - - context.getContainer() - .addComponent(listener, listener.getClass().getName()); - - context.getContainer().getComponentDiscovererManager().removeComponentDiscoveryListener(listener); - - ComponentDiscoveryListener cdl = context.getContainer().lookup(listener.getClass()); - - context.getContainer().getComponentDiscovererManager().registerComponentDiscoveryListener(cdl); - } catch (Exception e) { - throw new ContainerInitializationException("Error initializing component discovery listener.", e); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentFactoryManagerPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentFactoryManagerPhase.java deleted file mode 100644 index a02de88ec..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentFactoryManagerPhase.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.component.factory.ComponentFactoryManager; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; - -/** - * @author Jason van Zyl - */ -public class InitializeComponentFactoryManagerPhase extends AbstractCoreComponentInitializationPhase { - public void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException { - ComponentFactoryManager componentFactoryManager = - context.getContainerConfiguration().getComponentFactoryManager(); - - if (componentFactoryManager instanceof Contextualizable) { - // TODO: this is wrong here jvz. - context.getContainer().getContext().put(PlexusConstants.PLEXUS_KEY, context.getContainer()); - - try { - ((Contextualizable) componentFactoryManager) - .contextualize(context.getContainer().getContext()); - } catch (ContextException e) { - throw new ContainerInitializationException("Error contextualization component factory manager.", e); - } - } - - context.getContainer().setComponentFactoryManager(componentFactoryManager); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentRegistryPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentRegistryPhase.java deleted file mode 100644 index 8188c8624..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeComponentRegistryPhase.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.ComponentRegistry; -import org.codehaus.plexus.DefaultComponentRegistry; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.manager.PerLookupComponentManagerFactory; -import org.codehaus.plexus.component.manager.SingletonComponentManagerFactory; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRepository; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.lifecycle.LifecycleHandlerManager; - -/** - * @author Jason van Zyl - */ -public class InitializeComponentRegistryPhase implements ContainerInitializationPhase { - public void execute(ContainerInitializationContext context) throws ContainerInitializationException { - ComponentRepository repository = getComponentRepository(context); - - LifecycleHandlerManager lifecycleHandlerManager = getLifecycleHandlerManager(context); - - ComponentRegistry componentRegistry = - new DefaultComponentRegistry(context.getContainer(), repository, lifecycleHandlerManager); - - componentRegistry.registerComponentManagerFactory(new PerLookupComponentManagerFactory()); - - componentRegistry.registerComponentManagerFactory(new SingletonComponentManagerFactory()); - - context.getContainer().setComponentRegistry(componentRegistry); - } - - private ComponentRepository getComponentRepository(ContainerInitializationContext context) - throws ContainerInitializationException { - ComponentRepository repository = context.getContainerConfiguration().getComponentRepository(); - - // Add the components defined in the container xml configuration - try { - PlexusConfiguration configuration = context.getContainerXmlConfiguration(); - - PlexusConfiguration[] componentConfigurations = - configuration.getChild("components").getChildren("component"); - for (PlexusConfiguration componentConfiguration : componentConfigurations) { - ComponentDescriptor componentDescriptor = PlexusTools.buildComponentDescriptor( - componentConfiguration, context.getContainer().getContainerRealm()); - componentDescriptor.setRealm(context.getContainer().getContainerRealm()); - repository.addComponentDescriptor(componentDescriptor); - } - } catch (PlexusConfigurationException e) { - throw new ContainerInitializationException( - "Error initializing component repository: " + "Cannot unmarshall component descriptor: ", e); - } catch (CycleDetectedInComponentGraphException e) { - throw new ContainerInitializationException( - "A cycle has been detected in the components of the system: ", e); - } - - return repository; - } - - private LifecycleHandlerManager getLifecycleHandlerManager(ContainerInitializationContext context) { - LifecycleHandlerManager lifecycleHandlerManager = - context.getContainerConfiguration().getLifecycleHandlerManager(); - lifecycleHandlerManager.initialize(); - return lifecycleHandlerManager; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeContainerConfigurationSourcePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeContainerConfigurationSourcePhase.java deleted file mode 100644 index d7877716c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeContainerConfigurationSourcePhase.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.configuration.source.ConfigurationSource; -import org.codehaus.plexus.configuration.source.ContainerConfigurationSource; - -/** - * @author Jason van Zyl - * @author cstamas - */ -public class InitializeContainerConfigurationSourcePhase extends AbstractCoreComponentInitializationPhase { - public void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException { - ConfigurationSource configurationSource = context.getContainer().getConfigurationSource(); - - // ---------------------------------------------------------------------- - // The configurationSource may have been set programmatically so we need - // to check. If it hasn't then we will add the default container config source. - // ---------------------------------------------------------------------- - - if (configurationSource == null) { - // adding default source for container to enable lookups - context.getContainer().setConfigurationSource(new ContainerConfigurationSource()); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeLoggerManagerPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeLoggerManagerPhase.java deleted file mode 100644 index 5f635f9fc..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeLoggerManagerPhase.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -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.logging.LoggerManager; -import org.codehaus.plexus.logging.console.ConsoleLoggerManager; - -/** @author Jason van Zyl */ -public class InitializeLoggerManagerPhase extends AbstractCoreComponentInitializationPhase { - public void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException { - LoggerManager loggerManager = context.getContainer().getLoggerManager(); - - // ---------------------------------------------------------------------- - // The logger manager may have been set programmatically so we need - // to check. If it hasn't then we will try to look up a logger manager - // that may have been specified in the plexus.xml file. If that doesn't - // work then we'll programmatcially stuff in the console logger. - // ---------------------------------------------------------------------- - - if (loggerManager == null) { - try { - loggerManager = context.getContainer().lookup(LoggerManager.class); - } catch (ComponentLookupException e) { - ComponentDescriptor cd = new ComponentDescriptor(); - - cd.setRole(LoggerManager.ROLE); - - cd.setRoleHint(PlexusConstants.PLEXUS_DEFAULT_HINT); - - cd.setImplementation(ConsoleLoggerManager.class.getName()); - - try { - context.getContainer().addComponentDescriptor(cd); - } catch (CycleDetectedInComponentGraphException cre) { - throw new ContainerInitializationException("Error setting up logging manager.", cre); - } - - loggerManager = new ConsoleLoggerManager("info"); - } - - context.getContainer().setLoggerManager(loggerManager); - } - - Logger logger = loggerManager.getLoggerForComponent(PlexusContainer.class.getName()); - - context.getContainer().enableLogging(logger); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeSystemPropertiesPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeSystemPropertiesPhase.java deleted file mode 100644 index 52b2ebdff..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeSystemPropertiesPhase.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Jason van Zyl - */ -public class InitializeSystemPropertiesPhase extends AbstractContainerInitializationPhase { - public void execute(ContainerInitializationContext context) throws ContainerInitializationException { - PlexusConfiguration[] systemProperties = context.getContainerXmlConfiguration() - .getChild("system-properties") - .getChildren("property"); - - for (PlexusConfiguration systemProperty : systemProperties) { - String name = systemProperty.getAttribute("name", null); - - String value = systemProperty.getAttribute("value", null); - - if (name == null) { - throw new ContainerInitializationException("Missing 'name' attribute in 'property' tag. "); - } - - if (value == null) { - throw new ContainerInitializationException("Missing 'value' attribute in 'property' tag. "); - } - - System.getProperties().setProperty(name, value); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeUserConfigurationSourcePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeUserConfigurationSourcePhase.java deleted file mode 100644 index 7d6a0461b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/container/initialization/InitializeUserConfigurationSourcePhase.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.codehaus.plexus.container.initialization; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.component.composition.CycleDetectedInComponentGraphException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.source.ChainedConfigurationSource; -import org.codehaus.plexus.configuration.source.ConfigurationSource; - -/** - * @author Jason van Zyl - * @author cstamas - */ -public class InitializeUserConfigurationSourcePhase extends AbstractCoreComponentInitializationPhase { - public void initializeCoreComponent(ContainerInitializationContext context) - throws ContainerInitializationException { - ConfigurationSource existingConfigurationSource = context.getContainer().getConfigurationSource(); - - try { - // is the user overriding the ConfigurationSource (role-hint: default) or only extending it? - if (context.getContainer().hasComponent(ConfigurationSource.class, PlexusConstants.PLEXUS_DEFAULT_HINT)) { - // overriding - - ConfigurationSource cs = context.getContainer().lookup(ConfigurationSource.class); - - // swap the user provided configuration source with current one - context.getContainer().setConfigurationSource(cs); - } else { - // extending - List userConfigurationSources = - context.getContainer().lookupList(ConfigurationSource.class); - - if (userConfigurationSources.size() > 0) { - List configurationSources = - new ArrayList(userConfigurationSources.size() + 1); - - // adding user provied ones to be able to interfere - configurationSources.addAll(userConfigurationSources); - - // at the end adding the container source, to make sure config will be returned - // from plexus.xml if no user interference is given - configurationSources.add(existingConfigurationSource); - - ConfigurationSource configurationSource = new ChainedConfigurationSource(configurationSources); - - context.getContainer().setConfigurationSource(configurationSource); - } - - // register the default source, either the chained or the existing one as default - ComponentDescriptor cd = new ComponentDescriptor(); - - cd.setRole(ConfigurationSource.ROLE); - - cd.setRoleHint(PlexusConstants.PLEXUS_DEFAULT_HINT); - - cd.setImplementationClass( - context.getContainer().getConfigurationSource().getClass()); - - try { - context.getContainer().addComponentDescriptor(cd); - } catch (CycleDetectedInComponentGraphException cre) { - throw new ContainerInitializationException("Error setting up configuration source.", cre); - } - } - - } catch (ComponentLookupException e) { - throw new ContainerInitializationException("Error setting up user configuration source.", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/context/Context.java b/plexus-container-default/src/main/java/org/codehaus/plexus/context/Context.java deleted file mode 100644 index c03373590..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/context/Context.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.codehaus.plexus.context; - -import java.util.Map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Context is a Map of arbitrary data associated with the container. - */ -public interface Context { - /** - * Returns true if this context contains a value for the specified key. - * - * @param key the key to search - * @return true if the key was found; false otherwise - */ - boolean contains(Object key); - - /** - * Returns the value of the key. If the key can't be found it will throw a exception. - * - * @param key the key of the value to look up. - * @return returns the value associated with the key - * @throws ContextException if the key doesn't exist - */ - Object get(Object key) throws ContextException; - - /** - * Utility method to retrieve containerContext data. - * The returned Map is an unmodifiable view. - * @return the containerContext data - * @since 1.0-alpha-18 - */ - Map getContextData(); - - /** - * Adds the item to the containerContext. - * - * @param key the key of the item - * @param value the item - * @throws IllegalStateException if this context is read-only - */ - public void put(Object key, Object value) throws IllegalStateException; - - // todo [dain] this isn't needed anymore since containers are no longer nestable - /** - * Hides the item in the containerContext. - * After remove(key) has been called, a get(key) - * will always fail, even if the parent containerContext - * has such a mapping. - * - * @param key the items key - * @throws IllegalStateException if this context is read-only - */ - void hide(Object key) throws IllegalStateException; - - /** - * Make the containerContext read-only. - * Any attempt to write to the containerContext via put() - * will result in an IllegalStateException. - */ - void makeReadOnly(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextException.java deleted file mode 100644 index a9eea45f8..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextException.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.codehaus.plexus.context; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Exception signalling a badly formed Context. - * - * This can be thrown by Context object when a entry is not - * found. It can also be thrown manually in contextualize() - * when Component detects a malformed containerContext value. - * - * @author Avalon Development Team - * @version CVS $Revision$ $Date$ - */ -public class ContextException extends Exception { - private static final long serialVersionUID = 2030206863811644180L; - - /** - * Construct a new ContextException instance. - * - * @param message The detail message for this exception. - */ - public ContextException(final String message) { - this(message, null); - } - - /** - * Construct a new ContextException instance. - * - * @param message The detail message for this exception. - * @param throwable the root cause of the exception - */ - public ContextException(final String message, final Throwable throwable) { - super(message, throwable); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextMapAdapter.java b/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextMapAdapter.java deleted file mode 100644 index d59e856ae..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/context/ContextMapAdapter.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.context; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.HashMap; - -public class ContextMapAdapter extends HashMap { - private Context context; - - public ContextMapAdapter(Context context) { - this.context = context; - } - - public Object get(Object key) { - try { - Object value = context.get(key); - - if (value instanceof String) { - return value; - } else { - return null; - } - } catch (ContextException e) { - return null; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/context/DefaultContext.java b/plexus-container-default/src/main/java/org/codehaus/plexus/context/DefaultContext.java deleted file mode 100644 index 17d236d5d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/context/DefaultContext.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.codehaus.plexus.context; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Collections; -import java.util.Map; -import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.atomic.AtomicBoolean; - -/** - * Default implementation of Context. - * - * This implementation is a static hierarchial store. It has the normal get() - * and put methods. The hide method will hide a property. When - * a property has been hidden the containerContext will not search in the parent containerContext for the value. - * - * @author Avalon Development Team - */ -public class DefaultContext implements Context { - /** - * Context data. - */ - private final ConcurrentMap contextData = new ConcurrentHashMap(); - - /** - * Is the containerContext read only. - */ - private final AtomicBoolean readOnly = new AtomicBoolean(false); - - /** - * Create an empty Context. - */ - public DefaultContext() {} - - /** - * Create a Context with specified data. The specified data is copied into the context so any subsequent updates - * to supplied map are not reflected in this context. Additionally, changes to this context are not reflected in - * the specified map. - * - * @param contextData the containerContext data - */ - public DefaultContext(Map contextData) { - if (contextData == null) { - throw new NullPointerException("contextData is null"); - } - - // check for nulls in key and value - for (Entry entry : contextData.entrySet()) { - Object key = entry.getKey(); - Object value = entry.getValue(); - if (key == null) { - throw new IllegalArgumentException("Key is null"); - } - if (value != null) { - this.contextData.put(key, value); - } - } - } - - public boolean contains(Object key) { - Object data = contextData.get(key); - - return data != null; - } - - public Object get(Object key) throws ContextException { - Object data = contextData.get(key); - - if (data == null) { - // There is no data for the key - throw new ContextException("Unable to resolve context key: " + key); - } - return data; - } - - public void put(Object key, Object value) throws IllegalStateException { - checkWriteable(); - - // check for a null key - if (key == null) { - throw new IllegalArgumentException("Key is null"); - } - - if (value == null) { - contextData.remove(key); - } else { - contextData.put(key, value); - } - } - - public void hide(Object key) throws IllegalStateException { - checkWriteable(); - - contextData.remove(key); - } - - /** - * Utility method to retrieve containerContext data - * - * @return the containerContext data - */ - public Map getContextData() { - return Collections.unmodifiableMap(contextData); - } - - /** - * Make the containerContext read-only. - * Any attempt to write to the containerContext via put() - * will result in an IllegalStateException. - */ - public void makeReadOnly() { - readOnly.set(true); - } - - /** - * Utility method to check if containerContext is writeable and if not throw exception. - * - * @throws java.lang.IllegalStateException if containerContext is read only - */ - protected void checkWriteable() throws IllegalStateException { - if (readOnly.get()) { - throw new IllegalStateException("Context is read only and can not be modified"); - } - } - - public String toString() { - return contextData.toString(); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/AbstractLifecycleHandler.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/AbstractLifecycleHandler.java deleted file mode 100644 index 208906c45..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/AbstractLifecycleHandler.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.ArrayList; -import java.util.List; - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.Phase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -public abstract class AbstractLifecycleHandler implements LifecycleHandler { - private List beginSegment; - - private List endSegment; - - // ---------------------------------------------------------------------- - // Begin Segment - // ---------------------------------------------------------------------- - - public void addBeginSegment(Phase phase) { - if (beginSegment == null) { - beginSegment = new ArrayList(); - } - - beginSegment.add(phase); - } - - public List getBeginSegment() { - return beginSegment; - } - - public void addEndSegment(Phase phase) { - if (endSegment == null) { - endSegment = new ArrayList(); - } - - endSegment.add(phase); - } - - public List getEndSegment() { - return endSegment; - } - - // ---------------------------------------------------------------------- - // Lifecylce Management - // ---------------------------------------------------------------------- - - /** - * @deprecated - */ - public void start(Object component, ComponentManager manager) throws PhaseExecutionException { - start(component, manager, manager.getContainer().getLookupRealm(component)); - } - - /** - * Start a component's lifecycle. - */ - public void start(Object component, ComponentManager manager, ClassRealm realm) throws PhaseExecutionException { - if (segmentIsEmpty(getBeginSegment())) { - return; - } - - for (Object o : getBeginSegment()) { - Phase phase = (Phase) o; - - phase.execute(component, manager, realm); - } - } - - /** - * End a component's lifecycle. - * @deprecated - */ - public void end(Object component, ComponentManager manager) throws PhaseExecutionException { - end(component, manager, manager.getContainer().getLookupRealm(component)); - } - - /** - * End a component's lifecycle. - */ - public void end(Object component, ComponentManager manager, ClassRealm contextRealm) - throws PhaseExecutionException { - if (segmentIsEmpty(getEndSegment())) { - return; - } - - for (Object o : getEndSegment()) { - Phase phase = (Phase) o; - - phase.execute(component, manager, contextRealm); - } - } - - private boolean segmentIsEmpty(List segment) { - if (segment == null || segment.size() == 0) { - return true; - } - - return false; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/BasicLifecycleHandler.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/BasicLifecycleHandler.java deleted file mode 100644 index 73484f376..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/BasicLifecycleHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class BasicLifecycleHandler extends AbstractLifecycleHandler { - protected String id; - - public BasicLifecycleHandler(String id) { - this.id = id; - } - - public String getId() { - return id; - } - - /** @see org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable#initialize */ - public void initialize() {} -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/DefaultLifecycleHandlerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/DefaultLifecycleHandlerManager.java deleted file mode 100644 index 0ae7b707c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/DefaultLifecycleHandlerManager.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -/** - * @author Jason van Zyl - */ -public class DefaultLifecycleHandlerManager implements LifecycleHandlerManager { - private final ConcurrentMap lifecycleHandlers = - new ConcurrentHashMap(); - - private String defaultLifecycleHandlerId = "plexus"; - - public void addLifecycleHandler(LifecycleHandler lifecycleHandler) { - lifecycleHandlers.put(lifecycleHandler.getId(), lifecycleHandler); - } - - public void initialize() { - for (LifecycleHandler lifecycleHandler : lifecycleHandlers.values()) { - lifecycleHandler.initialize(); - } - } - - public LifecycleHandler getLifecycleHandler(String id) throws UndefinedLifecycleHandlerException { - if (id == null) { - id = defaultLifecycleHandlerId; - } - - LifecycleHandler lifecycleHandler = lifecycleHandlers.get(id); - - if (lifecycleHandler == null) { - throw new UndefinedLifecycleHandlerException("Specified lifecycle handler cannot be found: " + id); - } - - return lifecycleHandler; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandler.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandler.java deleted file mode 100644 index a462b74df..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.Phase; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -public interface LifecycleHandler { - String getId(); - - /** - * @param phase {@link Phase} - */ - void addBeginSegment(Phase phase); - - /** - * @param phase {@link Phase} - */ - void addEndSegment(Phase phase); - - /** - * @param component The component. - * @param manager The {@link ComponentManager} - * @throws PhaseExecutionException in case of an error. - * @deprecated - */ - void start(Object component, ComponentManager manager) throws PhaseExecutionException; - - /** - * @param component The component. - * @param manager The {@link ComponentManager} - * @param realm The {@link ClassRealm}. - * @throws PhaseExecutionException in case of an error. - */ - void start(Object component, ComponentManager manager, ClassRealm realm) throws PhaseExecutionException; - - /** - * @param component The component. - * @param manager The {@link ComponentManager} - * @throws PhaseExecutionException in case of an error. - * @deprecated - */ - void end(Object component, ComponentManager manager) throws PhaseExecutionException; - - /** - * - * @param component The component. - * @param manager The {@link ComponentManager} - * @param componentContextRealm the realm used to create the component, which may not be the component's realm; this - * component could have requirements that were satisfied using components from this realm. It could be - * used to lookup the same manager components that were used to start the component. - * @throws PhaseExecutionException in case of an error. - */ - void end(Object component, ComponentManager manager, ClassRealm componentContextRealm) - throws PhaseExecutionException; - - /** - * initialize. - */ - void initialize(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandlerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandlerManager.java deleted file mode 100644 index 44ca6b819..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandlerManager.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * LifecycleHandlerManager is a simple index (registry) of LifecycleHandler instances. - * - * @author Jason van Zyl - * - */ -public interface LifecycleHandlerManager { - void initialize(); - - void addLifecycleHandler(LifecycleHandler lifecycleHandler); - - LifecycleHandler getLifecycleHandler(String id) throws UndefinedLifecycleHandlerException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/UndefinedLifecycleHandlerException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/UndefinedLifecycleHandlerException.java deleted file mode 100644 index 29fcfec42..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/UndefinedLifecycleHandlerException.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.lifecycle; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class UndefinedLifecycleHandlerException extends Exception { - public UndefinedLifecycleHandlerException(String message) { - super(message); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/AbstractPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/AbstractPhase.java deleted file mode 100644 index b2028361c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/AbstractPhase.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.codehaus.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -public abstract class AbstractPhase implements Phase { - /** {@inheritDoc} */ - public abstract void execute(Object component, ComponentManager manager, ClassRealm realm) - throws PhaseExecutionException; - - /** - * @param component The component. - * @param manager The {@link ComponentManager}. - * @throws PhaseExecutionException in case of an error. - * @deprecated - */ - public final void execute(Object component, ComponentManager manager) throws PhaseExecutionException { - execute(component, manager, manager.getContainer().getLookupRealm(component)); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/Phase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/Phase.java deleted file mode 100644 index fe40e5e12..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/phase/Phase.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException; - -public interface Phase { - /** - * Execute the phase. - * @param component The component. - * @param manager {@link ComponentManager} - * @param realm {@link ClassRealm} - * @throws PhaseExecutionException in case of an error. - */ - public void execute(Object component, ComponentManager manager, ClassRealm realm) throws PhaseExecutionException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogEnabled.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogEnabled.java deleted file mode 100644 index b42a8de18..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogEnabled.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public abstract class AbstractLogEnabled implements LogEnabled { - private Logger logger; - - public void enableLogging(Logger logger) { - this.logger = logger; - } - - protected Logger getLogger() { - return logger; - } - - protected void setupLogger(Object component) { - setupLogger(component, logger); - } - - protected void setupLogger(Object component, String subCategory) { - if (subCategory == null) { - throw new IllegalStateException("Logging category must be defined."); - } - - Logger logger = this.logger.getChildLogger(subCategory); - - setupLogger(component, logger); - } - - protected void setupLogger(Object component, Logger logger) { - if (component instanceof LogEnabled) { - ((LogEnabled) component).enableLogging(logger); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogger.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogger.java deleted file mode 100644 index 8f2305fbc..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLogger.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * LICENSE - */ - -/** - * @author Trygve Laugstøl - */ -public abstract class AbstractLogger implements Logger { - private int threshold; - - private String name; - - public AbstractLogger(int threshold, String name) { - if (!isValidThreshold(threshold)) { - throw new IllegalArgumentException("Threshold " + threshold + " is not valid"); - } - - this.threshold = threshold; - this.name = name; - } - - public int getThreshold() { - return threshold; - } - - public void setThreshold(int threshold) { - this.threshold = threshold; - } - - public String getName() { - return name; - } - - public void debug(String message) { - debug(message, null); - } - - public boolean isDebugEnabled() { - return threshold <= LEVEL_DEBUG; - } - - public void info(String message) { - info(message, null); - } - - public boolean isInfoEnabled() { - return threshold <= LEVEL_INFO; - } - - public void warn(String message) { - warn(message, null); - } - - public boolean isWarnEnabled() { - return threshold <= LEVEL_WARN; - } - - public void error(String message) { - error(message, null); - } - - public boolean isErrorEnabled() { - return threshold <= LEVEL_ERROR; - } - - public void fatalError(String message) { - fatalError(message, null); - } - - public boolean isFatalErrorEnabled() { - return threshold <= LEVEL_FATAL; - } - - protected boolean isValidThreshold(int threshold) { - if (threshold == LEVEL_DEBUG) { - return true; - } - if (threshold == LEVEL_INFO) { - return true; - } - if (threshold == LEVEL_WARN) { - return true; - } - if (threshold == LEVEL_ERROR) { - return true; - } - if (threshold == LEVEL_FATAL) { - return true; - } - if (threshold == LEVEL_DISABLED) { - return true; - } - - return false; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLoggerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLoggerManager.java deleted file mode 100644 index 4a6c48ced..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/AbstractLoggerManager.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public abstract class AbstractLoggerManager implements LoggerManager { - /** */ - public AbstractLoggerManager() {} - - public void setThreshold(String role, int threshold) { - setThreshold(role, null, threshold); - } - - public int getThreshold(String role) { - return getThreshold(role, null); - } - - public Logger getLoggerForComponent(String role) { - return getLoggerForComponent(role, null); - } - - public void returnComponentLogger(String role) { - returnComponentLogger(role, null); - } - - /** - * Creates a string key useful as keys in Map's. - * - * @param role The component role. - * @param roleHint The component role hint. - * @return Returns a string thats useful as a key for components. - */ - protected String toMapKey(String role, String roleHint) { - if (roleHint == null) { - return role; - } else { - return role + ":" + roleHint; - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/BaseLoggerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/BaseLoggerManager.java deleted file mode 100644 index 6ba3400a1..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/BaseLoggerManager.java +++ /dev/null @@ -1,165 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; - -/** - * Base class for all LoggerManagers which use cache of Loggers. - * - * @author Michal Maczka - */ -public abstract class BaseLoggerManager extends AbstractLoggerManager implements Initializable { - private Map loggerCache = new HashMap(); - - private String threshold = "info"; - - private int currentThreshold; - - public void initialize() { - currentThreshold = parseThreshold(threshold); - - if (currentThreshold == -1) { - currentThreshold = Logger.LEVEL_DEBUG; - } - } - - protected int parseThreshold(String text) { - text = text.trim().toLowerCase(Locale.ENGLISH); - - if (text.equals("debug")) { - return Logger.LEVEL_DEBUG; - } else if (text.equals("info")) { - return Logger.LEVEL_INFO; - } else if (text.equals("warn")) { - return Logger.LEVEL_WARN; - } else if (text.equals("error")) { - return Logger.LEVEL_ERROR; - } else if (text.equals("fatal")) { - return Logger.LEVEL_FATAL; - } - - return -1; - } - - /** - * Sets the threshold for all new loggers. It will NOT affect the existing loggers. - *

This is usually only set once while the logger manager is configured.

- * - * @param currentThreshold The new threshold. - */ - public void setThreshold(int currentThreshold) { - this.currentThreshold = currentThreshold; - } - - /** - * Sets the threshold for all new loggers. It will NOT affect the existing loggers. - *

This is usually only set once while the logger manager is configured.

- * - * @param currentThreshold The new threshold. - */ - public void setThresholds(int currentThreshold) { - this.currentThreshold = currentThreshold; - - for (Object o : loggerCache.values()) { - Logger logger = (Logger) o; - logger.setThreshold(currentThreshold); - } - } - - /** - * Returns the current threshold for all new loggers. - * - * @return Returns the current threshold for all new loggers. - */ - public int getThreshold() { - return currentThreshold; - } - - public void setThreshold(String role, String roleHint, int threshold) { - AbstractLogger logger; - - String key = toMapKey(role, roleHint); - - logger = (AbstractLogger) loggerCache.get(key); - - if (logger == null) { - return; // nothing to do - } - - logger.setThreshold(threshold); - } - - public int getThreshold(String role, String roleHint) { - AbstractLogger logger; - - String key = toMapKey(role, roleHint); - - logger = (AbstractLogger) loggerCache.get(key); - - if (logger == null) { - return Logger.LEVEL_DEBUG; // does not return null because that could create a NPE - } - - return logger.getThreshold(); - } - - public Logger getLoggerForComponent(String role, String roleHint) { - Logger logger; - - String key = toMapKey(role, roleHint); - - logger = (Logger) loggerCache.get(key); - - if (logger != null) { - return logger; - } - - logger = createLogger(key); - - loggerCache.put(key, logger); - - return logger; - } - - protected abstract Logger createLogger(String key); - - public void returnComponentLogger(String role, String roleHint) { - Object obj; - - String key = toMapKey(role, roleHint); - - obj = loggerCache.remove(key); - - if (obj == null) { - // TODO: use a logger! - System.err.println("There was no such logger '" + key + "' " + hashCode() + "."); - } - } - - public int getActiveLoggerCount() { - return loggerCache.size(); - } - - public String getThresholdAsString() { - return threshold; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LogEnabled.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LogEnabled.java deleted file mode 100644 index 84a6b3f2a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LogEnabled.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - */ -public interface LogEnabled { - void enableLogging(Logger logger); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/Logger.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/Logger.java deleted file mode 100644 index 15bb4737b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/Logger.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public interface Logger { - /** Typecode for debugging messages. */ - int LEVEL_DEBUG = 0; - - /** Typecode for informational messages. */ - int LEVEL_INFO = 1; - - /** Typecode for warning messages. */ - int LEVEL_WARN = 2; - - /** Typecode for error messages. */ - int LEVEL_ERROR = 3; - - /** Typecode for fatal error messages. */ - int LEVEL_FATAL = 4; - - /** Typecode for disabled log levels. */ - int LEVEL_DISABLED = 5; - - void debug(String message); - - void debug(String message, Throwable throwable); - - boolean isDebugEnabled(); - - void info(String message); - - void info(String message, Throwable throwable); - - boolean isInfoEnabled(); - - void warn(String message); - - void warn(String message, Throwable throwable); - - boolean isWarnEnabled(); - - void error(String message); - - void error(String message, Throwable throwable); - - boolean isErrorEnabled(); - - void fatalError(String message); - - void fatalError(String message, Throwable throwable); - - boolean isFatalErrorEnabled(); - - Logger getChildLogger(String name); - - int getThreshold(); - - void setThreshold(int threshold); - - String getName(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LoggerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LoggerManager.java deleted file mode 100644 index 5eed77c63..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/LoggerManager.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public interface LoggerManager { - String ROLE = LoggerManager.class.getName(); - - /** - * Sets the threshold for all new loggers. It will NOT affect the existing loggers. - * - * This is usually only set once while the logger manager is configured. - * - * @param threshold The new threshold. - */ - void setThreshold(int threshold); - - /** - * Returns the current threshold for all new loggers. - * - * @return Returns the current threshold for all new loggers. - */ - int getThreshold(); - - /** - * Sets the threshold for all loggers. It affects all the existing loggers - * as well as future loggers. - * - * @param threshold The new threshold. - */ - void setThresholds(int threshold); - - // The new stuff - void setThreshold(String role, int threshold); - - void setThreshold(String role, String roleHint, int threshold); - - int getThreshold(String role); - - int getThreshold(String role, String roleHint); - - Logger getLoggerForComponent(String role); - - Logger getLoggerForComponent(String role, String roleHint); - - void returnComponentLogger(String role); - - void returnComponentLogger(String role, String hint); - - int getActiveLoggerCount(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLogger.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLogger.java deleted file mode 100644 index 53c5165de..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLogger.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.codehaus.plexus.logging.console; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.logging.AbstractLogger; -import org.codehaus.plexus.logging.Logger; - -/** - * Logger sending everything to the standard output streams. - * This is mainly for the cases when you have a utility that - * does not have a logger to supply. - * - * @author Avalon Development Team - */ -public final class ConsoleLogger extends AbstractLogger { - public ConsoleLogger(int threshold, String name) { - super(threshold, name); - } - - public void debug(String message, Throwable throwable) { - if (isDebugEnabled()) { - System.out.print("[DEBUG] "); - System.out.println(message); - - if (null != throwable) { - throwable.printStackTrace(System.out); - } - } - } - - public void info(String message, Throwable throwable) { - if (isInfoEnabled()) { - System.out.print("[INFO] "); - System.out.println(message); - - if (null != throwable) { - throwable.printStackTrace(System.out); - } - } - } - - public void warn(String message, Throwable throwable) { - if (isWarnEnabled()) { - System.out.print("[WARNING] "); - System.out.println(message); - - if (null != throwable) { - throwable.printStackTrace(System.out); - } - } - } - - public void error(String message, Throwable throwable) { - if (isErrorEnabled()) { - System.out.print("[ERROR] "); - System.out.println(message); - - if (null != throwable) { - throwable.printStackTrace(System.out); - } - } - } - - public void fatalError(String message, Throwable throwable) { - if (isFatalErrorEnabled()) { - System.out.print("[FATAL ERROR] "); - System.out.println(message); - - if (null != throwable) { - throwable.printStackTrace(System.out); - } - } - } - - public Logger getChildLogger(String name) { - return this; - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLoggerManager.java b/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLoggerManager.java deleted file mode 100644 index 96c766749..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/logging/console/ConsoleLoggerManager.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.codehaus.plexus.logging.console; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -import org.codehaus.plexus.logging.AbstractLoggerManager; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; - -/** - * This is a simple logger manager that will only write the logging statements to the console. - * - * Sample configuration: - *
{@code
- * 
- *   org.codehaus.plexus.logging.ConsoleLoggerManager
- *   
- *     DEBUG
- *   
- * 
- * }
- * - * @author Jason van Zyl - * @author Trygve Laugstøl - */ -public class ConsoleLoggerManager extends AbstractLoggerManager implements LoggerManager, Initializable { - /** - * Message of this level or higher will be logged. - * - * This field is set by the plexus container thus the name is 'threshold'. The field - * currentThreshold contains the current setting of the threshold. - */ - private String threshold = "info"; - - private int currentThreshold; - - private Map loggers; - - /** The number of active loggers in use. */ - private int loggerCount; - - private boolean bootTimeLogger = false; - - public ConsoleLoggerManager() {} - - /** - * This special constructor is called directly when the container is bootstrapping itself. - * @param threshold The threshold. - */ - public ConsoleLoggerManager(String threshold) { - this.threshold = threshold; - - bootTimeLogger = true; - - initialize(); - } - - public void initialize() { - debug("Initializing ConsoleLoggerManager: " + this.hashCode() + "."); - // if ( !bootTimeLogger ) - // new Throwable().printStackTrace(System.err); - currentThreshold = parseThreshold(threshold); - - if (currentThreshold == -1) { - debug("Could not parse the threshold level: '" + threshold + "', setting to debug."); - currentThreshold = Logger.LEVEL_DEBUG; - } - - loggers = new HashMap(); - } - - public void setThreshold(int currentThreshold) { - this.currentThreshold = currentThreshold; - } - - public void setThresholds(int currentThreshold) { - this.currentThreshold = currentThreshold; - - for (Object o : loggers.values()) { - Logger logger = (Logger) o; - logger.setThreshold(currentThreshold); - } - } - - /** - * @return Returns the threshold. - */ - public int getThreshold() { - return currentThreshold; - } - - // new stuff - - public void setThreshold(String role, String roleHint, int threshold) { - ConsoleLogger logger; - String name; - - name = toMapKey(role, roleHint); - logger = (ConsoleLogger) loggers.get(name); - - if (logger == null) { - debug("Trying to set the threshold of a unknown logger '" + name + "'."); - return; // nothing to do - } - - logger.setThreshold(threshold); - } - - public int getThreshold(String role, String roleHint) { - ConsoleLogger logger; - String name; - - name = toMapKey(role, roleHint); - logger = (ConsoleLogger) loggers.get(name); - - if (logger == null) { - debug("Trying to get the threshold of a unknown logger '" + name + "'."); - return Logger.LEVEL_DEBUG; // does not return null because that could create a NPE - } - - return logger.getThreshold(); - } - - public Logger createLogger(int threshold, String name) { - return new ConsoleLogger(threshold, name); - } - - public Logger getLoggerForComponent(String role, String roleHint) { - Logger logger; - String name; - - name = toMapKey(role, roleHint); - logger = (Logger) loggers.get(name); - - if (logger != null) return logger; - - debug("Creating logger '" + name + "' " + this.hashCode() + "."); - logger = createLogger(getThreshold(), name); - loggers.put(name, logger); - - return logger; - } - - public void returnComponentLogger(String role, String roleHint) { - Object obj; - String name; - - name = toMapKey(role, roleHint); - obj = loggers.remove(name); - - if (obj == null) { - debug("There was no such logger '" + name + "' " + this.hashCode() + "."); - } else { - debug("Removed logger '" + name + "' " + this.hashCode() + "."); - } - } - - public int getActiveLoggerCount() { - return loggers.size(); - } - - private int parseThreshold(String text) { - text = text.trim().toLowerCase(Locale.ENGLISH); - - if (text.equals("debug")) { - return ConsoleLogger.LEVEL_DEBUG; - } else if (text.equals("info")) { - return ConsoleLogger.LEVEL_INFO; - } else if (text.equals("warn")) { - return ConsoleLogger.LEVEL_WARN; - } else if (text.equals("error")) { - return ConsoleLogger.LEVEL_ERROR; - } else if (text.equals("fatal")) { - return ConsoleLogger.LEVEL_FATAL; - } - - return -1; - } - - private String decodeLogLevel(int logLevel) { - switch (logLevel) { - case ConsoleLogger.LEVEL_DEBUG: - return "debug"; - case ConsoleLogger.LEVEL_INFO: - return "info"; - case ConsoleLogger.LEVEL_WARN: - return "warn"; - case ConsoleLogger.LEVEL_ERROR: - return "error"; - case ConsoleLogger.LEVEL_FATAL: - return "fatal"; - case ConsoleLogger.LEVEL_DISABLED: - return "disabled"; - default: - return "unknown"; - } - } - - /** - * Remove this method and all references when this code is verified. - * - * @param msg - */ - private void debug(String msg) { - // if ( !bootTimeLogger ) - // System.out.println( "[Console] " + msg ); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/AutoConfigurePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/AutoConfigurePhase.java deleted file mode 100644 index b30f81b9e..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/AutoConfigurePhase.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.ComponentConfigurationException; -import org.codehaus.plexus.component.configurator.ComponentConfigurator; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; -import org.codehaus.plexus.util.StringUtils; - -public class AutoConfigurePhase extends AbstractPhase { - public static final String DEFAULT_CONFIGURATOR_ID = "default"; - - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - try { - ComponentDescriptor descriptor = manager.getComponentDescriptor(); - - String configuratorId = descriptor.getComponentConfigurator(); - - if (StringUtils.isEmpty(configuratorId)) { - configuratorId = DEFAULT_CONFIGURATOR_ID; - } - - ComponentConfigurator componentConfigurator = - manager.getContainer().lookup(ComponentConfigurator.class, configuratorId); - - PlexusConfiguration configuration = - manager.getContainer().getConfigurationSource().getConfiguration(descriptor); - - if (configuration != null) { - ClassRealm realm = manager.getRealm(); - - componentConfigurator.configureComponent(object, configuration, realm); - } - } catch (ComponentLookupException e) { - throw new PhaseExecutionException( - "Unable to auto-configure component as its configurator could not be found", e); - } catch (ComponentConfigurationException e) { - throw new PhaseExecutionException("Unable to auto-configure component", e); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Configurable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Configurable.java deleted file mode 100644 index 8baa74c8d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Configurable.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * Configures a component. - * - * @author Dan Diephouse - */ -public interface Configurable { - void configure(PlexusConfiguration configuration) throws PlexusConfigurationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ConfigurablePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ConfigurablePhase.java deleted file mode 100644 index 859e8d384..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ConfigurablePhase.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.configuration.PlexusConfigurationException; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class ConfigurablePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof Configurable) { - try { - ((Configurable) object) - .configure(manager.getComponentDescriptor().getConfiguration()); - } catch (PlexusConfigurationException e) { - throw new PhaseExecutionException("Error occurred during phase execution", e); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable.java deleted file mode 100644 index 0f65882b4..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; - -/** - * @author Jason van Zyl - */ -public interface Contextualizable { - public void contextualize(Context context) throws ContextException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ContextualizePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ContextualizePhase.java deleted file mode 100644 index bf75d6981..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ContextualizePhase.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class ContextualizePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof Contextualizable) { - Context context = manager.getContainer().getContext(); - - ClassRealm origRealm = manager.getContainer().setLookupRealm(lookupRealm); - - try { - ((Contextualizable) object).contextualize(context); - } catch (ContextException e) { - throw new PhaseExecutionException("Unable to contextualize component", e); - } finally { - manager.getContainer().setLookupRealm(origRealm); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable.java deleted file mode 100644 index 185609725..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Disposable { - public void dispose(); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/DisposePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/DisposePhase.java deleted file mode 100644 index ad74ac072..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/DisposePhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class DisposePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Disposable) { - ((Disposable) object).dispose(); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Initializable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Initializable.java deleted file mode 100644 index 4d29ec728..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Initializable.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Initializable { - public void initialize() throws InitializationException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializationException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializationException.java deleted file mode 100644 index aaf89b521..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializationException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Indicates a problem occurred when initialising a component. - * - * @author Brett Porter - */ -public class InitializationException extends Exception { - public InitializationException(String message) { - super(message); - } - - public InitializationException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializePhase.java deleted file mode 100644 index b03ffd1dd..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializePhase.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class InitializePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof Initializable) { - try { - ((Initializable) object).initialize(); - } catch (InitializationException e) { - throw new PhaseExecutionException("Error initialising component", e); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogDisablePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogDisablePhase.java deleted file mode 100644 index 2a4115851..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogDisablePhase.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2007 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.logging.LoggerManager; - -/** - * @author Trygve Laugstøl - */ -public class LogDisablePhase extends AbstractPhase { - public void execute(Object object, ComponentManager componentManager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof LogEnabled) { - LoggerManager loggerManager = componentManager.getContainer().getLoggerManager(); - loggerManager.returnComponentLogger(componentManager.getRole(), componentManager.getRoleHint()); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogEnablePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogEnablePhase.java deleted file mode 100644 index b5e301205..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/LogEnablePhase.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2007 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; - -public class LogEnablePhase extends AbstractPhase { - public void execute(Object object, ComponentManager componentManager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof LogEnabled) { - LogEnabled logEnabled = (LogEnabled) object; - - LoggerManager loggerManager = componentManager.getContainer().getLoggerManager(); - - Logger logger = - loggerManager.getLoggerForComponent(componentManager.getRole(), componentManager.getRoleHint()); - - logEnabled.enableLogging(logger); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PhaseExecutionException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PhaseExecutionException.java deleted file mode 100644 index 0c62f936a..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PhaseExecutionException.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Describes an error that has occurred during the execution of a phase. - * - * @author Brett Porter - */ -public class PhaseExecutionException extends Exception { - public PhaseExecutionException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PlexusContainerLocator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PlexusContainerLocator.java deleted file mode 100644 index 4ad39ae1c..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/PlexusContainerLocator.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * A ServiceLocator for PlexusContainer. - * - * @author Dan Diephouse - */ -public class PlexusContainerLocator implements ServiceLocator { - private PlexusContainer container; - - public PlexusContainerLocator(PlexusContainer container) { - this.container = container; - } - - public Object lookup(String role) throws ComponentLookupException { - return container.lookup(role); - } - - public Object lookup(String role, String roleHint) throws ComponentLookupException { - return container.lookup(role, roleHint); - } - - public Map lookupMap(String role) throws ComponentLookupException { - return container.lookupMap(role); - } - - public List lookupList(String role) throws ComponentLookupException { - return container.lookupList(role); - } - - public void release(Object component) throws ComponentLifecycleException { - container.release(component); - } - - public void releaseAll(Map components) throws ComponentLifecycleException { - container.releaseAll(components); - } - - public void releaseAll(List components) throws ComponentLifecycleException { - container.releaseAll(components); - } - - public boolean hasComponent(String componentKey) { - return container.hasComponent(componentKey); - } - - public boolean hasComponent(String role, String roleHint) { - return container.hasComponent(role, roleHint); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ResumePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ResumePhase.java deleted file mode 100644 index 57a1d6b2b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ResumePhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class ResumePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Suspendable) { - ((Suspendable) object).resume(); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceLocator.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceLocator.java deleted file mode 100644 index 80b20177e..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceLocator.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -/** - * Provides services to components by means of a lookup. - * - * @author Dan Diephouse - */ -public interface ServiceLocator { - // ---------------------------------------------------------------------- - // Component lookup - // ---------------------------------------------------------------------- - - Object lookup(String componentKey) throws ComponentLookupException; - - Object lookup(String role, String roleHint) throws ComponentLookupException; - - Map lookupMap(String role) throws ComponentLookupException; - - List lookupList(String role) throws ComponentLookupException; - - // ---------------------------------------------------------------------- - // Component release - // ---------------------------------------------------------------------- - - void release(Object component) throws ComponentLifecycleException; - - void releaseAll(Map components) throws ComponentLifecycleException; - - void releaseAll(List components) throws ComponentLifecycleException; - - // ---------------------------------------------------------------------- - // Component discovery - // ---------------------------------------------------------------------- - - boolean hasComponent(String componentKey); - - boolean hasComponent(String role, String roleHint); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Serviceable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Serviceable.java deleted file mode 100644 index 6c0f7eedc..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Serviceable.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Indicates that a class wants a hold on a ServiceLocator. - * - * @author Dan Diephouse - */ -public interface Serviceable { - void service(ServiceLocator locator); -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceablePhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceablePhase.java deleted file mode 100644 index f648a483f..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/ServiceablePhase.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class ServiceablePhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Serviceable) { - PlexusContainer container = manager.getContainer(); - - ((Serviceable) object).service(new PlexusContainerLocator(container)); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartPhase.java deleted file mode 100644 index cbba44360..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartPhase.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class StartPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof Startable) { - try { - ((Startable) object).start(); - } catch (StartingException e) { - throw new PhaseExecutionException("Error starting component", e); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Startable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Startable.java deleted file mode 100644 index d56286124..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Startable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface Startable { - void start() throws StartingException; - - void stop() throws StoppingException; -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartingException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartingException.java deleted file mode 100644 index ae81fd976..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartingException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Error occuring while starting a component. - * - * @author Brett Porter - */ -public class StartingException extends Exception { - public StartingException(String message) { - super(message); - } - - public StartingException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StopPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StopPhase.java deleted file mode 100644 index 1acc2272b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StopPhase.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class StopPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) - throws PhaseExecutionException { - if (object instanceof Startable) { - try { - ((Startable) object).stop(); - } catch (StoppingException e) { - throw new PhaseExecutionException("Error stopping component", e); - } - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StoppingException.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StoppingException.java deleted file mode 100644 index c68c5acd9..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StoppingException.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Error occuring while starting a component. - * - * @author Brett Porter - */ -public class StoppingException extends Exception { - public StoppingException(String message) { - super(message); - } - - public StoppingException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/SuspendPhase.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/SuspendPhase.java deleted file mode 100644 index 16d0f8a1d..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/SuspendPhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class SuspendPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Suspendable) { - ((Suspendable) object).suspend(); - } - } -} diff --git a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Suspendable.java b/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Suspendable.java deleted file mode 100644 index ae675450b..000000000 --- a/plexus-container-default/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Suspendable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.personality.plexus.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface Suspendable { - void suspend(); - - void resume(); -} diff --git a/plexus-container-default/src/main/mdo/components.mdo b/plexus-container-default/src/main/mdo/components.mdo deleted file mode 100644 index 0fb934404..000000000 --- a/plexus-container-default/src/main/mdo/components.mdo +++ /dev/null @@ -1,245 +0,0 @@ - - - - plexus-components - PlexusComponents - - This is a documentation for the Plexus Components descriptor: META-INF/plexus/components.xml.

-

An XSD is available at - http://plexus.codehaus.org/xsd/components-1.3.0.xsd. -

]]> -
- - - - ComponentSetDescriptor - javadoc.]]> - - 1.0.0+ - - - components - 1.0.0+ - - ComponentDescriptor - * - - The component descriptors that can be found within this component set descriptor. - - - dependencies - 1.0.0+ - - ComponentDependency - * - - The dependencies that are required by the set of components found in this component set descriptor. - - - - - - ComponentDescriptor - javadoc.]]> - - 1.0.0+ - - - role - 1.0.0+ - String - the role of this component. - - - role-hint - 1.0.0+ - String - the role-hint of this component. - - - implementation - 1.0.0+ - String - - the implementation of this component. Implementation is a string denoting a FQCN in normal Java - components, or some other name or file for other component factory implementations. - - - - version - 1.0.0+ - String - a specific point in a components's project timeline. i.e. version 1, or 2.1.4 - - - component-type - 1.0.0+ - String - the type of this component. - - - instantiation-strategy - 1.0.0+ - String - the type of instantiation strategy for this component: one of "per-lookup", "singleton", "keep-alive" or "poolable". - singleton - - - lifecycle-handler - 1.0.0+ - String - the lifecycle-handler for this component. For example, "basic", "passive", "bootstrap". - - - component-profile - 1.0.0+ - String - - - - component-composer - 1.0.0+ - String - - the ID of the type of composer this component will use. For example, "setter" or "field" for the - different types of dependency injection. - - - - component-configurator - 1.0.0+ - String - - the type of component configurator for this project. For example "basic" for normal, or "map-oriented" - for map oriented components. - - - - component-factory - 1.0.0+ - String - an id of the factory used to create this component. For example, "jruby" will use a JRuby factory. - - - description - 1.0.0+ - String - a human-readable description of this component. - - - alias - 1.0.0+ - String - an alias for this component. An alias is as an alternate name other than the normal key. - - - isolated-realm - 1.0.0+ - boolean - true if this may be in an isolated classrealm. - - - configuration - 1.0.0+ - DOM - configuration values defined for this component. - - - requirements - 1.0.0+ - - ComponentRequirement - * - - project requirements to this component. - - - - - ComponentRequirement - - This represents a component that is required by another component. - - 1.0.0+ - - - role - 1.0.0+ - String - the role of the required component. - - - field-name - 1.0.0+ - String - the name of the field that will be populated by the required component. - - - role-hint - 1.0.0+ - String - the role-hint of the required component. - default - - - role-hints - 1.0.0+ - - String - * - - the role-hints of the required component. - - - optional - 1.3.0+ - boolean - - Controls whether a failure to satisfy this requirement can be tolerated by host component or whether construction - of the host component should also fail. - - - - - - ComponentDependency - - - 1.0.0+ - - - artifact-id - 1.0.0+ - String - the dependency's artifact ID. - - - group-id - 1.0.0+ - String - the dependency's group ID. - - - type - 1.0.0+ - String - the type of dependency, for example a "jar". - - - version - 1.0.0+ - String - the point in a project's development timeline - - - - -
diff --git a/plexus-container-default/src/main/mdo/plexus.mdo b/plexus-container-default/src/main/mdo/plexus.mdo deleted file mode 100644 index 42d3834eb..000000000 --- a/plexus-container-default/src/main/mdo/plexus.mdo +++ /dev/null @@ -1,190 +0,0 @@ - - - - plexus-configuration - PlexusConfiguration - - This is a Work In Progress for a documentation for the Plexus Container descriptor: META-INF/plexus/plexus.xml.

-

An XSD will be available at - http://plexus.codehaus.org/xsd/plexus-1.3.0.xsd. -

-

Note that since plexus.xml is a superset of components.xml, - this documentation only focuses on elements only available in plexus.xml.

- ]]> -
- - - - PlexusDescriptor - - - see org.codehaus.plexus.configuration.PlexusConfigurationMerger - 1.0.0+ - - - load-on-start - 1.0.0+ - TBD - DOM - - - system-properties - 1.0.0+ - TBD - DOM - - - configurations-directory - 1.0.0+ - TBD - DOM - - - logging - 1.0.0+ - TBD - DOM - - - component-repository - 1.0.0+ - TBD - DOM - - - resources - 1.0.0+ - TBD - DOM - - - component-manager-manager - 1.0.0+ - TBD - DOM - - - component-discoverer-manager - 1.0.0+ - TBD - - ComponentDiscovererManager - - - - component-factory-manager - 1.0.0+ - TBD - DOM - - - lifecycle-handler-manager - 1.0.0+ - TBD - DOM - - - component-composer-manager - 1.0.0+ - TBD - DOM - - - components - 1.0.0+ - DOM - components.xml.]]> - - - - - - - ComponentDiscovererManager - org.codehaus.plexus.component.discovery.ComponentDiscovererManager - source - javadoc.]]> - - 1.0.0+ - - - implementation - 1.0.0+ - Implementation class. - String - - - listeners - 1.0.0+ - - * - ComponentDiscoveryListener - - - - component-discoverers - 1.0.0+ - - * - ComponentDiscoverer - - - - - - ComponentDiscoveryListener - org.codehaus.plexus.component.discovery.ComponentDiscoveryListener - source - javadoc.]]> - - 1.0.0+ - - - implementation - 1.0.0+ - Implementation class. - String - - - configuration - 1.0.0+ - Configuration of the class. - Content - - - - - ComponentDiscoverer - org.codehaus.plexus.component.discovery.ComponentDiscoverer - source - javadoc.]]> - - 1.0.0+ - - - implementation - 1.0.0+ - Implementation class. - String - - - configuration - 1.0.0+ - Configuration of the class. - Content - - - - -
diff --git a/plexus-container-default/src/main/resources/META-INF/plexus/components.xml b/plexus-container-default/src/main/resources/META-INF/plexus/components.xml deleted file mode 100644 index 3a4d4d7d1..000000000 --- a/plexus-container-default/src/main/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - org.codehaus.plexus.component.configurator.BasicComponentConfigurator - org.codehaus.plexus.component.configurator.ComponentConfigurator - basic - - - org.codehaus.plexus.component.configurator.MapOrientedComponentConfigurator - org.codehaus.plexus.component.configurator.ComponentConfigurator - map-oriented - - - \ No newline at end of file diff --git a/plexus-container-default/src/site/apt/index.apt b/plexus-container-default/src/site/apt/index.apt deleted file mode 100644 index 9bbe8284c..000000000 --- a/plexus-container-default/src/site/apt/index.apt +++ /dev/null @@ -1,43 +0,0 @@ - ----- - plexus-container-default - ----- - Hervé Boutemy - ----- - 2009-10-06 - ----- - -Overview - - <<>> is Plexus' (IoC) container. It is composed of: - - * its public API: the root class is - <<<{{{./apidocs/org/codehaus/plexus/PlexusContainer.html}org.codehaus.plexus.PlexusContainer}}>>>, - - * its default implementation: the root class is - <<<{{{./apidocs/org/codehaus/plexus/DefaultPlexusContainer.html}org.codehaus.plexus.DefaultPlexusContainer}}>>>. - - [] - - - Default implementation reads configuration in XML files: - - * multiple <<<{{{./plexus-components.html}META-INF/plexus/components.xml}}>>> files that declare components, - - * one <<<{{{./plexus-configuration.html}META-INF/plexus/plexus.xml}}>>> file that can be used to configure - the plexus container and runtime in addition to declaring components. - - [] - - But it is not limited to these files: Plexus container is by nature very extensible, it can be configured - programmatically too or extended to read configuration from any source. It is used for example in Maven 2 to - read plugins configuration from <<>> and instanciate Mojos downloaded from - Maven repositories. - -* Deprecated - - <<>> is replaced by: - - * {{{https://github.com/eclipse/sisu.inject}Sisu container}}, reading <<>> index files, - - * and optional {{{https://github.com/eclipse/sisu.plexus}Plexus shim <<>>}} for compatibility with legacy Plexus <<>>. - See also Plexus shim {{{https://eclipse.github.io/sisu.plexus/apidocs/reference/packages.html}javadoc}}. diff --git a/plexus-container-default/src/site/site.xml b/plexus-container-default/src/site/site.xml deleted file mode 100644 index 6561cc283..000000000 --- a/plexus-container-default/src/site/site.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/DefaultComponentLookupManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/DefaultComponentLookupManagerTest.java deleted file mode 100644 index 3620c21a8..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/DefaultComponentLookupManagerTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus; - -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.test.ComponentA; - -/** - * @author Trygve Laugstøl - */ -public class DefaultComponentLookupManagerTest extends PlexusTestCase { - public void testLookupsWithAndWithoutRoleHint() throws Exception { - String resource = getConfigurationName("components.xml"); - - System.out.println("resource = " + resource); - - assertNotNull(resource); - - ContainerConfiguration c = - new DefaultContainerConfiguration().setName("test").setContainerConfiguration(resource); - - DefaultPlexusContainer container = new DefaultPlexusContainer(c); - - try { - container.lookup(ComponentA.class); - - fail("Expected exception"); - } catch (ComponentLookupException e) { - // expected - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/DyanamicComponentKungFuTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/DyanamicComponentKungFuTest.java deleted file mode 100644 index 2e191ff92..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/DyanamicComponentKungFuTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * This is the start of the sketch which outlines some of the things - * I would like to do with components during runtime. - * - * @author Jason van Zyl - * - */ -public class DyanamicComponentKungFuTest extends TestCase { - /** - * Component additions during container operation. - * - *
    - *
  1. Add a component at runtime - *
      - *
    • Additions could be made by specifying an URL which will be compatible with Wagon - * and specifically Maven's way of using Wagon.
    • - *
    - *
  2. - * - *
  3. Configure the dynamically added component - *
      - *
    • We need to be able to deal with different flavours of components but we can focus - * on Plexus components to start with. But some components may have meta information - * and some may not like pico components. But one of the first flavours I want to - * support is phoenix components because I specifically need the FTP server.
    • - *
    - *
  4. - * - *
  5. Let the component perform its role
  6. - *
  7. Suspend the component - *
      - *
    1. Define the criteria for which we can suspend a component - *
        - *
      • When there are no client connections?
      • - *
      • Even when there are no connections and a client tries to obtain a connection what do we do?
      • - *
      • If we are in desperate need to suspend the component, say for urgent security requirement, and - * clients simply won't bugger off what do we do?
      • - *
      - *
    2. - *
    - *
  8. - * - *
  9. Reconfigure the component
  10. - * - *
  11. Resume the component
  12. - * - *
  13. Let the component perform its role
  14. - * - *
  15. Release the component
  16. - *
- * - * @throws Exception in case of a failure. - */ - public void testAdditionOfComponentDuringContainerOperation() throws Exception {} - - /** - * Component replacement during container operation. - * - * This will force the design of a mechanism where the components communicate - * with one another via a connector. In order for components to be replaced - * dynamically the components cannot be directly coupled to one another. - * - * How to decide if a component is a suitable replacement given the versions - * of the specifications of the component and any required components if the - * component is a composite component. - * - * Definitely need to simulate the connection (a MockConnection) during - * runtime to make sure that in the event something goes wrong the container - * can just refuse to allow the component substitution. This shouldn't be trial - * and error but until much field testing has occurred I'm sure there will be - * instances where miscalculations happen simply due to lack of experience and - * usage with dynamic component replacement. - * - * @throws Exception in case of a failure. - */ - public void testComponentReplacementDuringContainerOperation() throws Exception {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusJUnit4TestCaseTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusJUnit4TestCaseTest.java deleted file mode 100644 index 3a72f9d51..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusJUnit4TestCaseTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus; - -import java.util.concurrent.atomic.AtomicBoolean; - -import org.junit.Test; -import org.junit.runner.JUnitCore; - -import static org.junit.Assert.*; - -public class PlexusJUnit4TestCaseTest { - - private static AtomicBoolean run = new AtomicBoolean(false); - - public static class MyTest extends PlexusJUnit4TestCase { - - @Test - public void yeah() { - run.set(true); - } - } - - @Test - public void runMytest() { - JUnitCore.runClasses(MyTest.class); - assertTrue(run.get()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusTestCaseTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusTestCaseTest.java deleted file mode 100644 index b8d2eda24..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/PlexusTestCaseTest.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.codehaus.plexus; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; - -import junit.framework.TestCase; -import org.codehaus.plexus.component.discovery.DiscoveredComponent; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.test.DefaultLoadOnStartService; - -/** - * @author Jason van Zyl - */ -public class PlexusTestCaseTest extends TestCase { - private String basedir; - - public void setUp() { - basedir = System.getProperty("basedir"); - - if (basedir == null) { - basedir = new File(".").getAbsolutePath(); - } - } - - public void testPlexusTestCase() throws Exception { - PlexusTestCase tc = new PlexusTestCase() {}; - - tc.setUp(); - - try { - tc.lookup(DiscoveredComponent.class, "unknown"); - - fail("Expected ComponentLookupException."); - } catch (ComponentLookupException ex) { - assertTrue(true); - } - - // This component is discovered from src/test/META-INF/plexus/components.xml - DiscoveredComponent component = tc.lookup(DiscoveredComponent.class); - - assertNotNull(component); - - assertNotNull(tc.getClassLoader()); - - tc.tearDown(); - } - - public void testLoadOnStartComponents() throws Exception { - PlexusTestCase tc = new PlexusTestCase() { - protected String getCustomConfigurationName() { - return PlexusTestCase.getTestConfiguration(getClass()); - } - }; - - tc.setupContainer(); - - // Assert that the load on start component has started. - - assertTrue("The load on start components haven't been started.", DefaultLoadOnStartService.isStarted); - - tc.tearDown(); - } - - public void testGetFile() { - File file = PlexusTestCase.getTestFile("pom.xml"); - - assertTrue(file.exists()); - - file = PlexusTestCase.getTestFile(basedir, "pom.xml"); - - assertTrue(file.exists()); - } - - public void testGetPath() { - File file = new File(PlexusTestCase.getTestPath("pom.xml")); - - assertTrue(file.exists()); - - file = new File(PlexusTestCase.getTestPath(basedir, "pom.xml")); - - assertTrue(file.exists()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/MapOrientedComponentProcessingTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/MapOrientedComponentProcessingTest.java deleted file mode 100644 index 3fbec0dae..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/MapOrientedComponentProcessingTest.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.codehaus.plexus.component; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Map; - -import junit.framework.TestCase; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentRequirement; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.logging.LoggerManager; - -public class MapOrientedComponentProcessingTest extends TestCase { - - public void testShouldFindAndInitializeMapOrientedComponent() throws Exception { - PlexusContainer embedder = new DefaultPlexusContainer(); - - ComponentDescriptor descriptor = - new ComponentDescriptor(TestMapOrientedComponent.class, embedder.getContainerRealm()); - - descriptor.setRole(TestMapOrientedComponent.ROLE); - - descriptor.setImplementation(TestMapOrientedComponent.ROLE); - - descriptor.setComponentComposer("map-oriented"); - - descriptor.setComponentConfigurator("map-oriented"); - - ComponentRequirement requirement = new ComponentRequirement(); - - requirement.setFieldName("testRequirement"); - - requirement.setRole(LoggerManager.ROLE); - - descriptor.addRequirement(requirement); - - PlexusConfiguration param = new XmlPlexusConfiguration("testParameter"); - - param.setValue("testValue"); - - PlexusConfiguration configuration = new XmlPlexusConfiguration("configuration"); - - configuration.addChild(param); - - descriptor.setConfiguration(configuration); - - embedder.addComponentDescriptor(descriptor); - - TestMapOrientedComponent component = embedder.lookup(TestMapOrientedComponent.class); - - Map context = component.getContext(); - - assertTrue( - "requirement (LogManager) missing from containerContext.", - (context.get("testRequirement") instanceof LoggerManager)); - - assertEquals("parameter missing from containerContext.", "testValue", context.get("testParameter")); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/PlexusTestCaseTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/PlexusTestCaseTest.java deleted file mode 100644 index 867afa453..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/PlexusTestCaseTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.component; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; - -public class PlexusTestCaseTest extends PlexusTestCase { - - private static final String CUSTOM_PROPERTY = "custom.property"; - private static final String CUSTOM_VALUE = "custom.value"; - - @Override - protected void customizeContext(Context context) { - super.customizeContext(context); - - context.put(CUSTOM_PROPERTY, CUSTOM_VALUE); - } - - public void testCustomizeContext() throws ContextException { - String value = (String) getContainer().getContext().get(CUSTOM_PROPERTY); - - assertEquals(CUSTOM_VALUE, value); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/TestMapOrientedComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/TestMapOrientedComponent.java deleted file mode 100644 index 3660e671a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/TestMapOrientedComponent.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.component; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Map; -import java.util.TreeMap; - -import org.codehaus.plexus.component.repository.ComponentRequirement; - -public class TestMapOrientedComponent implements MapOrientedComponent { - - public static final String ROLE = TestMapOrientedComponent.class.getName(); - - private Map context = new TreeMap(); - - public void addComponentRequirement(ComponentRequirement requirementDescriptor, Object requirementValue) { - context.put(requirementDescriptor.getFieldName(), requirementValue); - } - - public void setComponentConfiguration(Map componentConfiguration) { - context.putAll(componentConfiguration); - } - - public Map getContext() { - return context; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractComponent.java deleted file mode 100644 index 340f36f33..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractComponent.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class AbstractComponent implements Component { - private ComponentA componentA; - - public ComponentA getComponentA() { - return componentA; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractCompositionResolverTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractCompositionResolverTest.java deleted file mode 100644 index e3528b9ec..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/AbstractCompositionResolverTest.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import junit.framework.TestCase; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.io.PlexusTools; - -/** - * - * - * @author Jason van Zyl - * - */ -public abstract class AbstractCompositionResolverTest extends TestCase { - - /** - * - * @return {@link CompositionResolver} - */ - protected abstract CompositionResolver getCompositionResolver(); - - // ------------------------------------------------------------------------ - // - // +-------+ +-------+ - // | c1 | --------> | c2 | - // +-------+ +-------+ - // | - // | - // V - // +-------+ - // | c3 | - // +-------+ - // - // ------------------------------------------------------------------------ - public void testSimpleComponentResolution() throws Exception { - String cc1 = "" + " java.lang.String" - + " c1" - + " " - + " " - + " c2" - + " " - + " " - + " c3" - + " " - + " " - + ""; - - String cc2 = "" + " java.lang.String" - + " c2" - + ""; - - String cc3 = "" + " java.lang.String" - + " c3" - + ""; - - ClassWorld classWorld = new ClassWorld("test", Thread.currentThread().getContextClassLoader()); - ClassRealm realm = classWorld.getRealm("test"); - - CompositionResolver compositionResolver = getCompositionResolver(); - - ComponentDescriptor c1 = PlexusTools.buildComponentDescriptor(cc1, realm); - - ComponentDescriptor c2 = PlexusTools.buildComponentDescriptor(cc2, realm); - - ComponentDescriptor c3 = PlexusTools.buildComponentDescriptor(cc3, realm); - - compositionResolver.addComponentDescriptor(c1); - - compositionResolver.addComponentDescriptor(c2); - - compositionResolver.addComponentDescriptor(c3); - - List dependencies = compositionResolver.getRequirements(c1.getRole(), c1.getRoleHint()); - - assertEquals(2, dependencies.size()); - - assertTrue(dependencies.contains(c2.getRole() + CompositionResolver.SEPARATOR_CHAR + c2.getRoleHint())); - - assertTrue(dependencies.contains(c3.getRole() + CompositionResolver.SEPARATOR_CHAR + c2.getRoleHint())); - - assertEquals(2, dependencies.size()); - } - - // ------------------------------------------------------------------------ - // - // +-------+ +-------+ - // | c1 | --------> | c2 | - // +-------+ +-------+ - // | - // | - // V - // +-------+ +-------+ - // | c3 | --------> | c4 | - // +-------+ +-------+ - // | - // | - // V - // +-------+ - // | c5 | - // +-------+ - // - // ------------------------------------------------------------------------ - public void testComplexComponentResolution() throws Exception { - String cc1 = "" + " java.lang.String" - + " c1" - + " " - + " " - + " c2" - + " " - + " " - + " c3" - + " " - + " " - + ""; - - String cc2 = "" + " java.lang.String" - + " c2" - + ""; - - String cc3 = "" + " java.lang.String" - + " c3" - + " " - + " " - + " c4" - + " " - + " " - + " c5" - + " " - + " " - + ""; - - String cc4 = "" + " java.lang.String" - + " c4" - + ""; - - String cc5 = "" + " java.lang.String" - + " c5" - + ""; - - ClassWorld classWorld = new ClassWorld("test", Thread.currentThread().getContextClassLoader()); - ClassRealm realm = classWorld.getRealm("test"); - - CompositionResolver compositionResolver = getCompositionResolver(); - - ComponentDescriptor c1 = PlexusTools.buildComponentDescriptor(cc1, realm); - - ComponentDescriptor c2 = PlexusTools.buildComponentDescriptor(cc2, realm); - - ComponentDescriptor c3 = PlexusTools.buildComponentDescriptor(cc3, realm); - - ComponentDescriptor c4 = PlexusTools.buildComponentDescriptor(cc4, realm); - - ComponentDescriptor c5 = PlexusTools.buildComponentDescriptor(cc5, realm); - - compositionResolver.addComponentDescriptor(c1); - - compositionResolver.addComponentDescriptor(c2); - - compositionResolver.addComponentDescriptor(c3); - - compositionResolver.addComponentDescriptor(c4); - - compositionResolver.addComponentDescriptor(c5); - - List dependencies = compositionResolver.getRequirements(c1.getRole(), c1.getRoleHint()); - - assertEquals(2, dependencies.size()); - - // I just leave this at the moment as I am just 99% sure that this is not needed and not - // correct. compositionResolver.getComponentDependencies() should return only direct dependencies - // - // I will need to add a method like getSortedComponents() - // which will do topological sort of DAG and return list of ordered component which can be used - // by ComponentComposer. - // Possibility of checking if there are cycles probably also must be exposed in API (DAG has it alredy) - // and it should be used - // I can implement cycle detecting from single node (source) as after adding new component - // we don't have to probably check entire graph but we will probably have to check - // if there are cycles. - - /** - * // c5 must come before c3 - * assertTrue( dependencies.indexOf( "c5" ) < dependencies.indexOf( "c3" ) ); - * - * // c4 must come before c3 - * assertTrue( dependencies.indexOf( "c4" ) < dependencies.indexOf( "c3" ) ); - */ - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/Component.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/Component.java deleted file mode 100644 index 6368a9d3d..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/Component.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Component {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentA.java deleted file mode 100644 index fea5dc33a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentA.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentA { - String ROLE = ComponentA.class.getName(); - - ComponentB getComponentB(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentB.java deleted file mode 100644 index f9625fc06..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentB.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentB { - ComponentC getComponentC(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentC.java deleted file mode 100644 index 1a473c2de..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentC.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentC {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentD.java deleted file mode 100644 index 501acc81b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentD.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentD {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentE.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentE.java deleted file mode 100644 index 9c38c6bef..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentE.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ComponentE {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentF.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentF.java deleted file mode 100644 index 35d40705f..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentF.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -/** - * @author Michal Maczka - */ -public class ComponentF { - private ComponentA componentA; - private ComponentB componentB; - private ComponentC[] componentC; - private List componentD; - private Map componentE; - - public ComponentA getComponentA() { - return componentA; - } - - public void setComponentA(ComponentA componentA) { - this.componentA = componentA; - } - - public ComponentB getComponentB() { - return componentB; - } - - public void setComponentB(ComponentB componentB) { - this.componentB = componentB; - } - - public ComponentC[] getComponentC() { - return componentC; - } - - public void setComponentC(ComponentC[] componentC) { - this.componentC = componentC; - } - - public List getComponentD() { - return componentD; - } - - public void setComponentD(List componentD) { - this.componentD = componentD; - } - - public Map getComponentE() { - return componentE; - } - - public void setComponentE(Map componentE) { - this.componentE = componentE; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentRealmCompositionTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentRealmCompositionTest.java deleted file mode 100644 index c7c5ba920..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentRealmCompositionTest.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.codehaus.plexus.component.composition; - -import java.io.File; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.classworlds.realm.ClassRealm; - -import static org.codehaus.plexus.PlexusConstants.PLEXUS_DEFAULT_HINT; - -/** @author Jason van Zyl */ -public class ComponentRealmCompositionTest extends PlexusTestCase { - // - // Component archives - // - private static final String PLUGIN_0_JAR = "src/test/test-components/plugin0-1.0-SNAPSHOT.jar"; - private static final String PLUGIN_1_JAR = "src/test/test-components/plugin1-1.0-SNAPSHOT.jar"; - private static final String COMPONENT_A_JAR = "src/test/test-components/component-a-1.0-SNAPSHOT.jar"; - private static final String COMPONENT_B_JAR = "src/test/test-components/component-b-1.0-SNAPSHOT.jar"; - private static final String COMPONENT_C_JAR = "src/test/test-components/component-c-1.0-SNAPSHOT.jar"; - private static final String ARCHIVER_JAR = "src/test/test-components/plexus-archiver-1.0-alpha-8.jar"; - - // - // Component roles - // - private static final String PLUGIN_0_ROLE = "org.codehaus.plexus.plugins.Plugin0"; - private static final String PLUGIN_1_ROLE = "org.codehaus.plexus.plugins.Plugin1"; - - // - // Component realms - // - private static final String PLUGIN_0_REALM = "plugin0Realm"; - private static final String PLUGIN_1_REALM = "plugin1Realm"; - - protected void setUp() throws Exception { - super.setUp(); - - // Create ClassRealm plugin0 with plugin0 -> A, plugin0 -> B - createClassRealm(PLUGIN_0_REALM, PLUGIN_0_JAR, COMPONENT_A_JAR, COMPONENT_B_JAR, ARCHIVER_JAR); - - // Create ClassRealm plugin1 with plugin1 -> A, plugin1 -> C - createClassRealm(PLUGIN_1_REALM, PLUGIN_1_JAR, COMPONENT_A_JAR, COMPONENT_C_JAR, ARCHIVER_JAR); - } - - /* - * We are testing that when the same component implementation exists in more then one - * realm and components depend on those implementations, that the right realm is used - * to wire up the components. - * - * An example of this in practice are Maven plugins where each plugin is loaded into - * a separate realm and the plugin may have dependencies on other components. We want - * to make sure that a requirement, say a JarArchiver, for a given component, say the - * maven-jar-plugin, is wired up with a JarArchiver taken from the same realm as the - * maven-jar-plugin and not a different realm. - */ - - public void testCompositionWhereTheSameImplementationExistsInDifferentRealms() throws Exception { - // Plugin0 - getContainer().lookup(PLUGIN_0_ROLE); - - // Plugin1 - getContainer().lookup(PLUGIN_1_ROLE); - - // Plugin0(alt) - getContainer().lookup(PLUGIN_0_ROLE, "alt"); - - // Plugin1(alt) - getContainer().lookup(PLUGIN_1_ROLE, "alt"); - } - - public void testThatASingletonComponentIntheCoreRealmWhenLookedUpInComponentRealmsYieldsTheSameInstance() - throws Exception {} - - public void testMultiRealmLookupMap() throws Exception { - Map plugin0Map = getContainer().lookupMap(PLUGIN_0_ROLE); - assertNotNull("plugin0Map is null", plugin0Map); - assertNotNull("plugin0Map does not contain a DefaultPlugin0", plugin0Map.get(PLEXUS_DEFAULT_HINT)); - assertNotNull("plugin0Map does not contain a AltPlugin0", plugin0Map.get("alt")); - assertEquals("Expected only 2 components in plugin0Map", 2, plugin0Map.size()); - - Map plugin1Map = getContainer().lookupMap(PLUGIN_1_ROLE); - assertNotNull("plugin1Map is null", plugin1Map); - assertNotNull("plugin1Map does not contain a DefaultPlugin1", plugin1Map.get(PLEXUS_DEFAULT_HINT)); - assertNotNull("plugin1Map does not contain a AltPlugin1", plugin1Map.get("alt")); - assertEquals("Expected only 2 components in plugin1Map", 2, plugin1Map.size()); - } - - public void testMultiRealmLookupList() throws Exception { - List plugin0List = getContainer().lookupList(PLUGIN_0_ROLE); - assertNotNull("plugin0List is null", plugin0List); - Map plugin0Map = mapByClassSimpleName(plugin0List); - assertNotNull("plugin0List does not contain a DefaultPlugin0", plugin0Map.get("DefaultPlugin0")); - assertNotNull("plugin0List does not contain a AltPlugin0", plugin0Map.get("AltPlugin0")); - assertEquals("Expected only 2 components in plugin0Map", 2, plugin0Map.size()); - - List plugin1List = getContainer().lookupList(PLUGIN_1_ROLE); - assertNotNull("plugin1List is null", plugin1List); - Map plugin1Map = mapByClassSimpleName(plugin1List); - assertNotNull("plugin1List does not contain a DefaultPlugin1", plugin1Map.get("DefaultPlugin1")); - assertNotNull("plugin1List does not contain a AltPlugin1", plugin1Map.get("AltPlugin1")); - assertEquals("Expected only 2 components in plugin0Map", 2, plugin1Map.size()); - } - - private ClassRealm createClassRealm(String id, String... jars) throws Exception { - // create the realm - ClassRealm classRealm = getContainer().createChildRealm(id); - - // populate the realm - for (String jar : jars) { - File file = new File(jar); - assertTrue(jar + " is not a file", file.isFile()); - - URL url = file.toURI().toURL(); - classRealm.addURL(url); - } - - // descover all component definitions in the realm and register them with the repository - getContainer().discoverComponents(classRealm); - - return classRealm; - } - - private Map mapByClassSimpleName(List objects) { - Map map = new TreeMap(); - for (Object object : objects) { - map.put(object.getClass().getSimpleName(), object); - } - return map; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentWithSeveralFieldsOfTheSameType.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentWithSeveralFieldsOfTheSameType.java deleted file mode 100644 index b113c7e4a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/ComponentWithSeveralFieldsOfTheSameType.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Trygve Laugstøl - */ -public class ComponentWithSeveralFieldsOfTheSameType { - private ComponentE one; - - private ComponentE two; - - public ComponentE getOne() { - return one; - } - - public ComponentE getTwo() { - return two; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponent.java deleted file mode 100644 index 708319e90..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultComponent extends AbstractComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentA.java deleted file mode 100644 index 85da06c96..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentA.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultComponentA implements ComponentA { - private ComponentB componentB; - - private String host; - - private String port; - - // Just so we can retrieve the value of componentB for testing. */ - public ComponentB getComponentB() { - return componentB; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentB.java deleted file mode 100644 index 71405d3e4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentB.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Jason van Zyl - * - */ -public class DefaultComponentB implements ComponentB { - private ComponentC componentC; - - public ComponentC getComponentC() { - return componentC; - } - - public void setComponentC(ComponentC componentC) { - System.out.println("Setting componentC:" + componentC); - - this.componentC = componentC; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentC.java deleted file mode 100644 index 279f9fca3..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentC.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultComponentC implements ComponentC {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentComposerManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentComposerManagerTest.java deleted file mode 100644 index 9b8b12e72..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultComponentComposerManagerTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Michal Maczka - */ -public class DefaultComponentComposerManagerTest extends PlexusTestCase { - protected String getCustomConfigurationName() { - return "org/codehaus/plexus/component/composition/components.xml"; - } - - public void testComposition() throws Exception { - ComponentA componentA = lookup(ComponentA.class); - - assertNotNull(componentA); - - ComponentB componentB = componentA.getComponentB(); - - assertNotNull(componentB); - - ComponentC componentC = componentB.getComponentC(); - - assertNotNull(componentC); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultCompositionResolverTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultCompositionResolverTest.java deleted file mode 100644 index 021e40dad..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/composition/DefaultCompositionResolverTest.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.component.composition; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultCompositionResolverTest extends AbstractCompositionResolverTest { - protected CompositionResolver getCompositionResolver() { - return new DefaultCompositionResolver(); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponent.java deleted file mode 100644 index 2179af6be..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponent.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class AbstractComponent implements Component { - private String name; - - public String getName() { - return name; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponentConfiguratorTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponentConfiguratorTest.java deleted file mode 100644 index e04e8c2bd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractComponentConfiguratorTest.java +++ /dev/null @@ -1,850 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.io.File; -import java.io.StringReader; -import java.lang.annotation.ElementType; -import java.net.URI; -import java.net.URL; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; -import java.util.Vector; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.component.configurator.expression.TypeAwareExpressionEvaluator; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.io.PlexusTools; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.PlexusConfigurationException; - -/** - * @author Michal Maczka - */ -public abstract class AbstractComponentConfiguratorTest extends PlexusTestCase { - protected void configureComponent(Object component, ComponentDescriptor descriptor, ClassRealm realm) - throws Exception { - ComponentConfigurator cc = getComponentConfigurator(); - cc.configureComponent(component, descriptor.getConfiguration(), realm); - } - - protected void configureComponent( - Object component, ComponentDescriptor descriptor, ClassRealm realm, ExpressionEvaluator expressionEvaluator) - throws Exception { - ComponentConfigurator cc = getComponentConfigurator(); - cc.configureComponent(component, descriptor.getConfiguration(), expressionEvaluator, realm); - } - - protected abstract ComponentConfigurator getComponentConfigurator() throws Exception; - - public void testComponentConfigurator() throws Exception { - String xml = "" + " true" - + " 64" - + " -128" - + " -1" - + " 1" - + " 2" - + " 3" - + " X" - + " foo" - + " test.txt" - + " http://www.apache.org/" - + " http://maven.apache.org/" - + " " - + " jason" - + " tess" - + " " - + " " - + " jason" - + " " - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ConfigurableComponent component = new ConfigurableComponent(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals("check boolean value", true, component.getBooleanValue()); - - assertEquals("check byte value", 64, component.getByteValue()); - - assertEquals("check short value", -128, component.getShortValue()); - - assertEquals("check integer value", -1, component.getIntValue()); - - assertEquals("check float value", 1.0f, component.getFloatValue(), 0.001f); - - assertEquals("check long value", 2L, component.getLongValue()); - - assertEquals("check double value", 3.0, component.getDoubleValue(), 0.001); - - assertEquals('X', component.getCharValue()); - - assertEquals("foo", component.getStringValue()); - - assertEquals(new File("test.txt"), component.getFileValue()); - - assertEquals(new URI("http://www.apache.org/"), component.getUriValue()); - - assertEquals(new URL("http://maven.apache.org/"), component.getUrlValue()); - - List list = component.getImportantThings(); - - assertEquals(2, list.size()); - - assertEquals("jason", ((ImportantThing) list.get(0)).getName()); - - assertEquals("tess", ((ImportantThing) list.get(1)).getName()); - - // Embedded Configuration - - PlexusConfiguration c = component.getConfiguration(); - - assertEquals("jason", c.getChild("name").getValue()); - } - - public void testComponentConfiguratorWithAComponentThatProvidesSettersForConfiguration() throws Exception { - String xml = "" + " 0" + " 1" - + " 2" + " 3" - + " foo" + " " - + " jason" - + " tess" + " " - + " " + " jason" + " " + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithSetters component = new ComponentWithSetters(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals("check integer value", 0, component.getIntValue()); - - assertTrue(component.intValueSet); - - assertEquals("check float value", 1.0f, component.getFloatValue(), 0.001f); - - assertTrue(component.floatValueSet); - - assertEquals("check long value", 2L, component.getLongValue()); - - assertTrue(component.longValueSet); - - assertEquals("check double value", 3.0, component.getDoubleValue(), 0.001); - - assertTrue(component.doubleValueSet); - - assertEquals("foo", component.getStringValue()); - - assertTrue(component.stringValueSet); - - List list = component.getImportantThings(); - - assertEquals(2, list.size()); - - assertEquals("jason", ((ImportantThing) list.get(0)).getName()); - - assertEquals("tess", ((ImportantThing) list.get(1)).getName()); - - assertTrue(component.importantThingsValueSet); - - // Embedded Configuration - - PlexusConfiguration c = component.getConfiguration(); - - assertEquals("jason", c.getChild("name").getValue()); - - assertTrue(component.configurationValueSet); - } - - public void testComponentConfigurationWhereFieldsToConfigureResideInTheSuperclass() throws Exception { - String xml = "" + " jason" + "
bollywood
" + "
"; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - DefaultComponent component = new DefaultComponent(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals("jason", component.getName()); - - assertEquals("bollywood", component.getAddress()); - } - - public void testComponentConfigurationWhereFieldsAreCollections() throws Exception { - String xml = "" + " " + " " + " life" - + " " + " " + " " + " " - + " life" + " " + " " - + " " + " " - + " life" + " " + " " + " " - + " abc" + " def" + " " - + " abc" - + " abc" + - // TODO: implement List etc.. - // "" + - // " 12" + - // " 34" + - // "" + - ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithCollectionFields component = new ComponentWithCollectionFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - Vector vector = component.getVector(); - - assertEquals("life", ((ImportantThing) vector.get(0)).getName()); - - assertEquals(1, vector.size()); - - Set set = component.getHashSet(); - - assertEquals(1, set.size()); - - Object[] setContents = set.toArray(); - - assertEquals("life", ((ImportantThing) setContents[0]).getName()); - - List list = component.getList(); - - assertEquals(list.getClass(), LinkedList.class); - - assertEquals("life", ((ImportantThing) list.get(0)).getName()); - - assertEquals(1, list.size()); - - List stringList = component.getStringList(); - - assertEquals("abc", (String) stringList.get(0)); - - assertEquals("def", (String) stringList.get(1)); - - assertEquals(2, stringList.size()); - - set = component.getSet(); - - assertEquals(1, set.size()); - - set = component.getSortedSet(); - - assertEquals(1, set.size()); - } - - public void testComponentConfigurationWhereFieldsAreArrays() throws Exception { - String xml = "" + " " + " value1" - + " value2" + " " + " " - + " 42" + " 69" + " " - + " " + " Hello" - + " World!" + " " - + " " + " some string" - + " something important" - + " 303" + " " - + " " - + " http://foo.com/bar" + " file://localhost/c:/windows" + " " - + " " + " c:/windows" + " /usr/local/bin/foo.sh" - + " " + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithArrayFields component = new ComponentWithArrayFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - String[] stringArray = component.getStringArray(); - - assertEquals(2, stringArray.length); - - assertEquals("value1", stringArray[0]); - - assertEquals("value2", stringArray[1]); - - Integer[] integerArray = component.getIntegerArray(); - - assertEquals(2, integerArray.length); - - assertEquals(new Integer(42), integerArray[0]); - - assertEquals(new Integer(69), integerArray[1]); - - ImportantThing[] importantThingArray = component.getImportantThingArray(); - - assertEquals(2, importantThingArray.length); - - assertEquals("Hello", importantThingArray[0].getName()); - - assertEquals("World!", importantThingArray[1].getName()); - - Object[] objectArray = component.getObjectArray(); - - assertEquals(3, objectArray.length); - - assertEquals("some string", objectArray[0]); - - assertEquals("something important", ((ImportantThing) objectArray[1]).getName()); - - assertEquals(303, objectArray[2]); - - URL[] urls = component.getUrlArray(); - - assertEquals(new URL("http://foo.com/bar"), urls[0]); - - assertEquals(new URL("file://localhost/c:/windows"), urls[1]); - - File[] files = component.getFileArray(); - - assertEquals(new File("c:/windows"), files[0]); - - assertEquals(new File("/usr/local/bin/foo.sh"), files[1]); - } - - public void testComponentConfigurationWithCompositeFields() throws Exception { - - String xml = "" - + " " - + " I am not abstract!" + " " + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithCompositeFields component = new ComponentWithCompositeFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertNotNull(component.getThing()); - - assertEquals("I am not abstract!", component.getThing().getName()); - } - - public void testInvalidComponentConfiguration() throws Exception { - - String xml = "theName"; - - try { - PlexusTools.buildConfiguration("", new StringReader(xml)); - - fail("Should have caused an error because of the invalid XML."); - } catch (PlexusConfigurationException e) { - // Error should be caught here. - } catch (Exception e) { - fail("Should have caught the invalid plexus configuration exception."); - } - } - - public void testComponentConfigurationWithPropertiesFields() throws Exception { - - String xml = "" + " " + " " + " firstname" - + " michal" + " " + " " - + " lastname" + " maczka" + " " - + " " + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithPropertiesField component = new ComponentWithPropertiesField(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - Properties properties = component.getSomeProperties(); - - assertNotNull(properties); - - assertEquals("michal", properties.get("firstname")); - - assertEquals("maczka", properties.get("lastname")); - } - - public void testComponentConfigurationWithPropertiesFieldsWithExpression() throws Exception { - - String xml = - "" + " ${injectedProperties} " + ""; - - final Properties propertiesInterpolated = new Properties(); - propertiesInterpolated.put("firstname", "olivier"); - propertiesInterpolated.put("lastname", "lamy"); - - ExpressionEvaluator expressionEvaluator = new ExpressionEvaluator() { - public Object evaluate(String expression) { - return propertiesInterpolated; - } - - public File alignToBaseDirectory(File file) { - return null; - } - }; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithPropertiesField component = new ComponentWithPropertiesField(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm, expressionEvaluator); - - Properties properties = component.getSomeProperties(); - - assertNotNull(properties); - - assertEquals("olivier", properties.get("firstname")); - - assertEquals("lamy", properties.get("lastname")); - } - - public void testComponentConfigurationWithPropertiesFieldsWithExpressions() throws Exception { - - String xml = "" + "" // - + "${theName}${theValue}" // - + "empty" // - + "" + ""; - - final Properties values = new Properties(); - values.put("${theName}", "test"); - values.put("${theValue}", "PASSED"); - - ExpressionEvaluator expressionEvaluator = new ExpressionEvaluator() { - public Object evaluate(String expression) { - return values.containsKey(expression) ? values.get(expression) : expression; - } - - public File alignToBaseDirectory(File file) { - return null; - } - }; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithPropertiesField component = new ComponentWithPropertiesField(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm, expressionEvaluator); - - Properties properties = component.getSomeProperties(); - - assertNotNull(properties); - - assertEquals("PASSED", properties.get("test")); - assertEquals("", properties.get("empty")); - } - - public void testComponentConfigurationWithMapField() throws Exception { - String xml = "" + " " + " Kenney" - + " Westerhof" + " " + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithMapField component = new ComponentWithMapField(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - Map map = component.getMap(); - - assertNotNull(map); - - assertEquals("Kenney", map.get("firstName")); - - assertEquals("Westerhof", map.get("lastName")); - } - - public void testComponentConfigurationWhereFieldIsBadArray() throws Exception { - String xml = "" // - + " string" // - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithArrayFields component = new ComponentWithArrayFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - try { - configureComponent(component, descriptor, realm); - fail("Configuration did not fail"); - } catch (ComponentConfigurationException e) { - } - } - - public void testComponentConfigurationWhereFieldIsEnum() throws Exception { - String xml = "" // - + " TYPE" // - + " ONE" // - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithEnumFields component = new ComponentWithEnumFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals(ElementType.TYPE, component.getSimpleEnum()); - - assertEquals(ComponentWithEnumFields.NestedEnum.ONE, component.getNestedEnum()); - } - - public void testComponentConfigurationWithAmbiguousExpressionValue() throws Exception { - String xml = "" // - + "
${address}
" // - + "
"; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - DefaultComponent component = new DefaultComponent(); - - ExpressionEvaluator expressionEvaluator = new TypeAwareExpressionEvaluator() { - public Object evaluate(String expression) throws ExpressionEvaluationException { - return evaluate(expression, null); - } - - public File alignToBaseDirectory(File file) { - return null; - } - - public Object evaluate(String expression, Class type) throws ExpressionEvaluationException { - if (String.class == type) { - return "PASSED"; - } else { - return Boolean.FALSE; - } - } - }; - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm, expressionEvaluator); - - assertEquals("PASSED", component.getAddress()); - } - - public void testComponentConfigurationWithPrimitiveValueConversion() throws Exception { - String xml = "" // - + " ${primitive}" // - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ConfigurableComponent component = new ConfigurableComponent(); - - ExpressionEvaluator expressionEvaluator = new TypeAwareExpressionEvaluator() { - public Object evaluate(String expression) throws ExpressionEvaluationException { - return evaluate(expression, null); - } - - public File alignToBaseDirectory(File file) { - return null; - } - - public Object evaluate(String expression, Class type) throws ExpressionEvaluationException { - // java.lang.Short -> short -> int - return (short) 23; - } - }; - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm, expressionEvaluator); - - assertEquals(23, component.getIntValue()); - } - - public void testComponentConfigurationWithEmptyContentForBasicField() throws Exception { - String xml = "" // - + "
" // - + "
"; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - DefaultComponent component = new DefaultComponent(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals(null, component.getAddress()); - } - - public void testComponentConfigurationWithEmptyContentForCompositeField() throws Exception { - String xml = "" // - + " " // - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithCompositeFields component = new ComponentWithCompositeFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertNotNull(component.getBean()); - } - - public void testComponentConfigurationWithUnresolvedExpressionContentForCompositeFieldOfNonInstantiatableType() - throws Exception { - String xml = "" // - + " ${null-valued-expression}" // - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithCompositeFields component = new ComponentWithCompositeFields(); - - ExpressionEvaluator expressionEvaluator = new ExpressionEvaluator() { - public Object evaluate(String expression) throws ExpressionEvaluationException { - return null; - } - - public File alignToBaseDirectory(File file) { - return null; - } - }; - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm, expressionEvaluator); - - assertEquals(null, component.getThing()); - } - - public void testComponentConfiguratorFileNormalizesSeparator() throws Exception { - String xml = "" + " dir/test.txt" - + " dir\\test.txt" - + ""; - - PlexusConfiguration configuration = PlexusTools.buildConfiguration("", new StringReader(xml)); - - ComponentWithArrayFields component = new ComponentWithArrayFields(); - - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setRole("role"); - - descriptor.setImplementation(component.getClass().getName()); - - descriptor.setConfiguration(configuration); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm realm = classWorld.newRealm("test", getClass().getClassLoader()); - - configureComponent(component, descriptor, realm); - - assertEquals(new File("dir", "test.txt"), component.getFileArray()[0]); - assertEquals(new File("dir", "test.txt"), component.getFileArray()[1]); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractThing.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractThing.java deleted file mode 100644 index 5e6dbda57..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/AbstractThing.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public abstract class AbstractThing {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/BasicComponentConfiguratorTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/BasicComponentConfiguratorTest.java deleted file mode 100644 index 5e4645027..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/BasicComponentConfiguratorTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public class BasicComponentConfiguratorTest extends AbstractComponentConfiguratorTest { - protected ComponentConfigurator getComponentConfigurator() throws Exception { - return new BasicComponentConfigurator(); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/Component.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/Component.java deleted file mode 100644 index de3edd21a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/Component.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Component {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithArrayFields.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithArrayFields.java deleted file mode 100644 index f797ce82b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithArrayFields.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.io.File; -import java.net.URL; - -/** - * @author Kenney Westerhof - */ -public class ComponentWithArrayFields { - private String[] stringArray; - - private Integer[] integerArray; - - private ImportantThing[] importantThingArray; - - private Object[] objectArray; - - private AbstractThing[] abstractArray; - - private URL[] urlArray; - - private File[] fileArray; - - public String[] getStringArray() { - return stringArray; - } - - public Integer[] getIntegerArray() { - return integerArray; - } - - public ImportantThing[] getImportantThingArray() { - return importantThingArray; - } - - public Object[] getObjectArray() { - return objectArray; - } - - public AbstractThing[] getAbstractThingArray() { - return abstractArray; - } - - public URL[] getUrlArray() { - return urlArray; - } - - public File[] getFileArray() { - return fileArray; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCollectionFields.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCollectionFields.java deleted file mode 100644 index 9bbb1316f..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCollectionFields.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.SortedSet; -import java.util.Vector; - -/** - * @author Michal Maczka - */ -public class ComponentWithCollectionFields { - private Vector vector; - - private HashSet hashSet; - - private List list; - - private List stringList; - - private Set set; - - private SortedSet sortedSet; - - public Vector getVector() { - return vector; - } - - public HashSet getHashSet() { - return hashSet; - } - - public List getList() { - return list; - } - - public List getStringList() { - return stringList; - } - - public Set getSet() { - return set; - } - - public SortedSet getSortedSet() { - return sortedSet; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCompositeFields.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCompositeFields.java deleted file mode 100644 index 9dcc359ab..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithCompositeFields.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * - * @author Michal Maczka - * - */ -public class ComponentWithCompositeFields { - private ThingInterface thing; - - private DefaultComponent bean; - - public ThingInterface getThing() { - return thing; - } - - public DefaultComponent getBean() { - return bean; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithEnumFields.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithEnumFields.java deleted file mode 100644 index da964b449..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithEnumFields.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.lang.annotation.ElementType; - -/** - * @author Benjamin Bentmann - */ -public class ComponentWithEnumFields { - - public enum NestedEnum { - ONE, - TWO, - THREE, - } - - private NestedEnum nestedEnum; - - private ElementType simpleEnum; - - public NestedEnum getNestedEnum() { - return nestedEnum; - } - - public ElementType getSimpleEnum() { - return simpleEnum; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithMapField.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithMapField.java deleted file mode 100644 index 2dac3d9d0..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithMapField.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.Map; - -/** - * - * @author Michal Maczka - * - */ -public class ComponentWithMapField { - private Map map; - - public Map getMap() { - return map; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithPropertiesField.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithPropertiesField.java deleted file mode 100644 index fef0c5b6a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithPropertiesField.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.Properties; - -/** - * - * @author Michal Maczka - * - */ -public class ComponentWithPropertiesField { - private Properties someProperties; - - public Properties getSomeProperties() { - return someProperties; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithSetters.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithSetters.java deleted file mode 100644 index 8387adbd7..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ComponentWithSetters.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.util.List; - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ComponentWithSetters { - private int intValueVariable; - private float floatValueVariable; - private long longValueVariable; - private double doubleValueVariable; - private String stringValueVariable; - private List importantThingsVariable; - private PlexusConfiguration configurationVariable; - - public int getIntValue() { - return intValueVariable; - } - - public float getFloatValue() { - return floatValueVariable; - } - - public long getLongValue() { - return longValueVariable; - } - - public double getDoubleValue() { - return doubleValueVariable; - } - - public String getStringValue() { - return stringValueVariable; - } - - public List getImportantThings() { - return importantThingsVariable; - } - - public PlexusConfiguration getConfiguration() { - return configurationVariable; - } - - // ---------------------------------------------------------------------- - // setters - // ---------------------------------------------------------------------- - - boolean intValueSet; - boolean floatValueSet; - boolean longValueSet; - boolean doubleValueSet; - boolean stringValueSet; - boolean importantThingsValueSet; - boolean configurationValueSet; - - public void setIntValue(int intValue) { - this.intValueVariable = intValue; - - intValueSet = true; - } - - public void setFloatValue(float floatValue) { - this.floatValueVariable = floatValue; - - floatValueSet = true; - } - - public void setLongValue(long longValue) { - this.longValueVariable = longValue; - - longValueSet = true; - } - - public void setDoubleValue(double doubleValue) { - this.doubleValueVariable = doubleValue; - - doubleValueSet = true; - } - - public void setStringValue(String stringValue) { - this.stringValueVariable = stringValue; - - stringValueSet = true; - } - - public void setImportantThings(List importantThings) { - this.importantThingsVariable = importantThings; - - importantThingsValueSet = true; - } - - public void setConfiguration(PlexusConfiguration configuration) { - this.configurationVariable = configuration; - - configurationValueSet = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ConfigurableComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ConfigurableComponent.java deleted file mode 100644 index e98a465fb..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ConfigurableComponent.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -import java.io.File; -import java.net.URI; -import java.net.URL; -import java.util.List; - -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ConfigurableComponent { - private boolean booleanValue; - private byte byteValue; - private short shortValue; - private int intValue; - private float floatValue; - private long longValue; - private double doubleValue; - private char charValue; - private String stringValue; - private File fileValue; - private URI uriValue; - private URL urlValue; - private List importantThings; - private PlexusConfiguration configuration; - - public boolean getBooleanValue() { - return booleanValue; - } - - public int getByteValue() { - return byteValue; - } - - public int getShortValue() { - return shortValue; - } - - public int getIntValue() { - return intValue; - } - - public float getFloatValue() { - return floatValue; - } - - public long getLongValue() { - return longValue; - } - - public double getDoubleValue() { - return doubleValue; - } - - public char getCharValue() { - return charValue; - } - - public String getStringValue() { - return stringValue; - } - - public File getFileValue() { - return fileValue; - } - - public URI getUriValue() { - return uriValue; - } - - public URL getUrlValue() { - return urlValue; - } - - public List getImportantThings() { - return importantThings; - } - - public PlexusConfiguration getConfiguration() { - return configuration; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/DefaultComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/DefaultComponent.java deleted file mode 100644 index 2ac3f6a34..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/DefaultComponent.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultComponent extends AbstractComponent { - private String address; - - public String getAddress() { - return address; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ImportantThing.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ImportantThing.java deleted file mode 100644 index 8506f56d4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ImportantThing.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ImportantThing extends AbstractThing implements ThingInterface { - private String name; - - public String getName() { - return name; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ThingInterface.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ThingInterface.java deleted file mode 100644 index e35a622f6..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/ThingInterface.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -/* - * The MIT License - * - * Copyright (c) 2004, The Codehaus - * - * 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. - */ - -public interface ThingInterface { - String getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/XBeanComponentConfiguratorTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/XBeanComponentConfiguratorTest.java deleted file mode 100644 index 08a52fac3..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/configurator/XBeanComponentConfiguratorTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.component.configurator; - -import org.apache.xbean.recipe.ConstructionException; -import org.apache.xbean.recipe.DefaultExecutionContext; -import org.apache.xbean.recipe.ExecutionContext; -import org.apache.xbean.recipe.ObjectRecipe; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.builder.XBeanComponentBuilder; -import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public class XBeanComponentConfiguratorTest extends AbstractComponentConfiguratorTest { - @Override - protected void configureComponent(Object component, ComponentDescriptor descriptor, ClassRealm realm) - throws Exception { - XBeanComponentBuilder componentBuilder = new XBeanComponentBuilder(); - ObjectRecipe recipe = componentBuilder.createObjectRecipe(component, descriptor, realm); - - // need a caller context - ExecutionContext executionContext = new DefaultExecutionContext(); - executionContext.push(new ObjectRecipe(component.getClass())); - - // call the recipie setProperties directly, but setup the thead state first - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - Thread.currentThread().setContextClassLoader(realm); - ExecutionContext.setContext(executionContext); - try { - recipe.setProperties(component); - } catch (ConstructionException e) { - throw new ComponentConfigurationException("Failed to configure component", e); - } finally { - ExecutionContext.setContext(null); - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - protected void configureComponent( - Object component, ComponentDescriptor descriptor, ClassRealm realm, ExpressionEvaluator expressionEvaluator) - throws Exception { - this.configureComponent(component, descriptor, realm); - } - - public void testComponentConfigurationWithPropertiesFieldsWithExpression() throws Exception { - // expression evalator is not supported since it is not used by normal AutoConfigurePhase - } - - public void testComponentConfigurationWithPropertiesFieldsWithExpressions() throws Exception { - // expression evalator is not supported since it is not used by normal AutoConfigurePhase - } - - public void testComponentConfigurationWithAmbiguousExpressionValue() throws Exception { - // expression evalator is not supported since it is not used by normal AutoConfigurePhase - } - - public void testComponentConfigurationWithPrimitiveValueConversion() throws Exception { - // expression evalator is not supported since it is not used by normal AutoConfigurePhase - } - - public void testComponentConfigurationWithUnresolvedExpressionContentForCompositeFieldOfNonInstantiatableType() - throws Exception { - // expression evalator is not supported since it is not used by normal AutoConfigurePhase - } - - protected ComponentConfigurator getComponentConfigurator() throws Exception { - // this should never be called because the configureComponent is overridden - throw new UnsupportedOperationException(); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/ComponentDiscovererTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/ComponentDiscovererTest.java deleted file mode 100644 index 7f18ad12b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/ComponentDiscovererTest.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.ComponentSetDescriptor; -import org.codehaus.plexus.context.DefaultContext; - -/** - * @author Jason van Zyl - * - */ -public class ComponentDiscovererTest extends PlexusTestCase { - public void testDefaultComponentDiscoverer() throws Exception { - ComponentDiscoverer componentDiscoverer = new DefaultComponentDiscoverer(); - - ClassWorld classWorld = new ClassWorld(); - - ClassRealm core = classWorld.newRealm("core"); - - File testClasses = new File(getBasedir(), "target/test-classes"); - - core.addURL(testClasses.toURL()); - - File classes = new File(getBasedir(), "target/classes"); - - core.addURL(classes.toURL()); - - List componentSetDescriptors = - componentDiscoverer.findComponents(new DefaultContext(), core); - - ComponentDescriptor componentDescriptor = byImplementation(componentSetDescriptors) - .get("org.codehaus.plexus.component.discovery.DefaultDiscoveredComponent"); - - assertNotNull("componentDescriptor is null", componentDescriptor); - - assertEquals("org.codehaus.plexus.component.discovery.DiscoveredComponent", componentDescriptor.getRole()); - - assertEquals( - "org.codehaus.plexus.component.discovery.DefaultDiscoveredComponent", - componentDescriptor.getImplementation()); - } - - private static Map> byImplementation(List descriptorSets) { - TreeMap> index = new TreeMap>(); - for (ComponentSetDescriptor descriptorSet : descriptorSets) { - for (ComponentDescriptor descriptor : descriptorSet.getComponents()) { - index.put(descriptor.getImplementation(), descriptor); - } - } - return index; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DefaultDiscoveredComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DefaultDiscoveredComponent.java deleted file mode 100644 index d1197a6b9..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DefaultDiscoveredComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultDiscoveredComponent implements DiscoveredComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DiscoveredComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DiscoveredComponent.java deleted file mode 100644 index 0c0580fa1..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/discovery/DiscoveredComponent.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.component.discovery; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface DiscoveredComponent { - String ROLE = DiscoveredComponent.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/Component.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/Component.java deleted file mode 100644 index b96679973..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/Component.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Michal Maczka - * @version $Id$ - */ -public interface Component {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplA.java deleted file mode 100644 index 48686223c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplA.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ComponentImplA implements Component {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplB.java deleted file mode 100644 index 49babe9aa..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplB.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Michal Maczka - * @version $Id$ - */ -public class ComponentImplB {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplC.java deleted file mode 100644 index 5d98f904b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/ComponentImplC.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Michal Maczka - * @version $Id$ - */ -public abstract class ComponentImplC {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/DiscoveredComponentFactoryTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/DiscoveredComponentFactoryTest.java deleted file mode 100644 index 67177a86b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/DiscoveredComponentFactoryTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public class DiscoveredComponentFactoryTest extends PlexusTestCase { - public void testShouldFindComponentFactoriesDefinedInBothPlexusXmlAndComponentsXml() throws Exception { - assertNotNull( - "Cannot find test component factory from plexus.xml test resource.", - lookup(ComponentFactory.class, "testFactory1")); - - assertNotNull( - "Cannot find test component factory from components.xml test resource.", - lookup(ComponentFactory.class, "testFactory2")); - } - - public void testShouldInstantiateComponentUsingFactoryDiscoveredInPlexusXml() throws Exception {} - - public void testShouldInstantiateComponentUsingFactoryDiscoveredInComponentsXml() throws Exception { - lookupTestComponent("testFactory2"); - } - - private void lookupTestComponent(String factoryId) throws Exception { - ComponentDescriptor descriptor = new ComponentDescriptor(); - - descriptor.setComponentFactory(factoryId); - - descriptor.setRole("role"); - - descriptor.setRoleHint("hint"); - - descriptor.setImplementation("something interesting"); - - getContainer().addComponentDescriptor(descriptor); - - Object component = lookup("role", "hint"); - - assertTrue(component instanceof TestFactoryResultComponent); - - assertEquals(factoryId, ((TestFactoryResultComponent) component).getFactoryId()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory1.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory1.java deleted file mode 100644 index ad120eb98..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory1.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public class TestComponentFactory1 implements ComponentFactory { - - public String getId() { - return "testFactory1"; - } - - public Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException { - return new TestFactoryResultComponent(getId()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory2.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory2.java deleted file mode 100644 index 052b9a1b5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestComponentFactory2.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -public class TestComponentFactory2 implements ComponentFactory { - - public String getId() { - return "testFactory2"; - } - - public Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException { - return new TestFactoryResultComponent(getId()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestFactoryResultComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestFactoryResultComponent.java deleted file mode 100644 index ae80517d5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/TestFactoryResultComponent.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.component.factory; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class TestFactoryResultComponent { - - private final String factoryId; - - public TestFactoryResultComponent(String factoryId) { - this.factoryId = factoryId; - } - - public String getFactoryId() { - return factoryId; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/java/JavaComponentFactoryTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/java/JavaComponentFactoryTest.java deleted file mode 100644 index 80e75a1e4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/java/JavaComponentFactoryTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.codehaus.plexus.component.factory.java; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; -import org.codehaus.plexus.ContainerConfiguration; -import org.codehaus.plexus.DefaultContainerConfiguration; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.component.factory.Component; -import org.codehaus.plexus.component.factory.ComponentImplA; -import org.codehaus.plexus.component.factory.ComponentImplB; -import org.codehaus.plexus.component.factory.ComponentImplC; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** - * @author Jason van Zyl - * @author Michal Maczka - */ -public class JavaComponentFactoryTest extends TestCase { - public void testComponentCreation() throws Exception { - JavaComponentFactory factory = new JavaComponentFactory(); - - ComponentDescriptor componentDescriptor = new ComponentDescriptor(); - - componentDescriptor.setRole(Component.class.getName()); - - componentDescriptor.setImplementation(ComponentImplA.class.getName()); - - ClassWorld classWorld = new ClassWorld(); - - classWorld.newRealm("core", Thread.currentThread().getContextClassLoader()); - - PlexusContainer container = new DefaultPlexusContainer(containerConfiguration(classWorld)); - - Object component = factory.newInstance(componentDescriptor, classWorld.getRealm("core"), container); - - assertNotNull(component); - } - - public void testComponentCreationWithNotMatchingRoleAndImplemenation() throws Exception { - JavaComponentFactory factory = new JavaComponentFactory(); - - ComponentDescriptor componentDescriptor = new ComponentDescriptor(); - - componentDescriptor.setRole(Component.class.getName()); - - componentDescriptor.setImplementation(ComponentImplB.class.getName()); - - ClassWorld classWorld = new ClassWorld(); - - classWorld.newRealm("core", Thread.currentThread().getContextClassLoader()); - - PlexusContainer container = new DefaultPlexusContainer(containerConfiguration(classWorld)); - - factory.newInstance(componentDescriptor, classWorld.getRealm("core"), container); - } - - public void testInstanciationOfAAbstractComponent() throws Exception { - JavaComponentFactory factory = new JavaComponentFactory(); - - ComponentDescriptor componentDescriptor = new ComponentDescriptor(); - - componentDescriptor.setRole(Component.class.getName()); - - componentDescriptor.setImplementation(ComponentImplC.class.getName()); - - ClassWorld classWorld = new ClassWorld(); - - classWorld.newRealm("core", Thread.currentThread().getContextClassLoader()); - - PlexusContainer container = new DefaultPlexusContainer(containerConfiguration(classWorld)); - - try { - factory.newInstance(componentDescriptor, classWorld.getRealm("core"), container); - - fail("Expected ComponentInstantiationException when instanciating a abstract class."); - } catch (ComponentInstantiationException ex) { - assertTrue(true); - } - } - - private ContainerConfiguration containerConfiguration(ClassWorld classWorld) { - ContainerConfiguration c = new DefaultContainerConfiguration().setClassWorld(classWorld); - - return c; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactory.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactory.java deleted file mode 100644 index 5b68cbf60..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactory.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.component.factory.nonjava; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.factory.ComponentFactory; -import org.codehaus.plexus.component.factory.ComponentInstantiationException; -import org.codehaus.plexus.component.repository.ComponentDescriptor; - -/** @author Jason van Zyl */ -public class NonJavaComponentFactory implements ComponentFactory { - public String getId() { - return "nonjava"; - } - - public Object newInstance(ComponentDescriptor componentDescriptor, ClassRealm classRealm, PlexusContainer container) - throws ComponentInstantiationException { - return "component"; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.java deleted file mode 100644 index 37d533a81..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.component.factory.nonjava; - -import org.codehaus.plexus.PlexusTestCase; -import org.codehaus.plexus.component.factory.ComponentFactory; - -/** @author Jason van Zyl */ -public class NonJavaComponentFactoryTest extends PlexusTestCase { - public void testNonJavaComponentFactory() throws Exception { - ComponentFactory factory = lookup(ComponentFactory.class, "nonjava"); - - assertNotNull(factory); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.java deleted file mode 100644 index c22402336..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.component.manager; - -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Ben Walding - */ -public class ClassicSingletonComponentManagerTest extends PlexusTestCase { - public void testSequentialLookupsReturnTheSameInstance() throws Exception { - Component a = lookup(Component.class); - - Component b = lookup(Component.class); - - Component c = lookup(Component.class); - - Component d = lookup(Component.class); - - assertTrue(a == b); - - assertTrue(a == c); - - assertTrue(a == d); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/Component.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/Component.java deleted file mode 100644 index b63639233..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/Component.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/** @author Jason van Zyl */ -public interface Component { - String ROLE = Component.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/DefaultComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/DefaultComponent.java deleted file mode 100644 index 28b5787b8..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/DefaultComponent.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/** @author Jason van Zyl */ -public class DefaultComponent implements Component {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponent.java deleted file mode 100644 index 9bb04c1fd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponent.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -/** - * A slow starting component that checks that sleeps during its Start phase. - * - * Configuration: - * delay - number of milliseconds to sleep during start() - * @author Ben Walding - */ -public class SlowComponent implements Startable { - public static final String ROLE = SlowComponent.class.getName(); - - /* Number of ms to sleep during start() */ - private long delay; - - public void start() { - try { - Thread.sleep(delay); - } catch (InterruptedException e) { - } - } - - public void stop() {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.java deleted file mode 100644 index b5d8fb3f5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.codehaus.plexus.component.manager; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Ben Walding - */ -public class SlowComponentClassicSingletonComponentManagerTest extends PlexusTestCase { - public void testThreads1() throws Exception { - test(1); - } - - /** - * Tests that multiple concurrent threads don't acquire different components. - * @throws Exception in case of an error. - */ - public void testThreads1000() throws Exception { - test(1000); - } - - private void test(int count) throws Exception { - ComponentLookupThread components[] = new ComponentLookupThread[count]; - // Create them - for (int i = 0; i < count; i++) { - components[i] = new ComponentLookupThread(getContainer()); - } - // Start them - for (int i = 0; i < count; i++) { - components[i].start(); - } - - // Wait for them to finish - for (int i = 0; i < count; i++) { - components[i].join(10000); - } - - // Get master component - SlowComponent masterComponent = lookup(SlowComponent.class); - - // Verify them - for (int i = 0; i < count; i++) { - assertSame( - i + ":" + components[i].getComponent() + " == " + masterComponent, - masterComponent, - components[i].getComponent()); - } - } - - class ComponentLookupThread extends Thread { - final PlexusContainer container; - - private SlowComponent component; - - public ComponentLookupThread(PlexusContainer container) { - /* - * NOTE: A high priority seems to increase the likelihood of exhibiting missing synchronization. - */ - setPriority(MAX_PRIORITY); - this.container = container; - } - - public void run() { - try { - // DefaultPlexusContainer.setLookupRealm( lookupRealm ); - SlowComponent tmpComponent = container.lookup(SlowComponent.class); - - synchronized (this) { - this.component = tmpComponent; - } - } catch (Exception e) { - container.getLookupRealm().display(); - e.printStackTrace(); - } - } - - public SlowComponent getComponent() { - synchronized (this) { - return component; - } - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/DefaultComponentRegistryTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/DefaultComponentRegistryTest.java deleted file mode 100644 index 5821ba8ee..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/DefaultComponentRegistryTest.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.codehaus.plexus.component.registry; - -import junit.framework.TestCase; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -public class DefaultComponentRegistryTest extends TestCase { - - public void testConcurrentDisposeAndLookup() throws Exception { - final PlexusContainer plexus = new DefaultPlexusContainer(); - - ComponentDescriptor descriptor = new ComponentDescriptor( - TestSynchronizedComponent.class, plexus.getContainerRealm()); - descriptor.setRole(TestSynchronizedComponent.class.getCanonicalName()); - descriptor.setImplementation(TestSynchronizedComponent.class.getCanonicalName()); - plexus.addComponentDescriptor(descriptor); - - TestSynchronizedComponent component = plexus.lookup(TestSynchronizedComponent.class); - - class LookupThread extends Thread { - private TestSynchronizedComponent component; - - @Override - public synchronized void run() { - try { - this.component = plexus.lookup(TestSynchronizedComponent.class); - } catch (ComponentLookupException e) { - // expected - } - } - - public synchronized TestSynchronizedComponent getComponent() { - return component; - } - } - - LookupThread lookupThread = new LookupThread(); - - component.setLookupThread(lookupThread); - - plexus.dispose(); - - assertNull(lookupThread.getComponent()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/TestSynchronizedComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/TestSynchronizedComponent.java deleted file mode 100644 index 84e90e731..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/registry/TestSynchronizedComponent.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.component.registry; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; - -public class TestSynchronizedComponent implements Startable { - - private Thread lookupThread; - - public synchronized void start() throws StartingException {} - - public synchronized void stop() throws StoppingException { - lookupThread.start(); - try { - lookupThread.join(); - } catch (InterruptedException e) { - throw new StoppingException("Can't stop lookupThread", e); - } - } - - public synchronized void setLookupThread(Thread lookupThread) { - this.lookupThread = lookupThread; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentDescriptorTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentDescriptorTest.java deleted file mode 100644 index 8e06ea351..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentDescriptorTest.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import junit.framework.TestCase; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.io.PlexusTools; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ComponentDescriptorTest extends TestCase { - public void testSimpleComponentResolution() throws Exception { - String cc1 = "" + " java.lang.String" - + " c1" - + " role-hint" - + " component-profile" - + " " - + " " - + " c2" - + " " - + " " - + " c3" - + " " - + " " - + ""; - - ClassWorld classWorld = new ClassWorld("test", Thread.currentThread().getContextClassLoader()); - ClassRealm realm = classWorld.getRealm("test"); - - ComponentDescriptor c1 = PlexusTools.buildComponentDescriptor(cc1, realm); - - assertEquals("c1", c1.getRole()); - - assertEquals("role-hint", c1.getRoleHint()); - - assertEquals("component-profile", c1.getComponentProfile()); - - List requirements = c1.getRequirements(); - - assertEquals(2, requirements.size()); - - boolean containsC2 = false; - - boolean containsC3 = false; - - for (ComponentRequirement requirement : requirements) { - if (requirement.getRole().equals("c2")) { - containsC2 = true; - } else if (requirement.getRole().equals("c3")) { - containsC3 = true; - } - } - - assertTrue(containsC2); - - assertTrue(containsC3); - } - - public void testShouldNotBeEqualWhenRolesAreSameButHintsAreDifferent() { - ComponentDescriptor desc = new ComponentDescriptor(); - desc.setRole("one"); - desc.setRoleHint("one"); - - ComponentDescriptor desc2 = new ComponentDescriptor(); - desc2.setRole("one"); - desc2.setRoleHint("two"); - - assertFalse(desc.equals(desc2)); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentRequirementTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentRequirementTest.java deleted file mode 100644 index 95a10a8f3..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentRequirementTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * @author Michal Maczka - */ -public class ComponentRequirementTest extends TestCase { - public void testComponentRequirement() { - ComponentRequirement requirement = new ComponentRequirement(); - requirement.setFieldName("field"); - requirement.setRole("role"); - - assertEquals("field", requirement.getFieldName()); - assertEquals("role", requirement.getRole()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentSetTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentSetTest.java deleted file mode 100644 index 9ac15cb30..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/ComponentSetTest.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; - -import junit.framework.TestCase; -import org.codehaus.plexus.classworlds.ClassWorld; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.repository.io.PlexusTools; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ComponentSetTest extends TestCase { - public void testSimpleComponentResolution() throws Exception { - String xml = "" + " " - + " " - + " java.lang.String" - + " c1" - + " role-hint" - + " component-profile" - + " " - + " " - + " c2" - + " " - + " " - + " c3" - + " " - + " " - + " " - + " " - + " " - + " " - + " plexus" - + " wedgy" - + " 1.0" - + " " - + " " - + ""; - - ClassWorld classWorld = new ClassWorld("test", Thread.currentThread().getContextClassLoader()); - ClassRealm realm = classWorld.getRealm("test"); - - ComponentSetDescriptor cs = PlexusTools.buildComponentSet(PlexusTools.buildConfiguration(xml), realm); - - ComponentDescriptor c1 = cs.getComponents().get(0); - - assertEquals("c1", c1.getRole()); - - assertEquals("role-hint", c1.getRoleHint()); - - assertEquals("component-profile", c1.getComponentProfile()); - - List requirements = c1.getRequirements(); - - assertEquals(2, requirements.size()); - - boolean containsC2 = false; - - boolean containsC3 = false; - - for (ComponentRequirement requirement : requirements) { - if (requirement.getRole().equals("c2")) { - containsC2 = true; - } else if (requirement.getRole().equals("c3")) { - containsC3 = true; - } - } - - assertTrue(containsC2); - - assertTrue(containsC3); - - ComponentDependency d1 = cs.getDependencies().get(0); - - assertEquals("plexus", d1.getGroupId()); - - assertEquals("wedgy", d1.getArtifactId()); - - assertEquals("1.0", d1.getVersion()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/DefaultComponentRepositoryTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/DefaultComponentRepositoryTest.java deleted file mode 100644 index 15ccc0548..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/component/repository/DefaultComponentRepositoryTest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.component.repository; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultComponentRepositoryTest extends TestCase { - private static String configuration = "" + ""; - - public void testDefaultComponentRepository() {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationResourceExceptionTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationResourceExceptionTest.java deleted file mode 100644 index 40ff32a65..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationResourceExceptionTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * - * - * @author Jason van Zyl - * - */ -public class ConfigurationResourceExceptionTest extends TestCase { - public void testException() { - PlexusConfigurationResourceException e = new PlexusConfigurationResourceException("bad doggy!"); - - assertEquals("bad doggy!", e.getMessage()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationTestHelper.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationTestHelper.java deleted file mode 100644 index 574ebdf3f..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/ConfigurationTestHelper.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.StringReader; - -import junit.framework.TestCase; -import org.codehaus.plexus.component.repository.io.PlexusTools; - -/** - * @author Jason van Zyl - */ -public abstract class ConfigurationTestHelper extends TestCase { - public static PlexusConfiguration getTestConfiguration() throws Exception { - return PlexusTools.buildConfiguration( - "", new StringReader(ConfigurationTestHelper.getXmlConfiguration())); - } - - public static String getXmlConfiguration() { - return "" + "" - + "" - + "string" - + "0" - + "not-a-number" - + "true" - + "false" - + "not-a-boolean" - + ""; - } - - public static void testConfiguration(PlexusConfiguration c) throws Exception { - // Exercise all value/attribute retrieval methods. - - // Values - - // TODO: uncomment once maven can test the latest plexus-utils - // assertNull( c.getChild( "singleton" ).getValue( null ) ); - - // String - - assertEquals("string", c.getValue("string")); - - assertEquals("string", c.getChild("string").getValue()); - - assertEquals("string", c.getChild("ne-string").getValue("string")); - - assertNull(c.getChild("not-existing").getValue(null)); - - assertEquals("''", "'" + c.getChild("empty-element").getValue() + "'"); - - assertEquals("", c.getChild("empty-element").getValue(null)); - - // Attributes - - assertEquals("string", c.getChild("string").getAttribute("string")); - - assertEquals("attribute", c.getChild("singleton").getAttribute("attribute")); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/DefaultPlexusConfigurationTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/DefaultPlexusConfigurationTest.java deleted file mode 100644 index 6db0494d3..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/DefaultPlexusConfigurationTest.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.codehaus.plexus.configuration; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * @author Ran Tene - */ -public final class DefaultPlexusConfigurationTest extends TestCase { - private DefaultPlexusConfiguration configuration; - - public void setUp() { - configuration = new DefaultPlexusConfiguration("a"); - } - - public void testWithHelper() throws Exception { - PlexusConfiguration c = ConfigurationTestHelper.getTestConfiguration(); - - ConfigurationTestHelper.testConfiguration(c); - } - - public void testGetValue() throws Exception { - String orgValue = "Original String"; - configuration.setValue(orgValue); - assertEquals(orgValue, configuration.getValue()); - } - - public void testGetAttribute() throws Exception { - String key = "key"; - String value = "original value"; - String defaultStr = "default"; - configuration.setAttribute(key, value); - assertEquals(value, configuration.getAttribute(key, defaultStr)); - assertEquals(defaultStr, configuration.getAttribute("newKey", defaultStr)); - } - - public void testGetChild() throws Exception { - DefaultPlexusConfiguration child = (DefaultPlexusConfiguration) configuration.getChild("child"); - - assertNotNull(child); - - child.setValue("child value"); - - assertEquals(1, configuration.getChildCount()); - - child = (DefaultPlexusConfiguration) configuration.getChild("child"); - - assertNotNull(child); - - assertEquals("child value", child.getValue()); - - assertEquals(1, configuration.getChildCount()); - } - - public void testToString() throws Exception { - // TODO: this currently works since getTestConfiguration() invokes PlexusTools.buildConfiguration() - // and it returns XmlPlexusConfiguration actually. - PlexusConfiguration c = ConfigurationTestHelper.getTestConfiguration(); - - assertEquals( - "string\n", - c.getChild("string").toString()); - - // TODO: uncomment once maven can test the latest plexus-utils - assertEquals( - "\n", - c.getChild("singleton").toString()); - } - - public void testProgrammaticConfigurationCreation() throws Exception { - String viewRoot = "/path/to/viewRoot"; - - PlexusConfiguration c = new DefaultPlexusConfiguration("configuration").addChild("viewRoot", viewRoot); - - assertEquals(viewRoot, c.getChild("viewRoot").getValue()); - } - - public void testChildOrdering() throws Exception { - PlexusConfiguration child0 = new DefaultPlexusConfiguration("child"); - PlexusConfiguration child1 = new DefaultPlexusConfiguration("child"); - PlexusConfiguration child2 = new DefaultPlexusConfiguration("special-child"); - PlexusConfiguration child3 = new DefaultPlexusConfiguration("child"); - PlexusConfiguration child4 = new DefaultPlexusConfiguration("child"); - - configuration.addChild(child0); - configuration.addChild(child1); - configuration.addChild(child2); - configuration.addChild(child3); - configuration.addChild(child4); - - assertEquals(5, configuration.getChildCount()); - assertSame(child0, configuration.getChild(0)); - assertSame(child1, configuration.getChild(1)); - assertSame(child2, configuration.getChild(2)); - assertSame(child3, configuration.getChild(3)); - assertSame(child4, configuration.getChild(4)); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReaderTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReaderTest.java deleted file mode 100644 index 2d9d02432..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationReaderTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.StringReader; - -import junit.framework.TestCase; -import org.codehaus.plexus.configuration.ConfigurationTestHelper; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public class XmlPlexusConfigurationReaderTest extends TestCase { - public void testRead() throws Exception { - StringReader sr = new StringReader(ConfigurationTestHelper.getXmlConfiguration()); - - XmlPlexusConfigurationReader reader = new XmlPlexusConfigurationReader(); - - PlexusConfiguration c = reader.read(sr); - - ConfigurationTestHelper.testConfiguration(c); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriterTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriterTest.java deleted file mode 100644 index 191b0ad61..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/io/XmlPlexusConfigurationWriterTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.codehaus.plexus.configuration.io; - -import java.io.StringReader; -import java.io.StringWriter; - -import junit.framework.TestCase; -import org.codehaus.plexus.configuration.ConfigurationTestHelper; -import org.codehaus.plexus.configuration.PlexusConfiguration; -import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration; -import org.codehaus.plexus.util.xml.Xpp3Dom; -import org.codehaus.plexus.util.xml.Xpp3DomBuilder; - -public class XmlPlexusConfigurationWriterTest extends TestCase { - - public void testWrite() throws Exception { - PlexusConfiguration c = ConfigurationTestHelper.getTestConfiguration(); - - XmlPlexusConfigurationWriter cw = new XmlPlexusConfigurationWriter(); - - StringWriter writer = new StringWriter(); - - cw.write(writer, c); - - Xpp3Dom dom = Xpp3DomBuilder.build(new StringReader(writer.toString())); - - XmlPlexusConfiguration c1 = new XmlPlexusConfiguration(dom); - - ConfigurationTestHelper.testConfiguration(c1); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ADummyConfigurationSource.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ADummyConfigurationSource.java deleted file mode 100644 index 6a287b4c5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ADummyConfigurationSource.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public class ADummyConfigurationSource implements ConfigurationSource { - - public PlexusConfiguration getConfiguration(ComponentDescriptor componentDescriptor) { - return null; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/AnotherDummyConfigurationSource.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/AnotherDummyConfigurationSource.java deleted file mode 100644 index 1d726be04..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/AnotherDummyConfigurationSource.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.component.repository.ComponentDescriptor; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -public class AnotherDummyConfigurationSource implements ConfigurationSource { - - private ConfigurationSource configurationSource; - - public PlexusConfiguration getConfiguration(ComponentDescriptor componentDescriptor) { - return null; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/DefaultConfigurationSourceTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/DefaultConfigurationSourceTest.java deleted file mode 100644 index 24432f9dd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/DefaultConfigurationSourceTest.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.PlexusTestCase; - -public class DefaultConfigurationSourceTest extends PlexusTestCase { - - public void testBasic() throws Exception { - // we have no plexus.xml, so the container should use the "default" source, - // which is ContainerConfigurationSource - - ConfigurationSource cs = ((MutablePlexusContainer) getContainer()).getConfigurationSource(); - - assertNotNull(cs); - - assertEquals(ContainerConfigurationSource.class.getName(), cs.getClass().getName()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.java deleted file mode 100644 index 292624c49..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.PlexusTestCase; - -public class ExtendingConfigurationSourceTest extends PlexusTestCase { - public void testBasic() throws Exception { - // we have plexus.xml with two configSources, so the container should use the "chained" case, - // which is ChainedConfigurationSource with 3 elem in list: the plexusDefaultConfig source, - // and the two user provided, in this order: ADummyConfigurationSource, AnotherDummyConfigurationSource - - ConfigurationSource cs = ((MutablePlexusContainer) getContainer()).getConfigurationSource(); - - assertNotNull(cs); - - assertEquals(ChainedConfigurationSource.class.getName(), cs.getClass().getName()); - - ChainedConfigurationSource ccs = (ChainedConfigurationSource) cs; - - // we have 3 config sources overall - assertEquals(3, ccs.getConfigurationSources().size()); - - // and the last in the source list is container source - assertEquals( - ContainerConfigurationSource.class.getName(), - ccs.getConfigurationSources().get(2).getClass().getName()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.java deleted file mode 100644 index 1b20009dc..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.codehaus.plexus.configuration.source; - -import org.codehaus.plexus.MutablePlexusContainer; -import org.codehaus.plexus.PlexusTestCase; - -public class OverridingConfigurationSourceTest extends PlexusTestCase { - public void testBasic() throws Exception { - // we have plexus.xml with configSource that overrides the Plexus default one, so the container - // should use it instead of the "default" one - - ConfigurationSource cs = ((MutablePlexusContainer) getContainer()).getConfigurationSource(); - - assertNotNull(cs); - - assertEquals(ADummyConfigurationSource.class.getName(), cs.getClass().getName()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfigurationTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfigurationTest.java deleted file mode 100644 index 18b5ab795..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/configuration/xml/XmlPlexusConfigurationTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.codehaus.plexus.configuration.xml; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; -import org.codehaus.plexus.configuration.ConfigurationTestHelper; -import org.codehaus.plexus.configuration.PlexusConfiguration; - -/** - * @author Ran Tene - */ -public final class XmlPlexusConfigurationTest extends TestCase { - private XmlPlexusConfiguration configuration; - - public void setUp() { - configuration = new XmlPlexusConfiguration("a"); - } - - public void testWithHelper() throws Exception { - PlexusConfiguration c = ConfigurationTestHelper.getTestConfiguration(); - - ConfigurationTestHelper.testConfiguration(c); - } - - public void testGetValue() throws Exception { - String orgValue = "Original String"; - configuration.setValue(orgValue); - assertEquals(orgValue, configuration.getValue()); - } - - public void testGetAttribute() throws Exception { - String key = "key"; - String value = "original value"; - String defaultStr = "default"; - configuration.setAttribute(key, value); - assertEquals(value, configuration.getAttribute(key, defaultStr)); - assertEquals(defaultStr, configuration.getAttribute("newKey", defaultStr)); - } - - public void testGetChild() throws Exception { - PlexusConfiguration child = (XmlPlexusConfiguration) configuration.getChild("child"); - - assertNotNull(child); - - child.setValue("child value"); - - assertEquals(1, configuration.getChildCount()); - - child = (XmlPlexusConfiguration) configuration.getChild("child"); - - assertNotNull(child); - - assertEquals("child value", child.getValue()); - - assertEquals(1, configuration.getChildCount()); - } - - public void testToString() throws Exception { - PlexusConfiguration c = ConfigurationTestHelper.getTestConfiguration(); - - assertEquals( - "string\n", - c.getChild("string").toString()); - - // TODO: uncomment once maven can test the latest plexus-utils - // assertEquals( "\n", c.getChild( "singleton" ).toString() ); - } - - public void testProgrammaticConfigurationCreation() throws Exception { - String viewRoot = "/path/to/viewRoot"; - - PlexusConfiguration c = new XmlPlexusConfiguration("configuration").addChild("viewRoot", viewRoot); - - assertEquals(viewRoot, c.getChild("viewRoot").getValue()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/context/ContextMapAdapterTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/context/ContextMapAdapterTest.java deleted file mode 100644 index a404dd108..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/context/ContextMapAdapterTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.codehaus.plexus.context; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.StringReader; -import java.io.StringWriter; - -import junit.framework.TestCase; -import org.codehaus.plexus.util.IOUtil; -import org.codehaus.plexus.util.InterpolationFilterReader; - -/** - * Generated by JUnitDoclet, a tool provided by ObjectFab GmbH under LGPL. - * Please see www.junitdoclet.org, www.gnu.org and www.objectfab.de for - * informations about the tool, the licence and the authors. - */ -public class ContextMapAdapterTest extends TestCase { - public ContextMapAdapterTest(String name) { - super(name); - } - - public void testInterpolation() throws Exception { - DefaultContext context = new DefaultContext(); - - context.put("name", "jason"); - - context.put("occupation", "exotic dancer"); - - ContextMapAdapter adapter = new ContextMapAdapter(context); - - assertEquals("jason", (String) adapter.get("name")); - - assertEquals("exotic dancer", (String) adapter.get("occupation")); - - assertNull(adapter.get("foo")); - } - - public void testInterpolationWithContext() throws Exception { - DefaultContext context = new DefaultContext(); - context.put("name", "jason"); - context.put("noun", "asshole"); - - String foo = "${name} is an ${noun}. ${not.interpolated}"; - - InterpolationFilterReader reader = - new InterpolationFilterReader(new StringReader(foo), new ContextMapAdapter(context)); - - StringWriter writer = new StringWriter(); - IOUtil.copy(reader, writer); - - String bar = writer.toString(); - assertEquals("jason is an asshole. ${not.interpolated}", bar); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/context/DefaultContextTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/context/DefaultContextTest.java deleted file mode 100644 index bd55956f2..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/context/DefaultContextTest.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.codehaus.plexus.context; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.HashMap; -import java.util.Map; - -import junit.framework.AssertionFailedError; -import junit.framework.TestCase; - -/** - * TestCase for Context. - * - * @author Berin Loritsch - * @author Leo Sutic - */ -public class DefaultContextTest extends TestCase { - - public DefaultContextTest(String name) { - super(name); - } - - public void testContextCreationWithMap() throws Exception { - Map map = new HashMap(); - - map.put("name", "jason"); - - DefaultContext context = new DefaultContext(map); - - assertEquals("jason", (String) context.get("name")); - - assertEquals(map, context.getContextData()); - - // Test removal - context.put("name", null); - - // There is no data and no parent containerContext. - try { - context.get("name"); - } catch (ContextException e) { - // do nothing - } - } - - public void testAddContext() throws Exception { - DefaultContext context = new DefaultContext(); - context.put("key1", "value1"); - assertTrue("value1".equals(context.get("key1"))); - context.put("key1", ""); - assertTrue("".equals(context.get("key1"))); - - context.put("key1", "value1"); - context.makeReadOnly(); - - try { - context.put("key1", ""); - throw new AssertionFailedError("You are not allowed to change a value after it has been made read only"); - } catch (IllegalStateException ise) { - assertTrue("Value is null", "value1".equals(context.get("key1"))); - } - } - - public void testHiddenItems() throws ContextException { - // initalize - DefaultContext context = new DefaultContext(); - context.put("test", "test"); - - // verify inital state - assertTrue("test".equals(context.get("test"))); - - // hide value and verify - context.hide("test"); - try { - context.get("test"); - fail("The item \"test\" was hidden in the child containerContext, but could still be retrieved via get()."); - } catch (ContextException ce) { - assertTrue(true); - } - - // reset to inital state and verify - context.put("test", "test"); - assertTrue("test".equals(context.get("test"))); - - // mark context read-only and verify that item can not be hidden - context.makeReadOnly(); - try { - context.hide("test"); - fail("hide() did not throw an exception, even though the containerContext is supposed to be read-only."); - } catch (IllegalStateException ise) { - assertTrue(true); - } - - // verify state did not change in failed hide() invocation - assertTrue("test".equals(context.get("test"))); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusTestService.java b/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/PlexusTestService.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/TestServiceImpl.java b/plexus-container-default/src/test/java/org/codehaus/plexus/hierarchy/TestServiceImpl.java deleted file mode 100644 index e69de29bb..000000000 diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/AbstractLoggerManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/AbstractLoggerManagerTest.java deleted file mode 100644 index 21ab211b5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/AbstractLoggerManagerTest.java +++ /dev/null @@ -1,213 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -/** - * Abtract base class for testing implementations of the {@link LoggerManager} - * and {@link Logger} interfaces. - * - * @author Mark H. Wilkinson - * @author Trygve Laugstøl - * @version $Revision$ - */ -public abstract class AbstractLoggerManagerTest extends PlexusTestCase { - protected abstract LoggerManager createLoggerManager() throws Exception; - - public void testSetThreshold() throws Exception { - LoggerManager manager; - Logger logger1, logger2; - - manager = createLoggerManager(); - - manager.setThreshold(Logger.LEVEL_FATAL); - logger1 = manager.getLoggerForComponent("role1", "roleHint1"); - assertEquals(Logger.LEVEL_FATAL, logger1.getThreshold()); - - manager.setThreshold(Logger.LEVEL_DEBUG); - logger2 = manager.getLoggerForComponent("role2", "roleHint2"); - assertEquals(Logger.LEVEL_FATAL, logger1.getThreshold()); - assertEquals(Logger.LEVEL_DEBUG, logger2.getThreshold()); - } - - /** - * There is only one logger instance pr component even if looked up more that once. - * @throws Exception in case of an error. - */ - public void testActiveLoggerCount() throws Exception { - LoggerManager manager; - Logger b, c1_1, c1_2, c2; - - manager = getManager(Logger.LEVEL_FATAL); - assertEquals(0, manager.getActiveLoggerCount()); - - b = manager.getLoggerForComponent("b"); - assertNotNull(b); - assertEquals(1, manager.getActiveLoggerCount()); - - c1_1 = manager.getLoggerForComponent("c", "1"); - c1_2 = manager.getLoggerForComponent("c", "1"); - assertNotNull(c1_1); - assertNotNull(c1_2); - assertSame(c1_1, c1_2); - assertEquals(2, manager.getActiveLoggerCount()); - - c2 = manager.getLoggerForComponent("c", "2"); - assertNotNull(c2); - assertEquals(3, manager.getActiveLoggerCount()); - - manager.returnComponentLogger("c", "1"); - assertEquals(2, manager.getActiveLoggerCount()); - - manager.returnComponentLogger("c", "2"); - manager.returnComponentLogger("c", "2"); - manager.returnComponentLogger("c", "1"); - assertEquals(1, manager.getActiveLoggerCount()); - - manager.returnComponentLogger("b"); - assertEquals(0, manager.getActiveLoggerCount()); - } - - public void testDebugLevelConfiguration() throws Exception { - LoggerManager manager = getManager(Logger.LEVEL_DEBUG); - - Logger logger = extractLogger(manager); - - checkDebugLevel(logger); - - logger = extractLogger(manager); - - checkDebugLevel(logger); - } - - public void testInfoLevelConfiguration() throws Exception { - LoggerManager manager = getManager(Logger.LEVEL_INFO); - - Logger logger = extractLogger(manager); - - checkInfoLevel(logger); - - logger = extractLogger(manager); - - checkInfoLevel(logger); - } - - public void testWarnLevelConfiguration() throws Exception { - LoggerManager manager = getManager(Logger.LEVEL_WARN); - - Logger logger = extractLogger(manager); - - checkWarnLevel(logger); - - logger = extractLogger(manager); - - checkWarnLevel(logger); - } - - public void testErrorLevelConfiguration() throws Exception { - LoggerManager manager = getManager(Logger.LEVEL_ERROR); - - Logger logger = extractLogger(manager); - - checkErrorLevel(logger); - - logger = extractLogger(manager); - - checkErrorLevel(logger); - } - - public void testFatalLevelConfiguration() throws Exception { - LoggerManager manager = getManager(Logger.LEVEL_FATAL); - - Logger logger = extractLogger(manager); - - checkFatalLevel(logger); - - logger = extractLogger(manager); - - checkFatalLevel(logger); - } - - private LoggerManager getManager(int threshold) throws Exception { - LoggerManager manager = createLoggerManager(); - - manager.setThreshold(threshold); - - assertNotNull(manager); - - return manager; - } - /* - private Logger extractRootLogger( LoggerManager manager ) - { - Logger logger = manager.getRootLogger(); - - assertNotNull( logger ); - - return logger; - } - */ - private Logger extractLogger(LoggerManager manager) { - Logger logger = manager.getLoggerForComponent("foo"); - - assertNotNull(logger); - assertEquals("foo", logger.getName()); - - return logger; - } - - private void checkDebugLevel(Logger logger) { - assertTrue("debug enabled", logger.isDebugEnabled()); - assertTrue("info enabled", logger.isInfoEnabled()); - assertTrue("warn enabled", logger.isWarnEnabled()); - assertTrue("error enabled", logger.isErrorEnabled()); - assertTrue("fatal enabled", logger.isFatalErrorEnabled()); - } - - private void checkInfoLevel(Logger logger) { - assertFalse("debug disabled", logger.isDebugEnabled()); - assertTrue("info enabled", logger.isInfoEnabled()); - assertTrue("warn enabled", logger.isWarnEnabled()); - assertTrue("error enabled", logger.isErrorEnabled()); - assertTrue("fatal enabled", logger.isFatalErrorEnabled()); - } - - private void checkWarnLevel(Logger logger) { - assertFalse("debug disabled", logger.isDebugEnabled()); - assertFalse("info disabled", logger.isInfoEnabled()); - assertTrue("warn enabled", logger.isWarnEnabled()); - assertTrue("error enabled", logger.isErrorEnabled()); - assertTrue("fatal enabled", logger.isFatalErrorEnabled()); - } - - private void checkErrorLevel(Logger logger) { - assertFalse("debug disabled", logger.isDebugEnabled()); - assertFalse("info disabled", logger.isInfoEnabled()); - assertFalse("warn disabled", logger.isWarnEnabled()); - assertTrue("error enabled", logger.isErrorEnabled()); - assertTrue("fatal enabled", logger.isFatalErrorEnabled()); - } - - private void checkFatalLevel(Logger logger) { - assertFalse("debug disabled", logger.isDebugEnabled()); - assertFalse("info disabled", logger.isInfoEnabled()); - assertFalse("warn disabled", logger.isWarnEnabled()); - assertFalse("error disabled", logger.isErrorEnabled()); - assertTrue("fatal enabled", logger.isFatalErrorEnabled()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/CustomLoggerManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/CustomLoggerManagerTest.java deleted file mode 100644 index 96b93048b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/CustomLoggerManagerTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -// TODO: this test will get nuked, this needs to be done programmatically - -/** - * @author Trygve Laugstøl - */ -public class CustomLoggerManagerTest extends PlexusTestCase { - public void testBasic() throws Exception { - LoggerManager manager = lookup(LoggerManager.class); - - assertNotNull(manager); - - assertEquals(MockLoggerManager.class.getName(), manager.getClass().getName()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/LogEnabledTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/LogEnabledTest.java deleted file mode 100644 index 26e0cbc25..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/LogEnabledTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import junit.framework.TestCase; - -/** - * - * @author peter at realityforge.org Peter Donald - */ -public class LogEnabledTest extends TestCase { - public void testGetLogger() throws Exception { - MockLogEnabled logEnabled = new MockLogEnabled(); - MockLogger logger = new MockLogger("base"); - logEnabled.enableLogging(logger); - assertEquals("logger", logger, logEnabled.getLogger()); - } - - public void testSetupLoggerOnLogEnabled() throws Exception { - MockLogEnabled logEnabled = new MockLogEnabled(); - MockLogEnabled childLogEnabled = new MockLogEnabled(); - MockLogger logger = new MockLogger("base"); - logEnabled.enableLogging(logger); - logEnabled.setupLogger(childLogEnabled); - assertEquals("logEnabled.logger", logger, logEnabled.getLogger()); - assertEquals("childLogEnabled.logger", logger, childLogEnabled.getLogger()); - } - - public void testSetupLoggerOnNonLogEnabled() throws Exception { - MockLogEnabled logEnabled = new MockLogEnabled(); - MockLogger logger = new MockLogger("base"); - logEnabled.enableLogging(logger); - logEnabled.setupLogger(new Object()); - } - - public void testSetupLoggerWithNameOnLogEnabled() throws Exception { - MockLogEnabled logEnabled = new MockLogEnabled(); - MockLogEnabled childLogEnabled = new MockLogEnabled(); - MockLogger logger = new MockLogger("base"); - logEnabled.enableLogging(logger); - logEnabled.setupLogger(childLogEnabled, "child"); - assertEquals("logEnabled.logger", logger, logEnabled.getLogger()); - assertEquals("childLogEnabled.logger.name", "base.child", ((MockLogger) childLogEnabled.getLogger()).getName()); - } - - public void testSetupLoggerWithNullName() throws Exception { - MockLogEnabled logEnabled = new MockLogEnabled(); - MockLogEnabled childLogEnabled = new MockLogEnabled(); - MockLogger logger = new MockLogger("base"); - logEnabled.enableLogging(logger); - try { - logEnabled.setupLogger(childLogEnabled, (String) null); - } catch (IllegalStateException npe) { - return; - } - fail("Expected to fail setting up child logger with null name"); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogEnabled.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogEnabled.java deleted file mode 100644 index ddc136f04..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogEnabled.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -class MockLogEnabled extends AbstractLogEnabled {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogger.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogger.java deleted file mode 100644 index a403046be..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLogger.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * @author Peter Donald - * @version $Revision$ $Date$ - */ -class MockLogger implements Logger { - private final String m_name; - - MockLogger(String name) { - m_name = name; - } - - public String getName() { - return m_name; - } - - public Logger getChildLogger(final String name) { - return new MockLogger(getName() + "." + name); - } - - public void debug(String message) {} - - public void debug(String message, Throwable throwable) {} - - public boolean isDebugEnabled() { - return false; - } - - public void info(String message) {} - - public void info(String message, Throwable throwable) {} - - public boolean isInfoEnabled() { - return false; - } - - public void warn(String message) {} - - public void warn(String message, Throwable throwable) {} - - public boolean isWarnEnabled() { - return false; - } - - public boolean isFatalErrorEnabled() { - return false; - } - - public void fatalError(String message) {} - - public void fatalError(String message, Throwable throwable) {} - - public void error(String message) {} - - public void error(String message, Throwable throwable) {} - - public boolean isErrorEnabled() { - return false; - } - - public int getThreshold() { - return 0; - } - - public void setThreshold(int threshold) {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLoggerManager.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLoggerManager.java deleted file mode 100644 index 5b7c4b52b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/MockLoggerManager.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.logging; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @author Trygve Laugstøl - */ -public class MockLoggerManager implements LoggerManager { - public void setThreshold(int threshold) {} - - public void setThresholds(int threshold) {} - - public int getThreshold() { - return 0; - } - - public void setThreshold(String role, int threshold) {} - - public void setThreshold(String role, String roleHint, int threshold) {} - - public int getThreshold(String role) { - return 0; - } - - public int getThreshold(String role, String roleHint) { - return 0; - } - - public Logger getLoggerForComponent(String role) { - return new MockLogger(role.getClass().getName()); - } - - public Logger getLoggerForComponent(String role, String roleHint) { - return new MockLogger(role.getClass().getName() + ":" + roleHint); - } - - public void returnComponentLogger(String role) {} - - public void returnComponentLogger(String role, String hint) {} - - public int getActiveLoggerCount() { - return 0; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.java deleted file mode 100644 index 86376c3f1..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.codehaus.plexus.logging.console; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.logging.AbstractLoggerManagerTest; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.logging.LoggerManager; - -/** - * Test for {@link org.codehaus.plexus.logging.console.ConsoleLoggerManager} and - * {@link org.codehaus.plexus.logging.console.ConsoleLogger}. - * - * @author Mark H. Wilkinson - * @version $Revision$ - */ -public final class ConsoleLoggerManagerTest extends AbstractLoggerManagerTest { - protected LoggerManager createLoggerManager() throws Exception { - return lookup(LoggerManager.class); - } - - public void testSetAllThresholds() throws Exception { - LoggerManager manager = createLoggerManager(); - manager.setThreshold(Logger.LEVEL_ERROR); - - Logger logger = manager.getLoggerForComponent("test"); - assertEquals(logger.getThreshold(), Logger.LEVEL_ERROR); - - manager.setThresholds(Logger.LEVEL_DEBUG); - assertEquals(logger.getThreshold(), Logger.LEVEL_DEBUG); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerTest.java deleted file mode 100644 index 74b87ddf4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/logging/console/ConsoleLoggerTest.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.codehaus.plexus.logging.console; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - -import junit.framework.TestCase; -import org.codehaus.plexus.util.StringUtils; - -/** - * @author Jason van Zyl - * - */ -public class ConsoleLoggerTest extends TestCase { - public void testConsoleLogger() { - ConsoleLogger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG, "test"); - - assertTrue(logger.isDebugEnabled()); - - assertTrue(logger.isInfoEnabled()); - - assertTrue(logger.isWarnEnabled()); - - assertTrue(logger.isErrorEnabled()); - - assertTrue(logger.isFatalErrorEnabled()); - - // Save the original print stream. - PrintStream original = System.out; - - Throwable t = new Throwable("throwable"); - - ByteArrayOutputStream os = new ByteArrayOutputStream(); - - PrintStream consoleStream = new PrintStream(os); - - System.setOut(consoleStream); - - logger.debug("debug"); - - assertEquals("[DEBUG] debug", getMessage(consoleStream, os)); - - logger.debug("debug", t); - - assertEquals("[DEBUG] debug", getMessage(consoleStream, os)); - - os = new ByteArrayOutputStream(); - - consoleStream = new PrintStream(os); - - System.setOut(consoleStream); - - logger.info("info"); - - assertEquals("[INFO] info", getMessage(consoleStream, os)); - - logger.info("info", t); - - assertEquals("[INFO] info", getMessage(consoleStream, os)); - - os = new ByteArrayOutputStream(); - - consoleStream = new PrintStream(os); - - System.setOut(consoleStream); - - logger.warn("warn"); - - assertEquals("[WARNING] warn", getMessage(consoleStream, os)); - - logger.warn("warn", t); - - assertEquals("[WARNING] warn", getMessage(consoleStream, os)); - - os = new ByteArrayOutputStream(); - - consoleStream = new PrintStream(os); - - System.setOut(consoleStream); - - logger.error("error"); - - assertEquals("[ERROR] error", getMessage(consoleStream, os)); - - logger.error("error", t); - - assertEquals("[ERROR] error", getMessage(consoleStream, os)); - - os = new ByteArrayOutputStream(); - - consoleStream = new PrintStream(os); - - System.setOut(consoleStream); - - logger.fatalError("error"); - - assertEquals("[FATAL ERROR] error", getMessage(consoleStream, os)); - - logger.fatalError("error", t); - - assertEquals("[FATAL ERROR] error", getMessage(consoleStream, os)); - - // Set the original print stream. - System.setOut(original); - } - - private String getMessage(PrintStream consoleStream, ByteArrayOutputStream os) { - consoleStream.flush(); - - consoleStream.close(); - - return StringUtils.chopNewline(os.toString()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/AbstractStartableComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/AbstractStartableComponent.java deleted file mode 100644 index 3d858d0f9..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/AbstractStartableComponent.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.plexus.test; - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; - -import static junit.framework.Assert.assertTrue; - -public class AbstractStartableComponent implements StartableComponent, Startable { - public int startOrder; - - public int stopOrder; - - public AbstractStartableComponent component1; - - public AbstractStartableComponent component2; - - public void start() throws StartingException { - startOrder = startGenerator.getAndIncrement(); - } - - public void stop() throws StoppingException { - stopOrder = stopGenerator.getAndIncrement(); - } - - public void assertStartOrderCorrect() { - if (component1 != null) { - assertTrue("This component started before injected component1", startOrder > component1.startOrder); - } - if (component2 != null) { - assertTrue("This component started before injected component2", startOrder > component2.startOrder); - } - - // assert children are correct - if (component1 != null) { - component1.assertStartOrderCorrect(); - } - if (component2 != null) { - component2.assertStartOrderCorrect(); - } - } - - public void assertStopOrderCorrect() { - if (component1 != null) { - assertTrue("This component stopped after injected component1", stopOrder < component1.stopOrder); - } - if (component2 != null) { - assertTrue("This component stopped after injected component2", stopOrder < component2.stopOrder); - } - - // assert children are correct - if (component1 != null) { - component1.assertStopOrderCorrect(); - } - if (component2 != null) { - component2.assertStopOrderCorrect(); - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Action.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/Action.java deleted file mode 100644 index 1c6c73817..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Action.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Action {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/AddUserAction.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/AddUserAction.java deleted file mode 100644 index 3eed8190d..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/AddUserAction.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class AddUserAction implements Action {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/CircularComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/CircularComponent.java deleted file mode 100644 index a831f7ba4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/CircularComponent.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.codehaus.plexus.test; - -public interface CircularComponent { - static String ROLE = CircularComponent.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Component.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/Component.java deleted file mode 100644 index 09583297d..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Component.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.test.map.Activity; - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Component { - static String ROLE = Component.class.getName(); - - String getHost(); - - int getPort(); - - Activity getActivity(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentA.java deleted file mode 100644 index 6ef1ba1bd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentA.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ComponentA { - static String ROLE = ComponentA.class.getName(); - - ComponentB getComponentB(); - - ComponentC getComponentC(); - - String getHost(); - - int getPort(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentB.java deleted file mode 100644 index b7aae6b82..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentB.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ComponentB { - static String ROLE = ComponentB.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentC.java deleted file mode 100644 index 9001e0ce4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentC.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ComponentC { - static String ROLE = ComponentC.class.getName(); - - ComponentD getComponentD(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentD.java deleted file mode 100644 index fc3f29cf5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentD.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ComponentD { - static String ROLE = ComponentD.class.getName(); - - String getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentManager.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentManager.java deleted file mode 100644 index 2f48ee51c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentManager.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -public interface ComponentManager { - - List getList(); - - Map getMap(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentWithRoleDefault.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentWithRoleDefault.java deleted file mode 100644 index 304339835..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ComponentWithRoleDefault.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class ComponentWithRoleDefault {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ConcreteThing.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ConcreteThing.java deleted file mode 100644 index 705f138a8..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ConcreteThing.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class ConcreteThing implements Thing {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/CountInstancesComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/CountInstancesComponent.java deleted file mode 100644 index 7f2d4566e..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/CountInstancesComponent.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Component counts number of created instances of it. - * - * @author ptab at newitech.com Piotr Tabor - */ -public class CountInstancesComponent { - public static String ROLE = CountInstancesComponent.class.getName(); - - private static int instances = 0; - - public CountInstancesComponent() { - instances++; - } - - public static void reset() { - instances = 0; - } - - public static int getInstancesCount() { - return instances; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultCircularComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultCircularComponent.java deleted file mode 100644 index 35a59a57b..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultCircularComponent.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.codehaus.plexus.test; - -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException; - -public class DefaultCircularComponent implements CircularComponent, Startable { - private PlexusContainer container; - private String lookup; - private CircularComponent requirement; - - public void start() throws StartingException { - try { - if (lookup != null) { - container.lookup(CircularComponent.class, lookup); - } - } catch (Exception e) { - throw new StartingException("failed", e); - } - } - - public void stop() throws StoppingException {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponent.java deleted file mode 100644 index 80fb8d918..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponent.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.test.map.Activity; - -public class DefaultComponent implements Component { - private String host; - - private int port; - - private Activity activity; - - public Activity getActivity() { - return activity; - } - - public String getHost() { - return host; - } - - public int getPort() { - return port; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentA.java deleted file mode 100644 index 63d3ad612..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentA.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @component.role org.codehaus.plexus.test.ComponentA - * @component.requirement org.codehaus.plexus.test.ComponentB - * @component.requirement org.codehaus.plexus.test.ComponentC - * @component.version 1.0 - */ -public class DefaultComponentA implements ComponentA { - private ComponentB componentB; - - private ComponentC componentC; - - /** @default localhost */ - private String host; - - /** @default 10000 */ - private int port; - - public ComponentB getComponentB() { - return componentB; - } - - public ComponentC getComponentC() { - return componentC; - } - - public String getHost() { - return host; - } - - public int getPort() { - return port; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentB.java deleted file mode 100644 index a10c4c5cf..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentB.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * 2.0 - */ -public class DefaultComponentB implements ComponentB {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentC.java deleted file mode 100644 index c8d65a4b0..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentC.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DefaultComponentC implements ComponentC { - private ComponentD componentD; - - public ComponentD getComponentD() { - return componentD; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentD.java deleted file mode 100644 index 30faeb0b4..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentD.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DefaultComponentD implements ComponentD { - private String name; - - public String getName() { - return name; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentManager.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentManager.java deleted file mode 100644 index 17b5d5128..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentManager.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -public class DefaultComponentManager implements ComponentManager { - - private List list; - - private Map map; - - public List getList() { - return list; - } - - public Map getMap() { - return map; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentWithOptionalRequirement.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentWithOptionalRequirement.java deleted file mode 100644 index 6a963e85e..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultComponentWithOptionalRequirement.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DefaultComponentWithOptionalRequirement extends DefaultComponent { - - public Object optionalComponent; -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartService.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartService.java deleted file mode 100644 index 4aae834ee..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartService.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultLoadOnStartService implements LoadOnStartService, Startable { - public static boolean isStarted = false; - - public void start() { - isStarted = true; - } - - public void stop() {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartServiceWithRoleHint.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartServiceWithRoleHint.java deleted file mode 100644 index 0d9190207..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultLoadOnStartServiceWithRoleHint.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultLoadOnStartServiceWithRoleHint implements LoadOnStartService {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceB.java deleted file mode 100644 index 9d5b9951c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceB.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -/** - * A simple native plexus component. - */ -public class DefaultServiceB extends AbstractLogEnabled - implements ServiceB, Contextualizable, Initializable, Startable { - public boolean enableLogging; - public boolean contextualize; - public boolean initialize; - public boolean start; - public boolean stop; - - public void enableLogging(Logger logger) { - enableLogging = true; - } - - public void contextualize(Context context) throws ContextException { - contextualize = true; - } - - public void initialize() { - initialize = true; - } - - public void start() { - start = true; - } - - public void stop() { - stop = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceC.java deleted file mode 100644 index 3f55367bd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceC.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -public class DefaultServiceC implements ServiceC, Startable { - public boolean started = false; - public boolean stopped = false; - - public void start() { - started = true; - } - - public void stop() { - stopped = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceD.java deleted file mode 100644 index 9cb719259..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceD.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DefaultServiceD implements ServiceD {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceE.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceE.java deleted file mode 100644 index 1d46952cf..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceE.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.logging.Logger; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable; - -/** - * A simple native plexus component implementing the manual configuration phase. - */ -public class DefaultServiceE extends AbstractLogEnabled - implements ServiceE, Contextualizable, Initializable, Startable { - public boolean enableLogging; - public boolean configured; - public boolean contextualize; - public boolean initialize; - public boolean start; - public boolean stop; - public boolean serviced; - - public void enableLogging(Logger logger) { - enableLogging = true; - } - - public void contextualize(Context context) throws ContextException { - contextualize = true; - } - - public void initialize() { - initialize = true; - } - - public void start() { - start = true; - } - - public void stop() { - stop = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceH.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceH.java deleted file mode 100644 index 8c2015ffb..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultServiceH.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.test.lifecycle.phase.Eeny; -import org.codehaus.plexus.test.lifecycle.phase.Meeny; -import org.codehaus.plexus.test.lifecycle.phase.Miny; -import org.codehaus.plexus.test.lifecycle.phase.Mo; - -/** This component implements the custom lifecycle defined by the phases - * - * Eeny - * Meeny - * Miny - * Mo - * - */ -public class DefaultServiceH extends AbstractLogEnabled implements ServiceH, Eeny, Meeny, Miny, Mo { - public boolean eeny; - public boolean meeny; - public boolean miny; - public boolean mo; - - // ---------------------------------------------------------------------- - // Lifecycle Management - // ---------------------------------------------------------------------- - - public void eeny() { - eeny = true; - } - - public void meeny() { - meeny = true; - } - - public void miny() { - miny = true; - } - - public void mo() { - mo = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentA.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentA.java deleted file mode 100644 index 988ca4b13..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentA.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.codehaus.plexus.test; - -public class DefaultStartableComponentA extends AbstractStartableComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentB.java deleted file mode 100644 index e34bf6851..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentB.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.codehaus.plexus.test; - -public class DefaultStartableComponentB extends AbstractStartableComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentC.java deleted file mode 100644 index 9645bbb56..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentC.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.codehaus.plexus.test; - -public class DefaultStartableComponentC extends AbstractStartableComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentD.java deleted file mode 100644 index 517bd8497..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentD.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.codehaus.plexus.test; - -public class DefaultStartableComponentD extends AbstractStartableComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentE.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentE.java deleted file mode 100644 index d7d15ab19..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultStartableComponentE.java +++ /dev/null @@ -1,3 +0,0 @@ -package org.codehaus.plexus.test; - -public class DefaultStartableComponentE extends AbstractStartableComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultThingUser.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultThingUser.java deleted file mode 100644 index 19a3ebe65..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/DefaultThingUser.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class DefaultThingUser implements ThingUser { - - public Thing thing; -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LiveComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/LiveComponent.java deleted file mode 100644 index bebf57bbb..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LiveComponent.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public class LiveComponent {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartService.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartService.java deleted file mode 100644 index e7d9929fc..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartService.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface LoadOnStartService { - String ROLE = LoadOnStartService.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartServiceWithRoleHint.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartServiceWithRoleHint.java deleted file mode 100644 index 219aa0db8..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/LoadOnStartServiceWithRoleHint.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface LoadOnStartServiceWithRoleHint { - String ROLE = LoadOnStartServiceWithRoleHint.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/PlexusContainerTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/PlexusContainerTest.java deleted file mode 100644 index 43898dc4d..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/PlexusContainerTest.java +++ /dev/null @@ -1,792 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.io.File; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.atomic.AtomicBoolean; - -import junit.framework.TestCase; -import org.codehaus.plexus.ContainerConfiguration; -import org.codehaus.plexus.DefaultContainerConfiguration; -import org.codehaus.plexus.DefaultPlexusContainer; -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.discovery.DiscoveredComponent; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.lifecycle.BasicLifecycleHandler; -import org.codehaus.plexus.lifecycle.LifecycleHandler; -import org.codehaus.plexus.test.lifecycle.phase.EenyPhase; -import org.codehaus.plexus.test.lifecycle.phase.MeenyPhase; -import org.codehaus.plexus.test.lifecycle.phase.MinyPhase; -import org.codehaus.plexus.test.lifecycle.phase.MoPhase; -import org.codehaus.plexus.test.list.Pipeline; -import org.codehaus.plexus.test.list.Valve; -import org.codehaus.plexus.test.list.ValveFour; -import org.codehaus.plexus.test.list.ValveOne; -import org.codehaus.plexus.test.list.ValveThree; -import org.codehaus.plexus.test.list.ValveTwo; -import org.codehaus.plexus.test.map.Activity; -import org.codehaus.plexus.test.map.ActivityManager; - -public class PlexusContainerTest extends TestCase { - private String basedir; - - private ClassLoader classLoader; - - private String configuration; - - private DefaultPlexusContainer container; - - public PlexusContainerTest(String name) { - super(name); - } - - public void setUp() throws Exception { - basedir = System.getProperty("basedir"); - - classLoader = getClass().getClassLoader(); - - configuration = "/" + getClass().getName().replace('.', '/') + ".xml"; - - assertNotNull(classLoader); - - // ---------------------------------------------------------------------------- - // Context - // ---------------------------------------------------------------------------- - - Map context = new HashMap(); - - context.put("basedir", basedir); - - context.put("plexus.home", basedir + "/target/plexus-home"); - - LifecycleHandler arbitrary = new BasicLifecycleHandler("arbitrary"); - arbitrary.addBeginSegment(new EenyPhase()); - arbitrary.addBeginSegment(new MeenyPhase()); - arbitrary.addBeginSegment(new MinyPhase()); - arbitrary.addBeginSegment(new MoPhase()); - - ContainerConfiguration containerConfiguration = new DefaultContainerConfiguration() - .setName("test") - .setContext(context) - .setContainerConfiguration(configuration) - .addLifecycleHandler(arbitrary); - - container = new DefaultPlexusContainer(containerConfiguration); - } - - public void tearDown() throws Exception { - container.dispose(); - - container = null; - } - - public void testDefaultPlexusContainerSetup() throws Exception { - assertEquals("bar", System.getProperty("foo")); - } - - // ---------------------------------------------------------------------- - // Test the native plexus lifecycle. Note that the configuration for - // this TestCase supplies its own lifecycle, so this test verifies that - // the native lifecycle is available after configuration merging. - // ---------------------------------------------------------------------- - - public void testNativeLifecyclePassage() throws Exception { - DefaultServiceB serviceB = (DefaultServiceB) container.lookup(ServiceB.class); - - // Make sure the component is alive. - assertNotNull(serviceB); - - // Make sure the component went through all the lifecycle phases - assertEquals(true, serviceB.enableLogging); - - assertEquals(true, serviceB.contextualize); - - assertEquals(true, serviceB.initialize); - - assertEquals(true, serviceB.start); - - assertEquals(false, serviceB.stop); - - container.release(serviceB); - - assertEquals(true, serviceB.stop); - } - - public void testConfigurableLifecyclePassage() throws Exception { - DefaultServiceE serviceE = (DefaultServiceE) container.lookup(ServiceE.class); - - // Make sure the component is alive. - assertNotNull(serviceE); - - // Make sure the component went through all the lifecycle phases - assertEquals(true, serviceE.enableLogging); - - assertEquals(true, serviceE.contextualize); - - assertEquals(true, serviceE.initialize); - - assertEquals(true, serviceE.start); - - assertEquals(false, serviceE.stop); - - container.release(serviceE); - - assertEquals(true, serviceE.stop); - } - - /* - * Check that we can get references to a single component with a role - * hint. - */ - public void testSingleComponentLookupWithRoleHint() throws Exception { - // Retrieve an instance of component c. - DefaultServiceC serviceC1 = (DefaultServiceC) container.lookup(ServiceC.class, "first-instance"); - - // Make sure the component is alive. - assertNotNull(serviceC1); - - assertTrue(serviceC1.started); - - assertFalse(serviceC1.stopped); - - // Retrieve a second reference to the same component. - DefaultServiceC serviceC2 = (DefaultServiceC) container.lookup(ServiceC.class, "first-instance"); - - // Make sure component is alive. - assertNotNull(serviceC2); - - assertTrue(serviceC2.started); - - assertFalse(serviceC2.stopped); - - // Let's make sure it gave us back the same component. - assertSame(serviceC1, serviceC2); - - container.release(serviceC1); - - // The component should still be alive. - assertTrue(serviceC2.started); - - assertTrue(serviceC2.stopped); - - container.release(serviceC2); - - // The component should now have been stopped. - assertTrue(serviceC2.started); - - assertTrue(serviceC2.stopped); - } - - /* - * Check that distinct components with the same implementation are managed correctly. - */ - public void testMultipleSingletonComponentInstances() throws Exception { - // Retrieve an instance of component c. - DefaultServiceC serviceC1 = (DefaultServiceC) container.lookup(ServiceC.class, "first-instance"); - - // Make sure the component is alive. - assertNotNull(serviceC1); - - assertTrue(serviceC1.started); - - assertFalse(serviceC1.stopped); - - // Retrieve an instance of component c, with a different role hint. - // This should give us a different component instance. - DefaultServiceC serviceC2 = (DefaultServiceC) container.lookup(ServiceC.class, "second-instance"); - - // Make sure component is alive. - assertNotNull(serviceC2); - - assertTrue(serviceC2.started); - - assertFalse(serviceC2.stopped); - - // The components should be distinct. - assertNotSame(serviceC1, serviceC2); - - container.release(serviceC1); - - // The first component should now have been stopped, the second - // one should still be alive. - assertTrue(serviceC1.started); - - assertTrue(serviceC1.stopped); - - assertTrue(serviceC2.started); - - assertFalse(serviceC2.stopped); - - container.release(serviceC2); - - // The second component should now have been stopped. - assertTrue(serviceC2.started); - - assertTrue(serviceC2.stopped); - } - - // ---------------------------------------------------------------------- - // Test using an arbitrary component lifecycle handler - // ---------------------------------------------------------------------- - - public void testArbitraryLifecyclePassageUsingFourArbitraryPhases() throws Exception { - // Retrieve an manager of component H. - DefaultServiceH serviceH = (DefaultServiceH) container.lookup(ServiceH.class); - - // Make sure the component is alive. - assertNotNull(serviceH); - - // Make sure the component went through all the lifecycle phases - assertEquals(true, serviceH.eeny); - - assertEquals(true, serviceH.meeny); - - assertEquals(true, serviceH.miny); - - assertEquals(true, serviceH.mo); - - container.release(serviceH); - } - - public void testLookupAll() throws Exception { - Map components = container.lookupMap(ServiceC.class); - - assertNotNull(components); - - assertEquals(2, components.size()); - - ServiceC component = components.get("first-instance"); - - assertNotNull(component); - - component = components.get("second-instance"); - - assertNotNull(component); - - container.releaseAll(components); - } - - public void testAutomatedComponentConfigurationUsingXStreamPoweredComponentConfigurator() throws Exception { - Component component = container.lookup(Component.class); - - assertNotNull(component); - - assertNotNull(component.getActivity()); - - assertEquals("localhost", component.getHost()); - - assertEquals(10000, component.getPort()); - } - - public void testAutomatedComponentComposition() throws Exception { - ComponentA componentA = container.lookup(ComponentA.class); - - assertNotNull(componentA); - - assertEquals("localhost", componentA.getHost()); - - assertEquals(10000, componentA.getPort()); - - ComponentB componentB = componentA.getComponentB(); - - assertNotNull(componentB); - - ComponentC componentC = componentA.getComponentC(); - - assertNotNull(componentC); - - ComponentD componentD = componentC.getComponentD(); - - assertNotNull(componentD); - - assertEquals("jason", componentD.getName()); - } - - public void testComponentCompositionWhereTargetFieldIsAMap() throws Exception { - ActivityManager am = container.lookup(ActivityManager.class); - - Activity one = am.getActivity("one"); - - assertNotNull(one); - - // repeated retrieval from map should not cause re-lookup even if instantiation strategy is per-lookup - assertSame(one, am.getActivity("one")); - - assertFalse(one.getState()); - - am.execute("one"); - - assertTrue(one.getState()); - - Activity two = am.getActivity("two"); - - assertNotNull(two); - - assertFalse(two.getState()); - - am.execute("two"); - - assertTrue(two.getState()); - } - - public void testComponentCompositionWhereTargetFieldIsAPartialMap() throws Exception { - ActivityManager am = container.lookup(ActivityManager.class, "slim"); - - assertEquals(1, am.getActivityCount()); - - Activity one = am.getActivity("one"); - - assertNotNull(one); - - assertFalse(one.getState()); - - am.execute("one"); - - assertTrue(one.getState()); - } - - public void testComponentCompositionWhereTargetFieldIsAList() throws Exception { - Pipeline pipeline = container.lookup(Pipeline.class); - - List valves = pipeline.getValves(); - - for (Object valve : valves) { - // repeated retrieval from list should not cause re-lookup even if instantiation strategy is per-lookup - assertSame(valve, valve); - } - - assertFalse(((Valve) valves.get(0)).getState()); - - assertFalse(((Valve) valves.get(1)).getState()); - - pipeline.execute(); - - assertTrue(((Valve) valves.get(0)).getState()); - - assertTrue(((Valve) valves.get(1)).getState()); - } - - public void testComponentCompositionWhereTargetFieldIsAPartialList() throws Exception { - Pipeline pipeline = container.lookup(Pipeline.class, "slim"); - - List valves = pipeline.getValves(); - - assertEquals(valves.size(), 1); - - assertFalse(((Valve) valves.get(0)).getState()); - - pipeline.execute(); - - assertTrue(((Valve) valves.get(0)).getState()); - } - - public void testComponentCompositionWhereTargetFieldAMapThatMustRetainTheOrderOfComponentsGivenASetOfRoleHints() - throws Exception { - Pipeline pipeline = container.lookup(Pipeline.class, "chubby"); - - Map valveMap = pipeline.getValveMap(); - - List valves = new ArrayList(valveMap.values()); - - assertEquals("Expecting three valves.", 4, valves.size()); - - assertTrue("Expecting valve one.", valves.get(0) instanceof ValveOne); - - assertTrue("Expecting valve two.", valves.get(1) instanceof ValveTwo); - - assertTrue("Expecting valve three.", valves.get(2) instanceof ValveThree); - - assertTrue("Expecting valve four.", valves.get(3) instanceof ValveFour); - } - - public void testLookupOfComponentThatShouldBeDiscovered() throws Exception { - DiscoveredComponent discoveredComponent = container.lookup(DiscoveredComponent.class); - - assertNotNull(discoveredComponent); - } - - public void testStartableComponentSnake() throws Exception { - StartableComponent ca = container.lookup(StartableComponent.class, "A-snake"); - - assertNotNull(ca); - - ca.assertStartOrderCorrect(); - - container.dispose(); - - ca.assertStopOrderCorrect(); - } - - public void testStartableComponentTree() throws Exception { - StartableComponent ca = container.lookup(StartableComponent.class, "A-tree"); - - assertNotNull(ca); - - ca.assertStartOrderCorrect(); - - container.dispose(); - - ca.assertStopOrderCorrect(); - } - - public void testLookupCircularity() throws Exception { - try { - container.lookup(CircularComponent.class, "A"); - fail("Expected ComponentLookupException due to circularity"); - } catch (ComponentLookupException e) { - // todo actually test nested exception is as expected when - } - } - - public void testAddComponent() throws Exception { - LiveComponent live = new LiveComponent(); - - container.addComponent(live, LiveComponent.class.getName()); - - LiveComponent c = container.lookup(LiveComponent.class); - - assertSame(live, c); - } - - public void testComponentOverride() throws Exception { - assertNotNull(container.lookup(Component.class)); - - Component live = new Component() { - public Activity getActivity() { - return null; - } - - public String getHost() { - return null; - } - - public int getPort() { - return 0; - } - }; - - container.addComponent(live, Component.class, null); - - assertSame(live, container.lookup(Component.class)); - } - - public void testUpdateOfActiveComponentCollectionUponChangeOfThreadContextClassLoader() throws Exception { - ComponentManager manager = container.lookup(ComponentManager.class); - - Map map = manager.getMap(); - assertNotNull(map); - assertEquals(0, map.size()); - - List list = manager.getList(); - assertNotNull(list); - assertEquals(0, list.size()); - - /* - * Below we're creating two realms which basically contain the same components, only their bytecode/version - * differs. When we switch the thread's context class loader, the active component collections in the component - * manager must accurately reflect the components from the current realm (and not from a previous realm). - */ - - ClassRealm realmA = container.createChildRealm("realm-a"); - realmA.addURL(new File("src/test/test-components/component-a-1.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmA); - - ClassRealm realmB = container.createChildRealm("realm-b"); - realmB.addURL(new File("src/test/test-components/component-a-2.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmB); - - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - - try { - Thread.currentThread().setContextClassLoader(realmA); - - map = manager.getMap(); - assertNotNull(map); - assertEquals(1, map.size()); - assertSame(realmA, map.values().iterator().next().getClass().getClassLoader()); - - list = manager.getList(); - assertNotNull(list); - assertEquals(1, list.size()); - assertSame(realmA, list.iterator().next().getClass().getClassLoader()); - - Thread.currentThread().setContextClassLoader(realmB); - - map = manager.getMap(); - assertNotNull(map); - assertEquals(1, map.size()); - assertSame(realmB, map.values().iterator().next().getClass().getClassLoader()); - - list = manager.getList(); - assertNotNull(list); - assertEquals(1, list.size()); - assertSame(realmB, list.iterator().next().getClass().getClassLoader()); - } finally { - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - public void testUpdateOfActiveComponentCollectionUponChangeOfThreadContextClassLoaderFromParentToChildRealm() - throws Exception { - ComponentManager manager = container.lookup(ComponentManager.class); - - Map map = manager.getMap(); - assertNotNull(map); - assertEquals(0, map.size()); - - List list = manager.getList(); - assertNotNull(list); - assertEquals(0, list.size()); - - /* - * Below we're creating two realms which basically contain the same components, only their bytecode/version - * differs. The realms form a parent-child relationship where the child imports the component role from the - * parent. When we first load from the parent and then switch the thread's context class loader to the child, - * the active component collections in the component manager must accurately reflect the components from the - * current realm (and not from a previous realm). - */ - - ClassRealm realmA = container.createChildRealm("realm-a"); - realmA.addURL(new File("src/test/test-components/component-a-1.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmA); - - ClassRealm realmB = realmA.createChildRealm("realm-b"); - realmB.importFrom(realmA, "org.codehaus.plexus.components.A"); - realmB.importFromParent("nothing"); - realmB.addURL(new File("src/test/test-components/component-a-2.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmB); - - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - - try { - Thread.currentThread().setContextClassLoader(realmA); - - map = manager.getMap(); - assertNotNull(map); - assertEquals(1, map.size()); - assertSame(realmA, map.values().iterator().next().getClass().getClassLoader()); - - list = manager.getList(); - assertNotNull(list); - assertEquals(1, list.size()); - assertSame(realmA, list.iterator().next().getClass().getClassLoader()); - - Thread.currentThread().setContextClassLoader(realmB); - - map = manager.getMap(); - assertNotNull(map); - assertEquals(1, map.size()); - assertSame(realmB, map.values().iterator().next().getClass().getClassLoader()); - - list = manager.getList(); - assertNotNull(list); - assertEquals(1, list.size()); - assertSame(realmB, list.iterator().next().getClass().getClassLoader()); - } finally { - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - public void testComponentLookupFromParentRealmOfImportedRealms() throws Exception { - ComponentManager manager = container.lookup(ComponentManager.class); - - Map map = manager.getMap(); - assertNotNull(map); - assertEquals(0, map.size()); - - List list = manager.getList(); - assertNotNull(list); - assertEquals(0, list.size()); - - URL componentUrl = new File("src/test/test-components/component-a-1.0-SNAPSHOT.jar") - .toURI() - .toURL(); - - ClassRealm realmP = container.createChildRealm("parent-of-imported-realm"); - realmP.addURL(componentUrl); - container.discoverComponents(realmP); - - ClassRealm realmI = realmP.createChildRealm("imported-realm"); - - ClassRealm realmL = container.createChildRealm("lookup-realm"); - realmL.importFrom(realmI, "org.something"); - - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - - try { - Thread.currentThread().setContextClassLoader(realmL); - - map = manager.getMap(); - assertNotNull(map); - assertEquals(1, map.size()); - assertSame(realmP, map.values().iterator().next().getClass().getClassLoader()); - - list = manager.getList(); - assertNotNull(list); - assertEquals(1, list.size()); - assertSame(realmP, list.iterator().next().getClass().getClassLoader()); - } finally { - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - public void testOptionalComponentRequirement() throws Exception { - DefaultComponentWithOptionalRequirement ca = - (DefaultComponentWithOptionalRequirement) container.lookup(Component.class, "with-optional"); - - assertNotNull(ca); - - assertNotNull(ca.getActivity()); - - assertNull(ca.optionalComponent); - } - - public void testLookupOfComponentThatHasARequirementWithoutRoleHintAndTheOneAndOnlyImplHasNoDefaultHint() - throws Exception { - DefaultThingUser component = (DefaultThingUser) container.lookup(ThingUser.class); - - assertNotNull(component.thing); - } - - public void testSingleLookupWithAndWithoutRoleHint() throws Exception { - ComponentWithRoleDefault withRoleHint = container.lookup(ComponentWithRoleDefault.class, "default"); - - ComponentWithRoleDefault withoutRoleHint = container.lookup(ComponentWithRoleDefault.class); - - assertSame(withRoleHint, withoutRoleHint); - } - - public void testLookupUponChangeOfThreadContextClassLoaderFromParentToChildRealm() throws Exception { - /* - * Below we're creating two realms which basically contain the same components, only their bytecode/version - * differs. The realms form a parent-child relationship where the child imports the component role from the - * parent. When we first lookup from the parent and then switch the thread's context class loader to the child, - * the second lookup must accurately reflect the components from the current realm (and not from a previous - * realm). - */ - - ClassRealm realmA = container.createChildRealm("realm-a"); - realmA.addURL(new File("src/test/test-components/component-a-1.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmA); - - ClassRealm realmB = realmA.createChildRealm("realm-b"); - realmB.importFrom(realmA, "org.codehaus.plexus.components.A"); - realmB.importFromParent("nothing"); - realmB.addURL(new File("src/test/test-components/component-a-2.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realmB); - - Class role = realmA.loadClass("org.codehaus.plexus.components.A"); - - ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); - - try { - Thread.currentThread().setContextClassLoader(realmA); - - Object comp1 = container.lookup(role, "default"); - - Thread.currentThread().setContextClassLoader(realmB); - - Object comp2 = container.lookup(role, "default"); - - assertNotNull(comp1); - assertNotNull(comp2); - assertNotSame(comp1, comp2); - assertSame(realmA, comp1.getClass().getClassLoader()); - assertSame(realmB, comp2.getClass().getClassLoader()); - } finally { - Thread.currentThread().setContextClassLoader(oldClassLoader); - } - } - - public void testSafeConcurrentAccessToActiveComponentCollection() throws Exception { - ComponentManager manager = container.lookup(ComponentManager.class); - - final Map map = manager.getMap(); - assertNotNull(map); - assertEquals(0, map.size()); - - final List list = manager.getList(); - assertNotNull(list); - assertEquals(0, list.size()); - - final AtomicBoolean go = new AtomicBoolean(false); - - final List exceptions = new CopyOnWriteArrayList(); - Thread[] threads = new Thread[64]; - final CountDownLatch latch = new CountDownLatch(threads.length); - for (int i = 0; i < threads.length; i++) { - threads[i] = new Thread() { - @Override - public void run() { - try { - ClassRealm realm = container.createChildRealm( - "realm-" + UUID.randomUUID().toString()); - realm.addURL(new File("src/test/test-components/component-a-1.0-SNAPSHOT.jar") - .toURI() - .toURL()); - container.discoverComponents(realm); - Thread.currentThread().setContextClassLoader(realm); - - while (!go.get()) { - // just wait - } - - for (int j = 0; j < 1000; j++) { - // this just must not die with some exception - for (Object value : map.values()) { - value.toString(); - } - for (Object value : list) { - value.toString(); - } - } - } catch (Exception e) { - e.printStackTrace(); - exceptions.add(e); - } finally { - latch.countDown(); - } - } - }; - threads[i].start(); - } - go.set(true); - latch.await(); - - assertTrue(exceptions.toString(), exceptions.isEmpty()); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceB.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceB.java deleted file mode 100644 index 848dd0ea3..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceB.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ServiceB { - static String ROLE = ServiceB.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceC.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceC.java deleted file mode 100644 index b9c4540da..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceC.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ServiceC { - static String ROLE = ServiceC.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceD.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceD.java deleted file mode 100644 index d705ba588..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceD.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ServiceD { - static String ROLE = ServiceD.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceE.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceE.java deleted file mode 100644 index a1f40a767..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceE.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ServiceE { - static String ROLE = ServiceE.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceH.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceH.java deleted file mode 100644 index 5be82241a..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ServiceH.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ServiceH { - static String ROLE = ServiceH.class.getName(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/SimpleLifecycleHandler.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/SimpleLifecycleHandler.java deleted file mode 100644 index 4ad0f9261..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/SimpleLifecycleHandler.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.lifecycle.AbstractLifecycleHandler; - -/** - * - * - * @author Jason van Zyl - * - */ -public class SimpleLifecycleHandler extends AbstractLifecycleHandler { - public String getId() { - return "simple"; - } - - public void initialize() {} -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/StartableComponent.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/StartableComponent.java deleted file mode 100644 index ab1b52ddc..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/StartableComponent.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.codehaus.plexus.test; - -import java.util.concurrent.atomic.AtomicInteger; - -public interface StartableComponent { - static String ROLE = StartableComponent.class.getName(); - - AtomicInteger startGenerator = new AtomicInteger(1); - - AtomicInteger stopGenerator = new AtomicInteger(1); - - void assertStartOrderCorrect(); - - void assertStopOrderCorrect(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Thing.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/Thing.java deleted file mode 100644 index 99669f4d8..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/Thing.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface Thing {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ThingUser.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/ThingUser.java deleted file mode 100644 index 857131440..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/ThingUser.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.codehaus.plexus.test; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -public interface ThingUser {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Eeny.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Eeny.java deleted file mode 100644 index cc3e87d70..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Eeny.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Eeny { - void eeny(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/EenyPhase.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/EenyPhase.java deleted file mode 100644 index 0ea4cdb8c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/EenyPhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class EenyPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Eeny) { - ((Eeny) object).eeny(); - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Meeny.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Meeny.java deleted file mode 100644 index 323ddc2d5..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Meeny.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Meeny { - void meeny(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MeenyPhase.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MeenyPhase.java deleted file mode 100644 index 2999ce218..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MeenyPhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class MeenyPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Meeny) { - ((Meeny) object).meeny(); - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Miny.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Miny.java deleted file mode 100644 index 4ee8f0870..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Miny.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Miny { - void miny(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MinyPhase.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MinyPhase.java deleted file mode 100644 index 473946752..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MinyPhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class MinyPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Miny) { - ((Miny) object).miny(); - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Mo.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Mo.java deleted file mode 100644 index 15c6873a6..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/Mo.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Mo { - void mo(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MoPhase.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MoPhase.java deleted file mode 100644 index 14a9e2267..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/lifecycle/phase/MoPhase.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.codehaus.plexus.test.lifecycle.phase; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.classworlds.realm.ClassRealm; -import org.codehaus.plexus.component.manager.ComponentManager; -import org.codehaus.plexus.lifecycle.phase.AbstractPhase; - -public class MoPhase extends AbstractPhase { - public void execute(Object object, ComponentManager manager, ClassRealm lookupRealm) { - if (object instanceof Mo) { - ((Mo) object).mo(); - } - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/AbstractValve.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/AbstractValve.java deleted file mode 100644 index 1db108596..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/AbstractValve.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public abstract class AbstractValve implements Valve { - private boolean state; - - public boolean getState() { - return state; - } - - public void execute() { - state = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/DefaultPipeline.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/DefaultPipeline.java deleted file mode 100644 index d1072ab18..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/DefaultPipeline.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultPipeline implements Pipeline { - private List valves; - - private Map valveMap; - - public void execute() { - for (Object valve : valves) { - ((Valve) valve).execute(); - } - } - - public List getValves() { - return valves; - } - - public Map getValveMap() { - return valveMap; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Pipeline.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Pipeline.java deleted file mode 100644 index fd2133cbe..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Pipeline.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.List; -import java.util.Map; - -/** - * @author Jason van Zyl - * - */ -public interface Pipeline { - static String ROLE = Pipeline.class.getName(); - - void execute(); - - List getValves(); - - Map getValveMap(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Valve.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Valve.java deleted file mode 100644 index ba8b35991..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/Valve.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Valve { - static String ROLE = Valve.class.getName(); - - void execute(); - - boolean getState(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveFour.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveFour.java deleted file mode 100644 index 668afa491..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveFour.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ValveFour extends AbstractValve {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveOne.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveOne.java deleted file mode 100644 index 9c0f8cc91..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveOne.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ValveOne extends AbstractValve {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveThree.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveThree.java deleted file mode 100644 index 960d4e618..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveThree.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ValveThree extends AbstractValve {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveTwo.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveTwo.java deleted file mode 100644 index 9fbf5c3af..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/list/ValveTwo.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.list; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ValveTwo extends AbstractValve {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/AbstractActivity.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/AbstractActivity.java deleted file mode 100644 index 17ecd172c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/AbstractActivity.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public abstract class AbstractActivity implements Activity { - private boolean state; - - public boolean getState() { - return state; - } - - public void execute() { - state = true; - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/Activity.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/Activity.java deleted file mode 100644 index 4345b5ba2..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/Activity.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface Activity { - static String ROLE = Activity.class.getName(); - - void execute(); - - boolean getState(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityManager.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityManager.java deleted file mode 100644 index 05cb9e07c..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityManager.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public interface ActivityManager { - static String ROLE = ActivityManager.class.getName(); - - void execute(String id); - - Activity getActivity(String id); - - int getActivityCount(); -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityOne.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityOne.java deleted file mode 100644 index da94af30e..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityOne.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ActivityOne extends AbstractActivity {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityTwo.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityTwo.java deleted file mode 100644 index 3628b8e09..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/ActivityTwo.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * - * @author Jason van Zyl - * - */ -public class ActivityTwo extends AbstractActivity {} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/DefaultActivityManager.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/DefaultActivityManager.java deleted file mode 100644 index 6aaf4f8bb..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/DefaultActivityManager.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import java.util.Map; - -/** - * - * - * @author Jason van Zyl - * - */ -public class DefaultActivityManager implements ActivityManager { - private Map activities; - - public void execute(String id) { - getActivity(id).execute(); - } - - public Activity getActivity(String id) { - return (Activity) activities.get(id); - } - - public int getActivityCount() { - return activities.size(); - } -} diff --git a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/NoComponentsMapTest.java b/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/NoComponentsMapTest.java deleted file mode 100644 index e2c461ecd..000000000 --- a/plexus-container-default/src/test/java/org/codehaus/plexus/test/map/NoComponentsMapTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.codehaus.plexus.test.map; - -/* - * Copyright 2001-2006 Codehaus Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import org.codehaus.plexus.PlexusTestCase; - -/** - * @author Trygve Laugstøl - */ -public class NoComponentsMapTest extends PlexusTestCase { - public void testNoComponents() throws Exception { - ActivityManager manager; - - manager = lookup(ActivityManager.class); - - assertEquals(0, manager.getActivityCount()); - } -} diff --git a/plexus-container-default/src/test/resources/META-INF/plexus/components.xml b/plexus-container-default/src/test/resources/META-INF/plexus/components.xml deleted file mode 100644 index 4f91ea4da..000000000 --- a/plexus-container-default/src/test/resources/META-INF/plexus/components.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - org.codehaus.plexus.component.discovery.DiscoveredComponent - org.codehaus.plexus.component.discovery.DefaultDiscoveredComponent - - - org.codehaus.plexus.component.factory.ComponentFactory - testFactory2 - org.codehaus.plexus.component.factory.TestComponentFactory2 - - - - - plexus - monkey - 1.0 - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/META-INF/plexus/plexus.xml b/plexus-container-default/src/test/resources/META-INF/plexus/plexus.xml deleted file mode 100644 index 86d846d59..000000000 --- a/plexus-container-default/src/test/resources/META-INF/plexus/plexus.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - org.codehaus.plexus.component.factory.ComponentFactory - testFactory1 - org.codehaus.plexus.component.factory.TestComponentFactory1 - - - org.codehaus.plexus.test.CountInstancesComponent - org.codehaus.plexus.test.CountInstancesComponent - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/application/components.xml b/plexus-container-default/src/test/resources/application/components.xml deleted file mode 100644 index 7922158db..000000000 --- a/plexus-container-default/src/test/resources/application/components.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - server - - - - - - - - - two - - - - - - - - - three - - - - - - - - - - - - - four - - - - one - two - three - - - - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/application/configuration-mapping.xml b/plexus-container-default/src/test/resources/application/configuration-mapping.xml deleted file mode 100644 index f3d2b084d..000000000 --- a/plexus-container-default/src/test/resources/application/configuration-mapping.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - 8080 - localhost - - Santa Claus - santa@northpole.com - - - - email - Email - - - irc - Irc - - - - - - one - one - one - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/application/sentinel.xml b/plexus-container-default/src/test/resources/application/sentinel.xml deleted file mode 100644 index a21e4996d..000000000 --- a/plexus-container-default/src/test/resources/application/sentinel.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 8080 - localhost - - Santa Claus - santa@northpole.com - - - - email - Email - - - irc - Irc - - - - - - one - one - one - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/inline-configuration.properties b/plexus-container-default/src/test/resources/inline-configuration.properties deleted file mode 100644 index 4f4b311bd..000000000 --- a/plexus-container-default/src/test/resources/inline-configuration.properties +++ /dev/null @@ -1,2 +0,0 @@ -first-name=andrew -last-name=williams \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/inline-configuration.xml b/plexus-container-default/src/test/resources/inline-configuration.xml deleted file mode 100644 index e622040b9..000000000 --- a/plexus-container-default/src/test/resources/inline-configuration.xml +++ /dev/null @@ -1,4 +0,0 @@ - - jason - van zyl - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/jar-repository/a.jar b/plexus-container-default/src/test/resources/jar-repository/a.jar deleted file mode 100644 index 60afd9060d32fe70267aa2802a7a8408930af203..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 990 zcmWIWW@h1H00D<4Yke>SN^k;cU)K;vT~9wZ{Q#gc5e5z*v_(@Uf~?Hf(a+P(H8@1i z*X^_KnbSVrx_TFRy>+$DojJcb$l!|cgQrDjoP`Q?Jbcc1gfet7s``HI5v|xcr#nd4 zJ1Dqhu9l;e&ljG@ygen8dCrKKGYS_$O8YtNHAS+in69>*Lr+M94<_gXpUhenkGJWm~tJ*pD=+PdrU z-w89aCh%0;cmlby|OXi(EvagxhBs1?++KMx>`M;D6 zJ^lyYonEM=bct)J#H-5{GkvyF5}q*yO(-Ps;}O4z3wFJS{1vuD4{B0 zl~}2rqOy)$ZNuKQ+h(E4%KaN%uFmA*n9ixYW`T`$&9s?<-`iqL|Mwlbb3l#7PviNQ z{?1meFwU3DjZ)u=gCgh2DXC{}j0_Baff$i`eg^#01BN#o@BmqfdId%K1*t_PnW@Fz zAsQN|^gVR7PWtFRV*_(wGWN*2n=D;LXYgl4S)#DPWMV10{O~0AmRq%>V!Z diff --git a/plexus-container-default/src/test/resources/jar-repository/b.jar b/plexus-container-default/src/test/resources/jar-repository/b.jar deleted file mode 100644 index 6b9353951eae88118e86b8b8e503c6fd5371faae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 820 zcmWIWW@h1H00D<4Yke>SN^k;cU)K;vT~9wZ{Q#gc5e5z*v_(@Uf~?Hf(a+P(H8@1i z*X^_KnbSVrx_TFRy>+$DojJcb$l!|cgQrDjoP`Q?Jbcc1gfet7s``HI5v|xcr#nd4 zJ1Dqhu9l;e&ljG@ygen8dCrKKG@OuV-?yl|C#%ADe*!c#lXqz7qF z{x34OYN1w>^wA`lqFs|#DYX1uo}oE^>50^dotbMxC$jg{KegsfFT2}zR(8GkS>ozjwoiWd zICa()3)g1(lXKWkINYq76T3{BgdCBe^aKM-8r6YJxHhEJg={gl2#1&eviJm$35tGH8<9N$N&qmh br11ri2~Q3I-mGjODHb4n0Hp0eiHQLKo_X=@ diff --git a/plexus-container-default/src/test/resources/jar-repository/c.jar b/plexus-container-default/src/test/resources/jar-repository/c.jar deleted file mode 100644 index e54f08e7aede1d1e784788e2cff20f99e72ad617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 722 zcmWIWW@h1H00D<4Yke>SN^k;cU)K;vT~9wZ{Q#gc5e5z*v_(@Uf~?Hf(a+P(H8@1i z*X^_KnbSVrx_TFRy>+$DojJcb$l!|cgQrDjoP`Q?Jbcc1gfet7s``HI5v|xcr#nd4 zJ1Dqhu9l;e&ljG@ygen8dCrKKGGHSuZ&!vA9^b?=0WJ0D;!?7vxuk>}ix0 zd+T&VV76KqFLzRXw0X=*vz6DXBRzF&8rp@54JV&DWBEDNX#MxcoCn;mJIdxt%Sy`~ zoVD6#Dz{Uu!5zUKgZti1;wydDtt!^(UfU5|Ruwp}qePu+>DT)vrxx!LIHSRNNb=y# zC!rHhEWKo{{l)*0R*ZzfPb=Y;b!ANY0u$%?}hMM{g-v%FyYV1?A{CX(Hn4>FfxfSVPp4H4VO!3>IR7+BJ%4rIc$A;o=wH^O3U(E%|5Wbp|g6BIe9HX?fh6g@Dor11ri W36HD*Z&o&t6bleO0Md6DK|BD1iMrbW diff --git a/plexus-container-default/src/test/resources/jar-repository/d.jar b/plexus-container-default/src/test/resources/jar-repository/d.jar deleted file mode 100644 index 31a5cabef55b62ba332663d080d458cabb448dae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 718 zcmWIWW@h1H00D<4Yke>SN^k;cU)K;vT~9wZ{Q#gc5e5z*v_(@Uf~?Hf(a+P(H8@1i z*X^_KnbSVrx_TFRy>+$DojJcb$l!|cgQrDjoP`Q?Jbcc1gfet7s``HI5v|xcr#nd4 zJ1Dqhu9l;e&ljG@ygen8dCrKKGF*A zi+Q>#N+4=+q05EoM;(Rk1UxM&wmrV-PPfJ56alf$6H0-rZvA)OYqgU5AP4`!EVm8i zN4NSsiMncB{B-#vHJKL%Kg!iO;^wl}8wp - - - org.codehaus.plexus.test.LoadOnStartService - - - - - - org.codehaus.plexus.test.LoadOnStartService - org.codehaus.plexus.test.DefaultLoadOnStartService - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/autowire/AutowireCompositionTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/autowire/AutowireCompositionTest.xml deleted file mode 100644 index f449a1092..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/autowire/AutowireCompositionTest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - org.codehaus.plexus.component.composition.autowire.One - org.codehaus.plexus.component.composition.autowire.DefaultOne - - - org.codehaus.plexus.component.composition.autowire.Two - org.codehaus.plexus.component.composition.autowire.DefaultTwo - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/components.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/components.xml deleted file mode 100644 index 81eb73245..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/components.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - org.codehaus.plexus.component.composition.ComponentA - org.codehaus.plexus.component.composition.DefaultComponentA - field - - - org.codehaus.plexus.component.composition.ComponentB - - - - localhost - 10000 - - - - org.codehaus.plexus.component.composition.ComponentB - org.codehaus.plexus.component.composition.DefaultComponentB - setter - - - org.codehaus.plexus.component.composition.ComponentC - - - - - org.codehaus.plexus.component.composition.ComponentC - org.codehaus.plexus.component.composition.DefaultComponentC - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/setter/SetterCompositionTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/setter/SetterCompositionTest.xml deleted file mode 100644 index 845550080..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/composition/setter/SetterCompositionTest.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - org.codehaus.plexus.component.composition.setter.Component - org.codehaus.plexus.component.composition.setter.ChildComponent - setter - - - org.codehaus.plexus.component.composition.ComponentA - - - org.codehaus.plexus.component.composition.ComponentB - - - - - org.codehaus.plexus.component.composition.ComponentA - org.codehaus.plexus.component.composition.DefaultComponentA - - - org.codehaus.plexus.component.composition.ComponentB - org.codehaus.plexus.component.composition.DefaultComponentB - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.xml deleted file mode 100644 index 9a43da407..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/factory/nonjava/NonJavaComponentFactoryTest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - org.codehaus.plexus.component.factory.ComponentFactory - nonjava - org.codehaus.plexus.component.factory.nonjava.NonJavaComponentFactory - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.xml deleted file mode 100644 index 5bcc96bbf..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/ClassicSingletonComponentManagerTest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.component.manager.Component - org.codehaus.plexus.component.manager.DefaultComponent - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.xml deleted file mode 100644 index ad5b63349..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/component/manager/SlowComponentClassicSingletonComponentManagerTest.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - org.codehaus.plexus.component.manager.SlowComponent - org.codehaus.plexus.component.manager.SlowComponent - - 300 - - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/components.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/components.xml deleted file mode 100644 index be273bddb..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/components.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - org.codehaus.plexus.test.ComponentA - one - org.codehaus.plexus.test.DefaultComponentA - - - org.codehaus.plexus.test.ComponentA - two - org.codehaus.plexus.test.DefaultComponentA - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/avalon.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/avalon.xml deleted file mode 100644 index 45617cbb9..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/avalon.xml +++ /dev/null @@ -1,193 +0,0 @@ - - - - ${foo.home}/jars - ${my.home}/resources - - - user-conf-dir - - - logging-implementation - - INFO - - - - - org.codehaus.plexus.personality.avalon.AvalonComponentRepository - - - - - - frankie - - - - - - custom - - - custom - - - - - - - avalon - - - avalon - Avalon Lifecycle Handler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - org.codehaus.plexus.ServiceA - org.codehaus.plexus.DefaultServiceA - - - - - - - org.codehaus.plexus.ServiceB - org.codehaus.plexus.DefaultServiceB - - - - - - org.codehaus.plexus.ServiceC - first-instance - org.codehaus.plexus.DefaultServiceC - - - - - org.codehaus.plexus.ServiceC - second-instance - org.codehaus.plexus.DefaultServiceC - - - - - - org.codehaus.plexus.ServiceE - org.codehaus.plexus.DefaultServiceE - per-lookup - - - - - - org.codehaus.plexus.ServiceG - org.codehaus.plexus.DefaultServiceG - singleton - - - - - - - org.codehaus.plexus.ServiceH - org.codehaus.plexus.DefaultServiceH - arbitrary - - - - org.codehaus.plexus.LoadOnStartService - org.codehaus.plexus.DefaultLoadOnStartService - - - - - org.codehaus.plexus.LoadOnStartServiceWithRoleHint - role-hint - org.codehaus.plexus.DefaultLoadOnStartServiceWithRoleHint - - - - - org.codehaus.plexus.ConfigureService - org.codehaus.plexus.DefaultConfigureService - singleton - - - 1 - 2 - - - - - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.xml deleted file mode 100644 index 08d7257f7..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/ExtendingConfigurationSourceTest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - org.codehaus.plexus.configuration.source.ConfigurationSource - - dummy - - org.codehaus.plexus.configuration.source.ADummyConfigurationSource - - - - - org.codehaus.plexus.configuration.source.ConfigurationSource - - anotherDummy - - org.codehaus.plexus.configuration.source.AnotherDummyConfigurationSource - - - - org.codehaus.plexus.configuration.source.ConfigurationSource - dummy - - - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.xml deleted file mode 100644 index a785aa438..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/configuration/source/OverridingConfigurationSourceTest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - org.codehaus.plexus.configuration.source.ConfigurationSource - default - org.codehaus.plexus.configuration.source.ADummyConfigurationSource - - - \ No newline at end of file diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/embed/EmbedderTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/embed/EmbedderTest.xml deleted file mode 100644 index 34caf6b71..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/embed/EmbedderTest.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - ${basedir}/test-input - - - - - org.codehaus.plexus.embed.MockComponent - default - org.codehaus.plexus.embed.MockComponent - - - org.codehaus.plexus.embed.MockComponent - foo - org.codehaus.plexus.embed.MockComponent - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusOne.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusOne.xml deleted file mode 100644 index cb80be530..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusOne.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - org.codehaus.plexus.logging.console.ConsoleLoggerManager - - ERROR - - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - default - org.codehaus.plexus.hierarchy.TestServiceImpl - - three blind mice - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - hinted - org.codehaus.plexus.hierarchy.TestServiceImpl - - plexus one overriding hinted service - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - local - org.codehaus.plexus.hierarchy.TestServiceImpl - - plexus one local service - - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusTwo.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusTwo.xml deleted file mode 100644 index 96b0c117a..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/ChildPlexusTwo.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - org.codehaus.plexus.logging.console.ConsoleLoggerManager - - ERROR - - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - default - org.codehaus.plexus.hierarchy.TestServiceImpl - - see how they run - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - local - org.codehaus.plexus.hierarchy.TestServiceImpl - - plexus two local service - - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.xml deleted file mode 100644 index 31a351915..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/hierarchy/PlexusHierarchyTest.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - org.codehaus.plexus.logging.console.ConsoleLoggerManager - - ERROR - - - - - - org.codehaus.plexus.PlexusContainerManager - default - org.codehaus.plexus.SimplePlexusContainerManager - - org/codehaus/plexus/hierarchy/ChildPlexusOne.xml - - - plexus-name - ChildPlexusOne - - - - - - - org.codehaus.plexus.PlexusContainerManager - two - org.codehaus.plexus.SimplePlexusContainerManager - - org/codehaus/plexus/hierarchy/ChildPlexusTwo.xml - - - plexus-name - ChildPlexusTwo - - - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - default - org.codehaus.plexus.hierarchy.TestServiceImpl - - cheesy default service - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - hinted - org.codehaus.plexus.hierarchy.TestServiceImpl - - hinted default service - - - - - org.codehaus.plexus.hierarchy.PlexusTestService - global - org.codehaus.plexus.hierarchy.TestServiceImpl - - globally visible service - - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/CustomLoggerManagerTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/CustomLoggerManagerTest.xml deleted file mode 100644 index 69cb2ac6a..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/CustomLoggerManagerTest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.MockLoggerManager - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.xml deleted file mode 100644 index 9787f865f..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/logging/console/ConsoleLoggerManagerTest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.console.ConsoleLoggerManager - basic - - per-lookup - - - fatal - - - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/test/PlexusContainerTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/test/PlexusContainerTest.xml deleted file mode 100644 index ba3252572..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/test/PlexusContainerTest.xml +++ /dev/null @@ -1,464 +0,0 @@ - - - - - ${basedir}/src/test-input/configurations-directory - - - - - - - - - - - - - - - - org.codehaus.plexus.test.ServiceB - org.codehaus.plexus.test.DefaultServiceB - - - - org.codehaus.plexus.test.ServiceC - first-instance - org.codehaus.plexus.test.DefaultServiceC - - - - org.codehaus.plexus.test.ServiceC - second-instance - org.codehaus.plexus.test.DefaultServiceC - - - - org.codehaus.plexus.test.ServiceD - org.codehaus.plexus.test.DefaultServiceD - - - - org.codehaus.plexus.test.ServiceE - org.codehaus.plexus.test.DefaultServiceE - plexus-configurable - - - - - - org.codehaus.plexus.test.ServiceH - - org.codehaus.plexus.test.DefaultServiceH - arbitrary - - - - org.codehaus.plexus.test.LoadOnStartService - org.codehaus.plexus.test.DefaultLoadOnStartService - - - - - org.codehaus.plexus.test.LoadOnStartServiceWithRoleHint - role-hint - org.codehaus.plexus.test.DefaultLoadOnStartServiceWithRoleHint - - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.console.ConsoleLoggerManager - basic - - fatal - - - - - - - org.codehaus.plexus.test.Component - org.codehaus.plexus.test.DefaultComponent - - - org.codehaus.plexus.test.map.Activity - one - - - - localhost - 10000 - - - - org.codehaus.plexus.test.Component - org.codehaus.plexus.test.DefaultComponentWithOptionalRequirement - with-optional - - - org.codehaus.plexus.test.map.Activity - one - activity - - - org.codehaus.plexus.test.NonAvailableComponent - missing - optionalComponent - true - - - - - org.codehaus.plexus.test.ComponentA - org.codehaus.plexus.test.DefaultComponentA - - - org.codehaus.plexus.test.ComponentB - - - org.codehaus.plexus.test.ComponentC - - - - localhost - 10000 - - - - org.codehaus.plexus.test.ComponentB - org.codehaus.plexus.test.DefaultComponentB - - - org.codehaus.plexus.test.ComponentC - org.codehaus.plexus.test.DefaultComponentC - - - org.codehaus.plexus.test.ComponentD - - - - - org.codehaus.plexus.test.ComponentD - org.codehaus.plexus.test.DefaultComponentD - - jason - - - - - - org.codehaus.plexus.test.map.ActivityManager - org.codehaus.plexus.test.map.DefaultActivityManager - - - org.codehaus.plexus.test.map.Activity - activities - - - - - org.codehaus.plexus.test.map.ActivityManager - slim - org.codehaus.plexus.test.map.DefaultActivityManager - - - org.codehaus.plexus.test.map.Activity - activities - - one - - - - - - org.codehaus.plexus.test.map.Activity - one - org.codehaus.plexus.test.map.ActivityOne - per-lookup - - - org.codehaus.plexus.test.map.Activity - two - org.codehaus.plexus.test.map.ActivityTwo - - - - - org.codehaus.plexus.test.list.Pipeline - default - org.codehaus.plexus.test.list.DefaultPipeline - - - org.codehaus.plexus.test.list.Valve - valves - - - - - org.codehaus.plexus.test.list.Pipeline - slim - org.codehaus.plexus.test.list.DefaultPipeline - - - org.codehaus.plexus.test.list.Valve - valves - - one - - - - - - org.codehaus.plexus.test.list.Pipeline - chubby - org.codehaus.plexus.test.list.DefaultPipeline - - - org.codehaus.plexus.test.list.Valve - valveMap - - one - two - three - four - - - - - - - - org.codehaus.plexus.test.list.Valve - four - org.codehaus.plexus.test.list.ValveFour - - - org.codehaus.plexus.test.list.Valve - three - org.codehaus.plexus.test.list.ValveThree - - - org.codehaus.plexus.test.list.Valve - two - org.codehaus.plexus.test.list.ValveTwo - - - org.codehaus.plexus.test.list.Valve - one - org.codehaus.plexus.test.list.ValveOne - per-lookup - - - - org.codehaus.plexus.test.ComponentManager - org.codehaus.plexus.test.DefaultComponentManager - - - org.codehaus.plexus.components.A - list - - - org.codehaus.plexus.components.A - map - - - - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.console.ConsoleLoggerManager - basic - - fatal - - - - - org.codehaus.plexus.test.Component - ComponentMissingRequirements - org.codehaus.plexus.test.DefaultComponent - - - NonExistingComponent - - - - - - - org.codehaus.plexus.test.StartableComponent - A-snake - org.codehaus.plexus.test.DefaultStartableComponentA - - - org.codehaus.plexus.test.StartableComponent - B-snake - component1 - - - - - - org.codehaus.plexus.test.StartableComponent - B-snake - org.codehaus.plexus.test.DefaultStartableComponentB - - - org.codehaus.plexus.test.StartableComponent - C-snake - component1 - - - - - - org.codehaus.plexus.test.StartableComponent - C-snake - org.codehaus.plexus.test.DefaultStartableComponentC - - - org.codehaus.plexus.test.StartableComponent - D-snake - component1 - - - - - - org.codehaus.plexus.test.StartableComponent - D-snake - org.codehaus.plexus.test.DefaultStartableComponentD - - - org.codehaus.plexus.test.StartableComponent - E-snake - component1 - - - - - - org.codehaus.plexus.test.StartableComponent - E-snake - org.codehaus.plexus.test.DefaultStartableComponentE - - - - - org.codehaus.plexus.test.StartableComponent - A-tree - org.codehaus.plexus.test.DefaultStartableComponentA - - - org.codehaus.plexus.test.StartableComponent - B-tree - component1 - - - org.codehaus.plexus.test.StartableComponent - C-tree - component2 - - - - - - org.codehaus.plexus.test.StartableComponent - B-tree - org.codehaus.plexus.test.DefaultStartableComponentB - - - org.codehaus.plexus.test.StartableComponent - D-tree - component1 - - - org.codehaus.plexus.test.StartableComponent - E-tree - component2 - - - - - - org.codehaus.plexus.test.StartableComponent - C-tree - org.codehaus.plexus.test.DefaultStartableComponentC - - - - org.codehaus.plexus.test.StartableComponent - D-tree - org.codehaus.plexus.test.DefaultStartableComponentD - - - - org.codehaus.plexus.test.StartableComponent - E-tree - org.codehaus.plexus.test.DefaultStartableComponentE - - - - - org.codehaus.plexus.test.CircularComponent - A - org.codehaus.plexus.test.DefaultCircularComponent - - - org.codehaus.plexus.test.CircularComponent - B - requirement - - - - - - org.codehaus.plexus.test.CircularComponent - B - org.codehaus.plexus.test.DefaultCircularComponent - - - org.codehaus.plexus.PlexusContainer - container - - - - A - - - - - org.codehaus.plexus.test.Thing - - concrete - org.codehaus.plexus.test.ConcreteThing - - - - org.codehaus.plexus.test.ThingUser - org.codehaus.plexus.test.DefaultThingUser - - - org.codehaus.plexus.test.Thing - - thing - - - - - - org.codehaus.plexus.test.ComponentWithRoleDefault - org.codehaus.plexus.test.ComponentWithRoleDefault - default - - - - diff --git a/plexus-container-default/src/test/resources/org/codehaus/plexus/test/map/NoComponentsMapTest.xml b/plexus-container-default/src/test/resources/org/codehaus/plexus/test/map/NoComponentsMapTest.xml deleted file mode 100644 index 4252753bd..000000000 --- a/plexus-container-default/src/test/resources/org/codehaus/plexus/test/map/NoComponentsMapTest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - org.codehaus.plexus.logging.console.ConsoleLoggerManager - - INFO - - - - - - org.codehaus.plexus.test.map.ActivityManager - org.codehaus.plexus.test.map.DefaultActivityManager - - - org.codehaus.plexus.test.map.Activity - activities - - - - - - - diff --git a/plexus-container-default/src/test/resources/test.txt b/plexus-container-default/src/test/resources/test.txt deleted file mode 100644 index 793aa682b..000000000 --- a/plexus-container-default/src/test/resources/test.txt +++ /dev/null @@ -1 +0,0 @@ -This is a test \ No newline at end of file diff --git a/plexus-container-default/src/test/test-component-builds/component-a/pom.xml b/plexus-container-default/src/test/test-component-builds/component-a/pom.xml deleted file mode 100644 index 872b4819a..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-a/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - component-a - 1.0-SNAPSHOT - component-a - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.3 - - - - descriptor - - - - - - - diff --git a/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/A.java b/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/A.java deleted file mode 100644 index 0a18129f6..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/A.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.components; - -public interface A -{ - public void hello(); -} diff --git a/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/DefaultA.java b/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/DefaultA.java deleted file mode 100644 index 3b6f6a280..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-a/src/main/java/org/codehaus/plexus/components/DefaultA.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.components; - -/** - * @plexus.component - */ -public class DefaultA - implements A -{ - public void hello() - { - System.out.println( "Hello World!" ); - } -} diff --git a/plexus-container-default/src/test/test-component-builds/component-b/pom.xml b/plexus-container-default/src/test/test-component-builds/component-b/pom.xml deleted file mode 100644 index 60cadc1cb..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-b/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - component-b - 1.0-SNAPSHOT - component-b - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.3 - - - - descriptor - - - - - - - diff --git a/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/B.java b/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/B.java deleted file mode 100644 index ec834d866..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/B.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.components; - -public interface B -{ - public void hello(); -} diff --git a/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/DefaultB.java b/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/DefaultB.java deleted file mode 100644 index eb8bc1724..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-b/src/main/java/org/codehaus/plexus/components/DefaultB.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.components; - -/** - * @plexus.component - */ -public class DefaultB - implements B -{ - public void hello() - { - System.out.println( "Hello World!" ); - } -} diff --git a/plexus-container-default/src/test/test-component-builds/component-c/pom.xml b/plexus-container-default/src/test/test-component-builds/component-c/pom.xml deleted file mode 100644 index 6334944b1..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-c/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - component-c - 1.0-SNAPSHOT - component-c - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.3 - - - - descriptor - - - - - - - diff --git a/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/C.java b/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/C.java deleted file mode 100644 index c5f9f14b0..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/C.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.components; - -public interface C -{ - public void hello(); -} diff --git a/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/DefaultC.java b/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/DefaultC.java deleted file mode 100644 index 486fd01c4..000000000 --- a/plexus-container-default/src/test/test-component-builds/component-c/src/main/java/org/codehaus/plexus/components/DefaultC.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.codehaus.plexus.components; - -/** - * @plexus.component - */ -public class DefaultC - implements C -{ - public void hello() - { - System.out.println( "Hello World!" ); - } -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin0/pom.xml b/plexus-container-default/src/test/test-component-builds/plugin0/pom.xml deleted file mode 100644 index df96cd8f9..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin0/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - plugin0 - 1.0-SNAPSHOT - - - org.codehaus.plexus.components - component-a - 1.0-SNAPSHOT - - - org.codehaus.plexus.components - component-b - 1.0-SNAPSHOT - - - org.codehaus.plexus - plexus-archiver - 4.8.0 - - - org.codehaus.plexus - plexus-container-default - 1.0-beta-2-SNAPSHOT - - - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.3 - - - - descriptor - - - - - - - diff --git a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/AltPlugin0.java b/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/AltPlugin0.java deleted file mode 100644 index 58c5d2e27..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/AltPlugin0.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.plugins; - -import org.codehaus.plexus.components.A; -import org.codehaus.plexus.components.B; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.archiver.manager.ArchiverManager; - -/** - * @plexus.component role-hint="alt" - */ -public class AltPlugin0 - implements Plugin0, Contextualizable -{ - /** @plexus.requirement */ - private A a; - - /** @plexus.requirement */ - private B b; - - /** @plexus.requirement */ - private ArchiverManager archiverManager; - - public void hello() - { - System.out.println( "Hello World!" ); - } - - // ---------------------------------------------------------------------------- - // Lifecycle - // ---------------------------------------------------------------------------- - - public void contextualize( Context context ) - throws ContextException - { - PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - - try - { - archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE ); - } - catch ( ComponentLookupException e ) - { - throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e ); - } - } -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin0.java b/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin0.java deleted file mode 100644 index 56dbbe477..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin0.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.codehaus.plexus.plugins; - -import org.codehaus.plexus.components.A; -import org.codehaus.plexus.components.B; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable; -import org.codehaus.plexus.context.Context; -import org.codehaus.plexus.context.ContextException; -import org.codehaus.plexus.PlexusContainer; -import org.codehaus.plexus.PlexusConstants; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; -import org.codehaus.plexus.archiver.manager.ArchiverManager; - -/** - * @plexus.component - */ -public class DefaultPlugin0 - implements Plugin0, Contextualizable -{ - /** @plexus.requirement */ - private A a; - - /** @plexus.requirement */ - private B b; - - /** @plexus.requirement */ - private ArchiverManager archiverManager; - - public void hello() - { - System.out.println( "Hello World!" ); - } - - // ---------------------------------------------------------------------------- - // Lifecycle - // ---------------------------------------------------------------------------- - - public void contextualize( Context context ) - throws ContextException - { - PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); - - try - { - archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE ); - } - catch ( ComponentLookupException e ) - { - throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e ); - } - } -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/Plugin0.java b/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/Plugin0.java deleted file mode 100644 index 5f85c667d..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin0/src/main/java/org/codehaus/plexus/plugins/Plugin0.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.plugins; - -public interface Plugin0 -{ - public void hello(); -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin1/pom.xml b/plexus-container-default/src/test/test-component-builds/plugin1/pom.xml deleted file mode 100644 index e9b947e49..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin1/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - plugin1 - 1.0-SNAPSHOT - - - org.codehaus.plexus.components - component-a - 1.0-SNAPSHOT - - - org.codehaus.plexus.components - component-c - 1.0-SNAPSHOT - - - - - - org.codehaus.plexus - plexus-maven-plugin - 1.3.3 - - - - descriptor - - - - - - - diff --git a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/AltPlugin1.java b/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/AltPlugin1.java deleted file mode 100644 index 2b9714f99..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/AltPlugin1.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.plugins; - -import org.codehaus.plexus.components.A; -import org.codehaus.plexus.components.C; - -/** - * @plexus.component role-hint="alt" - */ -public class AltPlugin1 - implements Plugin1 -{ - /** @plexus.requirement */ - private A a; - - /** @plexus.requirement */ - private C c; - - public void hello() - { - System.out.println( "Hello World!" ); - } -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin1.java b/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin1.java deleted file mode 100644 index 1a93b8693..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/DefaultPlugin1.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.codehaus.plexus.plugins; - -import org.codehaus.plexus.components.A; -import org.codehaus.plexus.components.C; - -/** - * @plexus.component - */ -public class DefaultPlugin1 - implements Plugin1 -{ - /** @plexus.requirement */ - private A a; - - /** @plexus.requirement */ - private C c; - - public void hello() - { - System.out.println( "Hello World!" ); - } -} diff --git a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/Plugin1.java b/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/Plugin1.java deleted file mode 100644 index c8063cb0a..000000000 --- a/plexus-container-default/src/test/test-component-builds/plugin1/src/main/java/org/codehaus/plexus/plugins/Plugin1.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.codehaus.plexus.plugins; - -public interface Plugin1 -{ - public void hello(); -} diff --git a/plexus-container-default/src/test/test-component-builds/pom.xml b/plexus-container-default/src/test/test-component-builds/pom.xml deleted file mode 100644 index 0cb527882..000000000 --- a/plexus-container-default/src/test/test-component-builds/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - 4.0.0 - org.codehaus.plexus.components - component-parent - 1.0-SNAPSHOT - pom - - component-a - component-b - component-c - plugin0 - plugin1 - - diff --git a/plexus-container-default/src/test/test-components/component-a-1.0-SNAPSHOT.jar b/plexus-container-default/src/test/test-components/component-a-1.0-SNAPSHOT.jar deleted file mode 100644 index b2eb7428616bef83496626d18c236e0c32f9a777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3329 zcmWIWW@h1H0D-I=12ZrKN^k;cU)K;vT~9wZ{Q#&k4u(vivKaws7US(&e+ zpQoE^aEP9-+h^Z1r+vJ2^)B*y>uQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYONKK;TD=~93)yJd^+eeP{zx+*z3Tf$kfit(5aRJ3q@krPsy3^ zb6FMJN4B&*F?(VdU@l_-yA0?UI1m7`;2tQ*Nv$X?hWi6kH49L6eo;Ce6}(Ut$@wX% z8Hsoe0|g4mFt}2J*30A2k({4fke`>DSAuXmBo5pf^Bqcon%Ec_803I7x=#@r^(u06 zTKfaJ8WaRv{#(0>d*~}TUT{6KP3VfK>5Ct^ovDAnY~6EnZep0m7CG4+S6n@6FK>Gk z_Na5~gqc$s*s6HAgDnnfZ9lQ6aqh9lsm%|rM}ExkHlG$|lvz^$PB3lfOczD@_|Dl1 zs}}rS${81|cQ$^l_LB8lr{d*dQ3G-C%XsBY^+1Pq0I?bnV+$XIqxBv2l5-M^i$!~^ z`3@NfxTJsH*x02U;KXR>JZp=H$CqPkgp?lleiBY!{D47*E79LDziau=fA{2{SR}1o zXd2eCDfNBpg!la6hn^{Yez2piLT$yXD>sh{l^K~FJ2^Mnx_{aCKV1c%-l!JLa0?dP zcGBct+p#(Mvb#M6IV6KtbbQyiO%h@J*ocl=TlXBOJgS#iq*t9rC&)Vk8qkognyx3=+lwqay=BA$IZyTwb z&YF3gF;DqJ6_{){^&c_qUt*VGnDX1n>uAEZP?24aZgdxS#W&4m-2YJQlZHgZ#tmJj zY_C#nuV2WxMw`NVxTf#ullO!Ab7duOMdd_JRvp_xd~d!IT)<74a|f+o=&d?CcJuXVB(|5+=BdEP}-Csg2?{Q;S%qgVym-eoXm^9 zw9a>z&TdnlnY%Ou4))vED{RZ!q_;cN^25g;AMc%iUj1Q%&QbHlx3atEtai7*8kHxg z<#E)I$eZMBet@?`QfefY13zmpX zt?5)=%oenH<|Hr2nVYZigop$c9NT*6MbqYVkCmJCowi2CDKZ|+P}#m=m-*(V#Dc0? zt9kSI^Chk-Kb|9!vue@g8*9&Noql{G+KqYJVWagzpZljfNbOj-d=JC12Sz`&6WTTQ zs)t@@JG6LBfeG{Ub?3fMUNe*Zp<@2^0$a};atET^w5!w4T3fs%(^ zKD$5X_bH2KXhx+4bzge2SoBW&?e)2@5>4vG`;#Sf6+7CanRFk|+F{e0p_#u>+w4No zD&FXG3#Grx7|1{BddKkxUS&bb#Y5HClxl%-+6u%T6vu5rQGP*cQAuWMad4UcS#Mo0 z9Z%mtk5wTbe099fJ`Up3^bP&sbtc%r1cUX)7ieH)VDMZET2q@|F}}e2 zt(b@7+Xw!KUizo>bwBuQJge_@-TR!s=UERO-D}z>Jl8S=o&33z^=IYEO4Xw=ovx}g zGdoYJI!rAHyz8O|^dcjZ2s7@61<;>BAi(ezl$sIw6QK=zLj$B31eP?a14($cMrw8- zOu($-K@9>309kwx$b_2!ub&al1~qhG>OnN9fdBy@-S2@+NOJ+V4p4&u0zf(hf%zAu z&co+aPy+&?)dpQF5zYlQC=e#(;V=PSuLG=s5YzI~hhY>Iv9>U<-24)ZT`UYmxlExVn*#oV85aErz h2t-&{!cK{|K-M7&!~kzrHjv5uKsW^$72zBp9smae7Eu5I diff --git a/plexus-container-default/src/test/test-components/component-a-2.0-SNAPSHOT.jar b/plexus-container-default/src/test/test-components/component-a-2.0-SNAPSHOT.jar deleted file mode 100644 index b2eb7428616bef83496626d18c236e0c32f9a777..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3329 zcmWIWW@h1H0D-I=12ZrKN^k;cU)K;vT~9wZ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chk-Kb|9!vue@g8*9&Noql{G+KqYJVWagzpZljfNbOj-d=JC12Sz`&6WTTQ zs)t@@JG6LBfeG{Ub?3fMUNe*Zp<@2^0$a};atET^w5!w4T3fs%(^ zKD$5X_bH2KXhx+4bzge2SoBW&?e)2@5>4vG`;#Sf6+7CanRFk|+F{e0p_#u>+w4No zD&FXG3#Grx7|1{BddKkxUS&bb#Y5HClxl%-+6u%T6vu5rQGP*cQAuWMad4UcS#Mo0 z9Z%mtk5wTbe099fJ`Up3^bP&sbtc%r1cUX)7ieH)VDMZET2q@|F}}e2 zt(b@7+Xw!KUizo>bwBuQJge_@-TR!s=UERO-D}z>Jl8S=o&33z^=IYEO4Xw=ovx}g zGdoYJI!rAHyz8O|^dcjZ2s7@61<;>BAi(ezl$sIw6QK=zLj$B31eP?a14($cMrw8- zOu($-K@9>309kwx$b_2!ub&al1~qhG>OnN9fdBy@-S2@+NOJ+V4p4&u0zf(hf%zAu z&co+aPy+&?)dpQF5zYlQC=e#(;V=PSuLG=s5YzI~hhY>Iv9>U<-24)ZT`UYmxlExVn*#oV85aErz h2t-&{!cK{|K-M7&!~kzrHjv5uKsW^$72zBp9smae7Eu5I diff --git a/plexus-container-default/src/test/test-components/component-b-1.0-SNAPSHOT.jar b/plexus-container-default/src/test/test-components/component-b-1.0-SNAPSHOT.jar deleted file mode 100644 index e588c94706a051ca2b06bedf0c6cf8908e598383..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3329 zcmWIWW@h1H0D-I=12ZrKN^k;cU)K;vT~9wZ{Q#&k4u(vivKaws7US(&e+ zpQoE^aEP9-+h^Z1r+vJ2^)B*y>uQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYONKK;TD=~93)yJd^+eeP{zx+*z3Tf$kfit(5aRJ3q@krPsy3^ zb6FMJN4B&*F?(VdU@l_-yA0?UI1m7`;2tQ*Nv$X?hWi6kH49L6eo;Ce6}(Ut$@wX% z8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r}T9{_-s6@?{(e#oWJK;4;|fW+9y2MG6bFcxs&y0<;qIcqcNSXsxvb? zPpUdhEeO1;q6aMb8JR?waW^c0{saO6hPR;9jL4q|ZP*(cAjKfCq){D6!m~9}vjbrQ zW)%-=5I_LP;)6gY+yr?2jBqw6ZeZ#`G^l|90U+J)flNqq0k;lNg8>3SIs}3F7p2O> z=TuMw0-@CgT`LjJ1vMxTCgkBT0bb;QninviU~gc+j9b#U8fX}L$RP{@6))&!p;!F~ zvtofYDN3k7y@oIk)(}896TL1*n5n=_&`i{t8DTVLF%GIfAOIAJ$APH;?sZsg0t+`x z&7k@Oq4^7@W`eZ~ZnHu43&Ly%Rt$#`FdH7i;MxXe5BB;7X48_!85G$At$h&T4M}R~ hMIgeu5_U?w1+orNAO?7|vVlzI2f``9s0il(@c>SH4IKag diff --git a/plexus-container-default/src/test/test-components/component-c-1.0-SNAPSHOT.jar b/plexus-container-default/src/test/test-components/component-c-1.0-SNAPSHOT.jar deleted file mode 100644 index c2d1996b7b607c2281bc687706fca6496b109e19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3328 zcmWIWW@h1H0D-I=12ZrKN^k;cU)K;vT~9wZ{Q#&k4u(vivKaws7US(&e+ zpQoE^aEP9-+h^Z1r+vJ2^)B*y>uQ}lbAEG>!4=~NPm6TC&YjTl)^*}wf3hTOikS8R zm5QBnx`TwhgMv%uYONKK;TD=~93)yJd^+eeP{zx+*z3Tf$kfit(5aRJ3q@krPsy3^ zb6FMJN4B&*F?(VdU@pV-fB>?~3UX2_N{iwCz*NlwRGnXxjzU!rxtkPc=#i=4y}y( z%%(h01Skyoq{FTYSrXJ|f4j@(oVr=1qaJ0U&UUE)iaj|HRHQylv z0hjd88ymZn1DqJ`T$XGR@%VCVjgZpg-cQ2miytt^a3%U1=65as`R|_m6N{v^3r)jX zHl@CAo$#JN{LnL{&kuIgRj93ab>-$!p)w+p(;L--8E(OX+fJI? zYdbb4Uv{^rActhoijMCZmz*T6n}0E*dLi^@onH(vyd9Ys7<37H!6h{XY8U z(|(5>L~ND&opiet_Q`J$^4a1oE@3Y5cu}A*&$@Oar;}TpPhEMD{?bWUyskk$bUZ5LPu8ueQWBlG{gH~W z|4s3Q;xD%Gv3}3o{7K)W*|5u6a>Dv|HQiTSzR&LE%Q|u4{{(>pJc@7qt}Z#JmeMlw zuKI@GDK_4wvnNDGgskOfr+{CifJUlsE4^uHPmFmHAu^uFA0r?nt64PQUlFfn}tD6jWBL{;f zu)JO1)pE5KnC|MifoYE-a|`lwLB+wFSbaSfF(?+&zHEW z{CJK?&Z&A9b^7s%XgB6cGYklpYfvm>)nT8Vj1xg-v`Rx9j-={2| zp&6AH)P3p6V$nP8x7X*sN;Ih#?@yM{RqSYwX3~8;Ylls1hGzakZLmA1*c#Q=q7H8GpDyap=X)6$WP#m`fMfnA(MJ1W3#ldC%XT5d3bUb|nJywN$ z@YV4?`#6YC(>L^k*O_1g6Cm1VWVY34OGp7PU!Z}Jfx&YvXhm&$#rOj6w_+ZSZy)#{ zdg-6i*ZttL@vOerb?M*q+ z@NSA8(2I;rBFwnk6+nLifdIo>P-;fxPlPt??F^7&5LnWv4kY2(8mZNRFaa}1g4zQR z0J8WXkO?;dUOnS>HmH370U+J)flNqi0k;lNdjSGKIs}3F7p2O>=TuPp0io3fT`LjJ z1+^y-CgkBT0bb;QS{E>%U~gZ*j9b#U8fX}L$RP{@6))&!p;!F~vtocXDN3kdv|eBh z0dzCb>tckN^2`LyM6H<-Mq?%#Q2hY`ph!FhOa*YS!)g;)xM6Ar)h7tepD{HPtX*)M z4XR%dX4|u3IE;YV@E8NvHZXgz*EcYmmNZVM$R23zg9vZzMIgeuVs=Wr1+orNAO?7| RvVlzI2f``9s0iZ#@c`;J7JL8z diff --git a/plexus-container-default/src/test/test-components/plexus-archiver-1.0-alpha-8.jar b/plexus-container-default/src/test/test-components/plexus-archiver-1.0-alpha-8.jar deleted file mode 100644 index 445287775699ead02b248041a070251e797c3933..0000000000000000000000000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Um>loE&Ja@lYkBlY;Ug~(=Wt{=8B-Sa5(xd2^1y-lM+nL;W? z7D?YAUvkV{V=%GT+rK+DU;7Fi7oc}EVu}ObbefJdMxH;1q8}v~dpgp>i^tMItR9F` zV+38497Z~8l5N12ZA>;U2HUHf(Z!gck$^$4IfCyPEPZiQBV*deZdBfZ-Ne6C-KeLut6~?BCPUyN3(rl8<0rKl99E7|u~QV!?p-(;mSkkn`6okld{pf1rKq@U zsRwjC@1)T6hJr3OeB%Ij_pt`wc?$gI>p)T0p@U|0JKb>QbT=~7++B$x-k zS7jd9C>W1aGO7S8SYTxz7>=1A{!xPXE`{+pvMO_j^$0A9W%Rg`JxAMPG5TJ}%_6{K z!Hf;~rqiBLuyL@Ap}5``5*kK7E=;dYs{`eIf=&ThI9CUamzce18!u4Q)PSKFhJQ#$ z?h3`o0Mp=OBt`dfzTR>OLwRs!B>1-dT);;uY>YYE3d_vD{{`^-0FIn!3kb&y&R!{% z`y4*l0dyhwF4CuR4`PPq(jh+ip0b?>IHKXR0O3=Phq!VOgJ4o(c!PRBkp&?i%{u+L54 zStkB3u43OUQD5P>asW-XJO+QwQm+8%?K~$^RxUyB4DfhBqFLHXK7U=nZKso`VYin}@YMZH)y#^uIWq2mD*0 MjKeuALTQKl56?3=F8}}l diff --git a/plexus-container-default/src/test/test-components/plugin0-1.0-SNAPSHOT.jar b/plexus-container-default/src/test/test-components/plugin0-1.0-SNAPSHOT.jar deleted file mode 100644 index 6498abe93e43d55c4ebdeea07be18b808f72c7f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5100 zcmbtY2RzjO8$avp^&@8{t6$c+B1NQ-oU`{z){%A2$R=0D-{y=4QbsbfBja}>yDlRm zBbzeHjD-JPg_7z&KCjnz-0S;1@8|hEpU?Aop7*K4h=?fw_+fs*PU6eUw;MU`sd7R4 zyf9Q%K}7wV7#Y9}C)PUnGQtw~*&BB;elMnSUKOfvK}#E~qOhdW)~XB>2Dekggaux- zVT&~(U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wMrGrYnaTC{-ZV;vZtlS zh`{+8W`{s@{xK#d&>v)yKQb+?V-Nxlr%$m~X(`~e6ii1g(;q2hE5E$xBv%@ByI`U< zFwjTe1?!va*~|8^r}2GiLa`Eq_*ezQ?i#ag(iL7NS6Wy}aK2bNNp4-q;b-F_~zVj<{LpFJFap{hx*pA&i94D6#nVF0AvAn^el(R|2vf16=XA9*yJ? zzRs94Gx}2hIeayN86})Hp5}p?7tZ0N-`DGFN0>eG!l-}@b6K8A3}QhV$VJ@O<|FVF zc|d+YHUvW_HHel4J4l|e7|@Q?xqch|h#NN&zPOk>^cBCz-BhTKK{B}VxMuMlW{Y_H zh_$g<_5I0xB5GWDZad%ATzw9;e*86$Z-wQ!!anHrv-lap6G_$~ANZo1+Ou)^<-uum znvCAmE%jq)Y-W8Xvib^CxXgHOkyoan;Ntx~JDD)*XZc;QD&Z+n_6)B-!sMZd-RENSGxt@@oXafH$<1f$%`(aX=hK zF5DHDl+*3gEHu+icrCOn{<&B>_$5ty&8B~N0hDM_z=iz3%8v;O#Gr$Meb6|Ljys$r zQ8=VGucG#V7mIg7(E%ozkQ-`IB6_us|L%~wTX-h0_$GlIO_whFX5>rE9Up;1#k)xs z97G1?yl+dF%)XK~+g&q0Nk6Df~3o)waAJ6ff^Qd`V v-FCDcl{!^7@VUIUg;(?Zi&RmT15QQluQuk4z(xSu7&l}B*l?xa`rUs4?S?;( diff --git a/pom.xml b/pom.xml index fb0fbd9d6..0d7b7fb0f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,6 @@ plexus-component-annotations plexus-component-metadata - plexus-container-default