archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1310262 [6/14] - in /archiva/redback/redback-components/trunk: ./ plexus-command-line/ plexus-command-line/src/ plexus-command-line/src/main/ plexus-command-line/src/main/java/ plexus-command-line/src/main/java/org/ plexus-command-line/src...
Date Fri, 06 Apr 2012 09:33:56 GMT
Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,13 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.spring.PlexusBean</role>
+      <implementation>org.codehaus.plexus.spring.ConfigPlexusBean</implementation>
+      <configuration>
+        <config>
+            <xml test="expected"/>
+        </config>
+      </configuration>
+    </component>
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusConfiguration.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,24 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.spring.PlexusBean</role>
+      <implementation>org.codehaus.plexus.spring.PropertiesPlexusBean</implementation>
+      <configuration>
+        <properties>
+            <property>
+              <name>test</name>
+              <value>expected</value>
+            </property>
+            <property>
+              <name>other</name>
+              <value>value</value>
+            </property>
+        </properties>
+        <map>
+          <name>foo</name>
+          <type>bar</type>
+        </map>
+      </configuration>
+    </component>
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectPlexusProperties.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+     <bean id="loggerManager" class="org.codehaus.plexus.logging.console.ConsoleLoggerManager"
+     	init-method="initialize"/>
+
+     <bean id="springBean" class="org.codehaus.plexus.spring.SpringBean"/>
+
+</beans>
\ No newline at end of file

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,18 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.spring.PlexusBean</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.spring.PlexusBeanImpl</implementation>
+      <requirements>
+      	<requirement>
+            <!-- implicit field-injection : no field-name set -->
+      		<role>springBean</role>
+      	</requirement>
+      </requirements>
+      <configuration>
+        <message>expected</message>
+      </configuration>
+    </component>
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringBeansInPlexusComponent.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:aop="http://www.springframework.org/schema/aop"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+  <bean id="plexusBean"
+         class="org.codehaus.plexus.spring.PropertiesPlexusBean">
+    <property name="properties">
+      <value>
+        test=expected
+        other=value
+      </value>
+    </property>
+  </bean>
+
+</beans>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testInjectSpringProperties.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,9 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.spring.PlexusBean</role>
+      <role-hint>default</role-hint>
+      <implementation>org.codehaus.plexus.spring.PlexusBeanImpl</implementation>
+    </component>
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testPlexusLifecycleSupport.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:p="http://www.springframework.org/schema/p"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
+
+  <util:properties id="myProperties" location="classpath:test.properties"/>
+
+  <bean id="myBean"
+        class="org.codehaus.plexus.spring.SpringBean"
+        p:myProperty="myValue"/>
+
+</beans>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testSpringNamespaces.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,36 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.spring.ConfigurablePlexusBean</role>
+      <implementation>org.codehaus.plexus.spring.ConfigurablePlexusBean</implementation>
+      <role-hint>configurable</role-hint>
+      <requirements>
+        <requirement>
+          <role>org.apache.maven.settings.MavenSettingsBuilder</role>
+          <field-name>mavenSettingsBuilder</field-name>
+        </requirement>
+        <requirement>
+          <role>org.codehaus.plexus.commandline.ExecutableResolver</role>	
+        </requirement>
+      </requirements>
+      <configuration>
+        <task-entry-evaluators>
+          <task-entry-evaluator>first</task-entry-evaluator>
+          <task-entry-evaluator>second</task-entry-evaluator>
+        </task-entry-evaluators>
+        <wines>
+          <wine>saumur</wine>	
+        </wines>
+        <local-repository>${plexus.home}/local-repository</local-repository>
+        <toMailbox>foo</toMailbox>
+        <from-mailbox></from-mailbox>        
+      </configuration>
+    </component>
+    <component>
+      <role>org.codehaus.plexus.spring.Wine</role>
+      <implementation>org.codehaus.plexus.spring.SaumurWine</implementation>
+      <instantiation-strategy>per-lookup</instantiation-strategy>
+      <role-hint>saumur</role-hint>
+    </component>	  
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-spring/src/test/resources/testTreeConfigurablePlexusBean.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt Fri Apr  6 09:33:40 2012
@@ -0,0 +1,57 @@
+
+
+/* ----------------------------------------------------------------------------
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Plexus", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ----------------------------------------------------------------------------
+ */

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+-->
+<project>
+  <parent>
+    <groupId>org.codehaus.redback.components</groupId>
+    <artifactId>redback-components</artifactId>
+    <version>1.3-SNAPSHOT</version>
+    <relativePath>../redback-components-parent/pom.xml</relativePath>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>plexus-xmlrpc</artifactId>
+  <name>Plexus XML-RPC Component</name>
+  <version>1.0-beta-5-SNAPSHOT</version>
+
+  <url>http://redback.codehaus.org/components/${project.artifactId}</url>
+
+  <distributionManagement>
+    <site>
+      <id>codehaus.org</id>
+      <url>dav:https://dav.codehaus.org/redback/components/${project.artifactId}</url>
+    </site>
+  </distributionManagement>
+
+  <scm>
+    <connection>scm:svn:https://svn.codehaus.org/redback/components/trunk/plexus-xmlrpc</connection>
+    <developerConnection>scm:svn:https://svn.codehaus.org/redback/components/trunk/plexus-xmlrpc</developerConnection>
+    <url>http://fisheye.codehaus.org/browse/redback/components/trunk/plexus-xmlrpc</url>
+  </scm>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+      <version>1.5.6</version>
+    </dependency>  
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-component-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <scope>test</scope>
+    </dependency>  
+    <dependency>
+      <groupId>xmlrpc</groupId>
+      <artifactId>xmlrpc</artifactId>
+      <version>1.2</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-maven-plugin</artifactId>
+        <version>1.3.4</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,59 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.configuration.PlexusConfigurationException;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class Client
+{
+    /** */
+    private String hostname;
+
+    public Client()
+    {
+    }
+
+    /**
+     * @return Returns the hostname.
+     */
+    public String getHostname()
+        throws InitializationException
+    {
+        if ( StringUtils.isEmpty( hostname ) )
+        {
+            throw new InitializationException( "The 'hostname' element cannot be empty." );
+        }
+
+        // TODO: Add more validation of the IP/hostname itself
+
+        return hostname;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Client.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,548 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.
+ */
+
+/* ----------------------------------------------------------------------------
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Plexus", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ----------------------------------------------------------------------------
+ */
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.Vector;
+
+import org.apache.xmlrpc.WebServer;
+import org.apache.xmlrpc.XmlRpc;
+import org.apache.xmlrpc.XmlRpcClient;
+import org.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.secure.SecureWebServer;
+
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.configuration.PlexusConfigurationException;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+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;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException;
+
+/**
+ *
+ * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
+ * @version $Id$
+ * @todo Handle XmlRpc.setDebug(boolean)
+ */
+public class DefaultXmlRpcComponent
+    extends AbstractLogEnabled
+    implements Contextualizable, Initializable, Startable, XmlRpcComponent
+{
+    /** */
+    private PlexusContainer container;
+
+    // ----------------------------------------------------------------------
+    // Configuration
+    // ----------------------------------------------------------------------
+
+    /** The port to listen on. */
+    private int port;
+
+    /** Secure server state. */
+    private boolean isSecureServer;
+
+    /** SAX Parser class. */
+    private String saxParserClass;
+
+    /** Paranoid state. */
+    private boolean paranoid;
+
+    /** Handlers. */
+    private List handlers;
+
+    /** Accepted Clients. */
+    private List acceptedClients;
+
+    /** Denied Clients. */
+    private List deniedClients;
+
+    /**
+     * A set of properties to configure SSL and JSSE
+     */
+    private Properties systemProperties;
+
+    /** Message Listeners. */
+    private List listeners = new ArrayList();
+
+    private boolean isInitialized = false;
+
+    // ----------------------------------------------------------------------
+    // Privates
+    // ----------------------------------------------------------------------
+
+    /**  The standalone xmlrpc server. */
+    private XmlRpcServer xmlRpcServer;
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void contextualize( Context context )
+        throws ContextException
+    {
+        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+    }
+
+    public void initialize()
+        throws InitializationException
+    {
+        // Set system properties. These are required if you're using SSL.
+        setSystemPropertiesFromConfiguration();
+
+        if ( port == 0 )
+        {
+            port = 8080;
+        }
+
+        getLogger().info( "Initializing the XML-RPC server on port " + port + "." );
+
+        try
+        {
+            xmlRpcServer.addListener( null, port, isSecureServer );
+        }
+        catch ( XmlRpcException e )
+        {
+            throw new InitializationException( "Cannot add listener on port " + port + " [isSecureServer=" + isSecureServer + "]", e );
+        }
+
+        if ( !StringUtils.isEmpty( saxParserClass ) )
+        {
+            try
+            {
+                XmlRpc.setDriver( saxParserClass );
+            }
+            catch ( ClassNotFoundException e )
+            {
+                throw new InitializationException( "Cannot find the specified SAX parser class: " + saxParserClass );
+            }
+        }
+
+        try
+        {
+            registerStartupHandlers();
+        }
+        catch ( Exception e )
+        {
+            throw new InitializationException( "Cannot register startup handlers: ", e );
+        }
+
+        if ( paranoid )
+        {
+            getLogger().info( "Operating in a state of paranoia" );
+
+            // Only set the accept/deny client lists if we
+            // are in a state of paranoia as they will just
+            // be ignored so there's no point in setting them.
+
+            if ( acceptedClients == null )
+            {
+                throw new InitializationException( "When in state of paranoia a list of 'acceptedClients' is required." );
+            }
+
+            for ( int i = 0; i < acceptedClients.size(); i++ )
+            {
+                String clientIP = getClient( acceptedClients, i );
+
+                xmlRpcServer.acceptClient( clientIP );
+
+                getLogger().info( "Accepting client -> " + clientIP );
+            }
+
+            if ( deniedClients == null )
+            {
+                throw new InitializationException( "When in state of paranoia a list of 'deniedClients' is required." );
+            }
+
+            for ( int i = 0; i < deniedClients.size(); i++ )
+            {
+                String clientIP = getClient( acceptedClients, i );
+
+                xmlRpcServer.denyClient( clientIP );
+
+                getLogger().info( "Denying client -> " + clientIP );
+            }
+        }
+
+        isInitialized = true;
+    }
+
+    public void start()
+        throws StartingException
+    {
+        try
+        {
+            xmlRpcServer.startListener( null, port );
+        }
+        catch ( XmlRpcException e )
+        {
+            throw new StartingException( "Cannot start xmlrpc server: ", e );
+        }
+    }
+
+    public void stop()
+        throws StoppingException
+    {
+        // Stop the XML RPC server.  org.apache.xmlrpc.WebServer blocks in a call to
+        // ServerSocket.accept() until a socket connection is made.
+        try
+        {
+            xmlRpcServer.removeListener( null, port );
+        }
+        catch ( XmlRpcException e )
+        {
+            throw new StoppingException( "Cannot stop xmlrpc server: ", e );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // XmlRpcComponent Implementation
+    // ----------------------------------------------------------------------
+
+    /**
+     * Registers any handlers that were defined as part this component's
+     * configuration.  A handler may be defined as a class (which will be
+     * instantiated) or as a role in which case it will be looked up.
+     *
+     * @throws Exception If there were errors registering a handler.
+     */
+    private void registerStartupHandlers()
+        throws Exception
+    {
+        if ( handlers == null )
+        {
+            getLogger().warn( "No handlers to configure." );
+
+            return;
+        }
+
+        getLogger().info( "There are " + handlers.size() + " handlers to configure." );
+
+        for ( int i = 0; i < handlers.size(); i++ )
+        {
+            Object obj = handlers.get( i );
+
+            if ( !(obj instanceof Handler) )
+            {
+                getLogger().warn( "Unknown object type in the handler array: " + obj.getClass().getName() );
+
+                continue;
+            }
+
+            Handler handler = (Handler) obj;
+
+            String name = handler.getName();
+
+            String role = handler.getRole();
+
+            if ( name == null )
+            {
+                throw new PlexusConfigurationException( "Missing required configuration element: 'name' in 'handler'." );
+            }
+
+            if ( name.trim().length() == 0 )
+            {
+                throw new PlexusConfigurationException( "The 'name' element of a 'handler' cant be empty." );
+            }
+
+            if ( role == null )
+            {
+                throw new PlexusConfigurationException( "Missing required configuration element: 'role' in 'handler'." );
+            }
+
+            if ( role.trim().length() == 0 )
+            {
+                throw new PlexusConfigurationException( "The 'role element of a 'handler' cant be empty." );
+            }
+
+            registerComponentHandler( name, role );
+        }
+    }
+
+    /**
+     * Register an Object as a default handler for the service.
+     *
+     * @param handler The handler to use.
+     * @exception XmlRpcException
+     * @exception IOException
+     */
+    public void registerHandler( Object handler )
+        throws XmlRpcException, IOException
+    {
+        registerHandler( "$default", handler );
+    }
+
+    /**
+     * Register an Object as a handler for the service.
+     *
+     * @param handlerName The name the handler is registered under.
+     * @param handler The handler to use.
+     * @throws XmlRpcException If an XmlRpcException occurs.
+     * @throws IOException If an IOException occurs.
+     */
+    public void registerHandler( String handlerName, Object handler )
+        throws XmlRpcException, IOException
+    {
+        xmlRpcServer.addHandler( handlerName, handler );
+    }
+
+    /**
+     * Helper that registers a component as a handler with the specified
+     * handler name.
+     *
+     * @param handlerName The name to register this handle as.
+     * @param handlerRole The role of the component serving as the handler.
+     * @exception Exception If the component could not be looked up.
+     */
+    private void registerComponentHandler( String handlerName, String handlerRole )
+        throws Exception
+    {
+        registerHandler( handlerName, container.lookup( handlerRole ) );
+
+        getLogger().info( "registered: " + handlerName + " with component: " + handlerRole );
+    }
+
+    /**
+     * Unregister a handler.
+     *
+     * @param handlerName The name of the handler to unregister.
+     */
+    public void unregisterHandler( String handlerName )
+        throws XmlRpcException
+    {
+        xmlRpcServer.removeHandler( handlerName );
+    }
+
+    /**
+     * Client's interface to XML-RPC.
+     *
+     * The return type is Object which you'll need to cast to
+     * whatever you are expecting.
+     *
+     * @param url A URL.
+     * @param methodName A String with the method name.
+     * @param params A Vector with the parameters.
+     * @return An Object.
+     * @exception XmlRpcException
+     * @exception IOException
+     */
+    public Object executeRpc( URL url, String methodName, Vector params )
+        throws Exception
+    {
+        try
+        {
+            XmlRpcClient client = new XmlRpcClient( url );
+
+            return client.execute( methodName, params );
+        }
+        catch ( Exception e )
+        {
+            throw new Exception( "XML-RPC call failed", e );
+        }
+    }
+
+    /**
+     * Switch client filtering on/off.
+     *
+     * @param state Whether to filter clients.
+     *
+     * @see #acceptClient(java.lang.String)
+     * @see #denyClient(java.lang.String)
+     */
+    public void setParanoid( boolean state )
+    {
+        if ( isInitialized )
+        {
+            xmlRpcServer.setParanoid( null, port, state );
+        }
+        else
+        {
+            paranoid = state;
+        }
+    }
+
+    /**
+     * Add an IP address to the list of accepted clients. The parameter can
+     * contain '*' as wildcard character, e.g. "192.168.*.*". You must
+     * call setParanoid(true) in order for this to have
+     * any effect.
+     *
+     * @param address The address to add to the list.
+     *
+     * @see #denyClient(java.lang.String)
+     * @see #setParanoid(boolean)
+     */
+    public void acceptClient( String address )
+    {
+        xmlRpcServer.acceptClient( address );
+    }
+
+    /**
+     * Add an IP address to the list of denied clients. The parameter can
+     * contain '*' as wildcard character, e.g. "192.168.*.*". You must call
+     * setParanoid(true) in order for this to have any effect.
+     *
+     * @param address The address to add to the list.
+     *
+     * @see #acceptClient(java.lang.String)
+     * @see #setParanoid(boolean)
+     */
+    public void denyClient( String address )
+    {
+        xmlRpcServer.denyClient( address );
+    }
+
+    /** Add message listener. */
+    public void addMessageListener( XmlRpcMessageListener listener )
+    {
+        listeners.add( listener );
+    }
+
+    /** Message received. */
+    public void messageReceived( String message )
+    {
+        for ( Iterator i = listeners.iterator(); i.hasNext(); )
+        {
+            XmlRpcMessageListener listener = (XmlRpcMessageListener) i.next();
+
+            listener.xmlRpcMessageReceived( message );
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    /**
+     * Create System properties using the key-value pairs in a given
+     * Configuration.  This is used to set system properties and the
+     * URL https connection handler needed by JSSE to enable SSL
+     * between XMLRPC client and server.
+     *
+     */
+    private void setSystemPropertiesFromConfiguration()
+    {
+        if ( systemProperties == null )
+        {
+            return;
+        }
+
+        for ( Enumeration e = systemProperties.propertyNames(); e.hasMoreElements(); )
+        {
+            String key = e.nextElement().toString();
+
+            String value = systemProperties.getProperty( key );
+
+            System.setProperty( key, value );
+
+            getLogger().debug( "Setting property: " + key + " => '" + value + "'." );
+        }
+    }
+
+    private String getClient( List list, int index )
+        throws InitializationException
+    {
+        Object obj = list.get( index );
+
+        if ( !(obj instanceof Client) )
+        {
+            throw new InitializationException( "The client address element must be a '" + Client.class.getName() + "'." );
+        }
+
+        Client client = (Client) obj;
+
+        return client.getHostname();
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponent.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,218 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.InetAddress;
+import java.net.Socket;
+
+import org.apache.xmlrpc.WebServer;
+import org.apache.xmlrpc.XmlRpcException;
+
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultXmlRpcServer
+    extends AbstractLogEnabled
+    implements XmlRpcServer, Startable
+{
+    private int port;
+
+    private String host;
+
+    private WebServer webServer;
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void start()
+    {
+    }
+
+    public void stop()
+    {
+        if ( webServer != null )
+        {
+            webServer.shutdown();
+        }
+
+        try
+        {
+            Socket interrupt = new Socket( InetAddress.getLocalHost(), port );
+
+            interrupt.close();
+        }
+        catch ( Exception ex )
+        {
+            // ignore
+        }
+    }
+
+    // ----------------------------------------------------------------------
+    // XmlRpcServer Implementation
+    // ----------------------------------------------------------------------
+
+    // ----------------------------------------------------------------------
+    // Listener Management
+    // ----------------------------------------------------------------------
+
+    public void addListener( String host, int port, boolean secure )
+        throws XmlRpcException
+    {
+        if ( webServer != null )
+        {
+            throw new RuntimeException( "This implementation only support a single web server." );
+        }
+
+        webServer = new WebServer( port );
+
+        this.port = port;
+
+        this.host = host;
+    }
+
+    public void removeListener( String host, int port )
+        throws XmlRpcException
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.shutdown();
+    }
+
+    public void startListener( String host, int port )
+        throws XmlRpcException
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        if ( host == null )
+        {
+            getLogger().info( "Starting XML-RPC listener on port '" + port + "'." );
+        }
+        else
+        {
+            getLogger().info( "Starting XML-RPC listener on host '" + host + "', port '" + port + "'." );
+        }
+
+        webServer.start();
+    }
+
+    // ----------------------------------------------------------------------
+    // Handler Management
+    // ----------------------------------------------------------------------
+
+    public void addHandler( String name, Object handler )
+        throws XmlRpcException
+    {
+        webServer.addHandler( name, handler );
+    }
+
+    public void addHandler( String host, String name, int port, Object handler )
+        throws XmlRpcException
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.addHandler( name, handler );
+    }
+
+    public void removeHandler( String name )
+        throws XmlRpcException
+    {
+        webServer.removeHandler( name );
+    }
+
+    public void removeHandler( String host, int port, String name )
+        throws XmlRpcException
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.removeHandler( name );
+    }
+
+    // ----------------------------------------------------------------------
+    // Authorization
+    // ----------------------------------------------------------------------
+
+    public void acceptClient( String clientHost )
+    {
+        webServer.setParanoid( true );
+
+        webServer.acceptClient( clientHost );
+    }
+
+    public void acceptClient( String host, int port, String clientHost )
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.setParanoid( true );
+
+        webServer.acceptClient( clientHost );
+    }
+
+    public void denyClient( String clientHost )
+    {
+        webServer.setParanoid( true );
+
+        webServer.denyClient( clientHost );
+    }
+
+    public void denyClient( String host, int port, String clientHost )
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.setParanoid( true );
+
+        webServer.denyClient( clientHost );
+    }
+
+    public void setParanoid( String host, int port, boolean state )
+    {
+        WebServer webServer = getWebServer( host, port );
+
+        webServer.setParanoid( state );
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private WebServer getWebServer( String host, int port )
+    {
+        if ( port != this.port )
+        {
+            throw new RuntimeException( "There isn't a listener on port " + port + "." );
+        }
+
+        if ( !( host == null && this.host == null ) &&  !host.equals( this.host ) )
+        {
+            throw new RuntimeException( "There isn't a listener on host '" + host + "'." );
+        }
+
+        return webServer;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcServer.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,54 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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 <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class Handler
+{
+    /** */
+    private String name;
+
+    /** */
+    private String role;
+
+    /**
+     * @return Returns the name.
+     */
+    public String getName()
+    {
+        return name;
+    }
+
+    /**
+     * @return Returns the role.
+     */
+    public String getRole()
+    {
+        return role;
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/Handler.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,180 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.
+ */
+
+/* ----------------------------------------------------------------------------
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Plexus", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ----------------------------------------------------------------------------
+ */
+
+import java.util.Vector;
+import java.io.IOException;
+import java.net.URL;
+
+import org.apache.xmlrpc.XmlRpcException;
+
+/**
+ * The interface an XmlRpcService implements.
+ *
+ * @author <a href="mailto:josh@stonecottage.com">Josh Lucas</a>
+ * @author <a href="mailto:magnus@handtolvur.is">Magn?s ??r Torfason</a>
+ * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
+ * @author <a href="jvanzyl@periapt.com">Jason van Zyl</a>
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface XmlRpcComponent
+{
+    String ROLE = XmlRpcComponent.class.getName();
+
+    /**
+     * Execute a remote procedure call.
+     *
+     * @param url A URL.
+     * @param methodName A String with the method name.
+     * @param params A Vector with the parameters.
+     * @return An Object.
+     * @exception XmlRpcException
+     * @exception IOException
+     */
+    Object executeRpc( URL url, String methodName, Vector params )
+        throws Exception;
+
+    /**
+     * Register an object as a handler for the XmlRpc Server part.
+     *
+     * @param handlerName The name under which we want
+     * to register the service
+     * @param handler The handler object
+     * @exception XmlRpcException
+     * @exception IOException
+     */
+    void registerHandler( String handlerName, Object handler )
+        throws XmlRpcException, IOException;
+
+    /**
+     * Register an object as a the default handler for
+     * the XmlRpc Server part.
+     *
+     * @param handler The handler object
+     * @exception XmlRpcException
+     * @exception IOException
+     */
+    void registerHandler( Object handler )
+        throws XmlRpcException, IOException;
+
+    /**
+     * Unregister a handler.
+     *
+     * @param handlerName The name of the handler to unregister.
+     */
+    void unregisterHandler( String handlerName )
+        throws XmlRpcException;
+
+    /**
+     * Switch client filtering on/off.
+     * @see #acceptClient( java.lang.String )
+     * @see #denyClient( java.lang.String )
+     */
+    void setParanoid( boolean state );
+
+    /**
+     * Add an IP address to the list of accepted clients. The parameter can
+     * contain '*' as wildcard character, e.g. "192.168.*.*". You must
+     * call setParanoid(true) in order for this to have
+     * any effect.
+     *
+     * @see #denyClient( java.lang.String )
+     * @see #setParanoid( boolean )
+     */
+    void acceptClient( String address );
+
+    /**
+     * Add an IP address to the list of denied clients. The parameter can
+     * contain '*' as wildcard character, e.g. "192.168.*.*". You must call
+     * setParanoid(true) in order for this to have any effect.
+     *
+     * @see #acceptClient( java.lang.String )
+     * @see #setParanoid( boolean )
+     */
+    void denyClient( String address );
+
+    /** Message Listener. */
+    void addMessageListener( XmlRpcMessageListener listener );
+
+    /** Message Received. */
+    void messageReceived( String fileContents );
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcComponent.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,92 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.
+ */
+
+/* ----------------------------------------------------------------------------
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Plexus", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ----------------------------------------------------------------------------
+ */
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface XmlRpcMessageListener
+{
+    public void xmlRpcMessageReceived(String message);
+
+    public void xmlRpcMessageSent(String message);
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcMessageListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,79 @@
+package org.codehaus.plexus.xmlrpc;
+
+import org.apache.xmlrpc.XmlRpcException;
+
+/*
+ * 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 <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface XmlRpcServer
+{
+    String ROLE = XmlRpcServer.class.getName();
+
+    // ----------------------------------------------------------------------
+    // Listener Management
+    // ----------------------------------------------------------------------
+
+    void addListener( String host, int port, boolean secure )
+        throws XmlRpcException;
+
+    void removeListener( String host, int port )
+        throws XmlRpcException;
+
+    void startListener( String host, int port )
+        throws XmlRpcException;
+
+    // ----------------------------------------------------------------------
+    // Handler Management
+    // ----------------------------------------------------------------------
+
+    void addHandler( String name, Object handler )
+        throws XmlRpcException;
+
+    void addHandler( String host, String name, int port, Object handler )
+        throws XmlRpcException;
+
+    void removeHandler( String name )
+        throws XmlRpcException;
+
+    void removeHandler( String host, int port, String name )
+        throws XmlRpcException;
+
+    // ----------------------------------------------------------------------
+    // Authorization Management
+    // ----------------------------------------------------------------------
+
+    void acceptClient( String clientHost );
+
+    void acceptClient( String host, int port, String clientHost );
+
+    void denyClient( String clientHost );
+
+    void denyClient( String host, int port, String clientHost );
+
+    void setParanoid( String host, int port, boolean state );
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/java/org/codehaus/plexus/xmlrpc/XmlRpcServer.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,10 @@
+<component-set>
+  <components>
+
+    <component>
+      <role>org.codehaus.plexus.xmlrpc.XmlRpcServer</role>
+      <implementation>org.codehaus.plexus.xmlrpc.DefaultXmlRpcServer</implementation>
+    </component>
+
+  </components>
+</component-set>

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,38 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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 <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultPokerComponent
+    implements PokerComponent
+{
+    public String poke( String name )
+    {
+        return "Hello World " + name + "!";
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultPokerComponent.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,71 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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.URL;
+import java.util.Vector;
+
+import org.codehaus.plexus.PlexusTestCase;
+
+/**
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public class DefaultXmlRpcComponentTest
+    extends PlexusTestCase
+{
+    public void testExecution()
+        throws Exception
+    {
+        URL url = new URL( "http://localhost:40000/rpc2" );
+
+        // ----------------------------------------------------------------------
+        // Start the XML-RPC server
+        // ----------------------------------------------------------------------
+
+        XmlRpcComponent xmlRpc = (XmlRpcComponent) lookup( XmlRpcComponent.ROLE );
+
+        // The XML-RPC webserver's start() method doesn't wait untill it's started
+        // so we have to wait a bit here to make sure the listener thread has
+        // started up properly
+        Thread.sleep( 100 );
+
+        // ----------------------------------------------------------------------
+        //
+        // ----------------------------------------------------------------------
+
+        Vector params = new Vector();
+
+        params.add( "Travis" );
+
+        Object obj = xmlRpc.executeRpc( url, "poker.poke", params);
+
+        assertEquals( obj.getClass().getName(), String.class.getName() );
+
+        String str = obj.toString();
+
+        assertEquals( "Hello World Travis!", str );
+    }
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java Fri Apr  6 09:33:40 2012
@@ -0,0 +1,34 @@
+package org.codehaus.plexus.xmlrpc;
+
+/*
+ * 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 <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @version $Id$
+ */
+public interface PokerComponent
+{
+    String poke( String name );
+}

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/java/org/codehaus/plexus/xmlrpc/PokerComponent.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,39 @@
+<plexus>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.xmlrpc.PokerComponent</role>
+      <implementation>org.codehaus.plexus.xmlrpc.DefaultPokerComponent</implementation>
+    </component>
+
+    <component>
+      <role>org.codehaus.plexus.xmlrpc.XmlRpcComponent</role>
+      <implementation>org.codehaus.plexus.xmlrpc.DefaultXmlRpcComponent</implementation>
+      <requirements>
+        <requirement>
+          <role>org.codehaus.plexus.xmlrpc.XmlRpcServer</role>
+        </requirement>
+      </requirements>
+      <configuration>
+        <handlers>
+          <handler>
+            <name>poker</name>
+            <role>org.codehaus.plexus.xmlrpc.PokerComponent</role>
+          </handler>
+        </handlers>
+        <accepted-clients>
+          <client>
+            <hostname>127.0.0.1</hostname>
+          </client>
+        </accepted-clients>
+        <denied-clients>
+          <client>
+            <hostname>129.0.0.1</hostname>
+          </client>
+        </denied-clients>
+        <port>40000</port>
+        <paranoid>false</paranoid>
+      </configuration>
+    </component>
+
+  </components>
+</plexus>

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/src/test/resources/org/codehaus/plexus/xmlrpc/DefaultXmlRpcComponentTest.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-100p.jpg
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-100p.jpg?rev=1310262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-100p.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-80p.jpg
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-80p.jpg?rev=1310262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/logo-80p.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/zen_logo2.gif
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/zen_logo2.gif?rev=1310262&view=auto
==============================================================================
Binary file - no diff available.

Propchange: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/images/zen_logo2.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/index.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/index.xml?rev=1310262&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/index.xml (added)
+++ archiva/redback/redback-components/trunk/plexus-xmlrpc/xdocs/index.xml Fri Apr  6 09:33:40 2012
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+
+<document>
+
+  <properties>
+    <title>Plexus</title>
+    <author email="jason@zenplex.com">Jason van Zyl</author>
+  </properties>
+
+  <body>
+
+  <section name="Plexus">
+    <p>
+    </p>
+  </section>
+  
+  <section name="Alternative XMLRPC component - XmlRpcManagerComponent">
+    <p>
+       This is stored under the org.codehaus.plexus.xmlrpc.manager package to separate it from
+       the other components.
+    </p>
+    
+    <p>
+       Simply configure a new component and assign handlers as shown below.
+    </p>
+    
+    <p>
+    To configure the components, it expects the configuration/handlerName elements to return the
+    names of all components that implement the XmlRpcHandlerDecorator. For example,
+    <source>
+    <![CDATA[
+<configuration>
+  <handlerName>mock0</handlerName>
+  <handlerName>mock1</handlerName>
+</configuration>
+      ]]>
+    </source>
+    
+    </p>
+    
+    <subsection name="Servlet Configuration">
+      <p>Here is an example method of using this component to handle XML RPC requests.  You may have 
+      to adjust the component acquisition steps for your particular application.</p>
+<source>
+<![CDATA[
+public class XmlRpcServlet extends HttpServlet
+{
+    public void doPost(HttpServletRequest request, HttpServletResponse response)
+    {
+        try
+        {
+            ServiceManager sm = PlexusServletUtils.getServiceManager(getServletContext());
+            XmlRpcManagerComponent xrmc = (XmlRpcManagerComponent) sm.lookup(XmlRpcManagerComponent.ROLE);
+            XmlRpcServer xmlrpc = xrmc.getXmlRpcServer();
+            byte[] result = xmlrpc.execute(request.getInputStream());
+            response.setContentType("text/xml");
+            response.setContentLength(result.length);
+            OutputStream out = response.getOutputStream();
+            out.write(result);
+            out.flush();
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+}
+      ]]>
+    </source>
+    </subsection>
+  </section>
+</body>
+</document>



Mime
View raw message