You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2007/05/11 18:22:23 UTC
svn commit: r537223 [1/2] - in /maven/continuum/trunk: ./ continuum-webapp/
continuum-webapp/src/main/java/org/apache/maven/continuum/web/xmlrpc/
continuum-webapp/src/main/resources/META-INF/plexus/
continuum-webapp/src/main/webapp/WEB-INF/ continuum-x...
Author: evenisse
Date: Fri May 11 09:22:15 2007
New Revision: 537223
URL: http://svn.apache.org/viewvc?view=rev&rev=537223
Log:
Refactoring of xmlrpc stuff.
o xmlrpc service runs now in a servlet and don't use a specific port
o the client use the xmlrpc client factory to simplify the client code
o update to xmlrpc 3.0
Added:
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/ (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/ (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/ (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumXmlRpcComponent.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumXmlRpcConfig.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumXmlRpcServlet.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumXmlRpcServletServer.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/Listener.java (with props)
maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/PropertiesHandlerMapping.java (with props)
Removed:
maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/xmlrpc/
maven/continuum/trunk/continuum-xmlrpc/src/
Modified:
maven/continuum/trunk/continuum-webapp/pom.xml
maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
maven/continuum/trunk/continuum-xmlrpc/pom.xml
maven/continuum/trunk/pom.xml
Modified: maven/continuum/trunk/continuum-webapp/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/pom.xml?view=diff&rev=537223&r1=537222&r2=537223
==============================================================================
--- maven/continuum/trunk/continuum-webapp/pom.xml (original)
+++ maven/continuum/trunk/continuum-webapp/pom.xml Fri May 11 09:22:15 2007
@@ -276,7 +276,6 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xwork-integration</artifactId>
- <version>1.0-alpha-6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -392,12 +391,7 @@
</dependency>
<dependency>
<groupId>org.apache.maven.continuum</groupId>
- <artifactId>continuum-xmlrpc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-xmlrpc</artifactId>
- <version>1.0-beta-4</version>
+ <artifactId>continuum-xmlrpc-server</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml?view=diff&rev=537223&r1=537222&r2=537223
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml Fri May 11 09:22:15 2007
@@ -31,9 +31,6 @@
<role-hint>check-out-project</role-hint>
</component>
<component>
- <role>org.apache.maven.continuum.web.xmlrpc.XmlRpcService</role>
- </component>
- <component>
<role>org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor</role>
<role-hint>prepare-release</role-hint>
</component>
@@ -81,29 +78,6 @@
config-at="org.codehaus.plexus.security"/>
<properties fileName="org/apache/maven/continuum/security.properties" config-at="org.codehaus.plexus.security"/>
</properties>
- </configuration>
- </component>
-
- <!--
- | The XML-RPC service
- |-->
- <component>
- <role>org.apache.maven.continuum.web.xmlrpc.XmlRpcService</role>
- <implementation>org.apache.maven.continuum.web.xmlrpc.DefaultXmlRpcService</implementation>
- <description></description>
- <requirements>
- <requirement>
- <role>org.codehaus.plexus.xmlrpc.XmlRpcServer</role>
- <field-name>xmlRpcServer</field-name>
- </requirement>
- <requirement>
- <role>org.apache.maven.continuum.xmlrpc.ContinuumXmlRpc</role>
- <field-name>handler</field-name>
- </requirement>
- </requirements>
- <configuration>
- <port>8000</port>
- <handler-name>continuum</handler-name>
</configuration>
</component>
Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml?view=diff&rev=537223&r1=537222&r2=537223
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/web.xml Fri May 11 09:22:15 2007
@@ -69,6 +69,16 @@
<listener-class>org.codehaus.plexus.xwork.PlexusLifecycleListener</listener-class>
</listener>
+ <servlet>
+ <servlet-name>XmlRpcServlet</servlet-name>
+ <servlet-class>org.apache.maven.continuum.xmlrpc.server.ContinuumXmlRpcServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>XmlRpcServlet</servlet-name>
+ <url-pattern>/xmlrpc</url-pattern>
+ </servlet-mapping>
+
<error-page>
<error-code>403</error-code>
<location>/WEB-INF/jsp/error/httpError.jsp?errorCode=403</location>
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 11 09:22:15 2007
@@ -0,0 +1,2 @@
+target
+*.iml
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml Fri May 11 09:22:15 2007
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>continuum-xmlrpc-api</artifactId>
+ <name>Continuum XMLRPC :: API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-common</artifactId>
+ <version>3.0</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>modello-continuum</id>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ <configuration>
+ <model>src/main/mdo/continuum-service.xml</model>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <version>1.1.0</version>
+ <packageWithVersion>false</packageWithVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java Fri May 11 09:22:15 2007
@@ -0,0 +1,302 @@
+package org.apache.maven.continuum.xmlrpc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.xmlrpc.project.AddingResult;
+import org.apache.maven.continuum.xmlrpc.project.BuildResult;
+import org.apache.maven.continuum.xmlrpc.project.Project;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
+import org.apache.xmlrpc.XmlRpcException;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface ContinuumService
+{
+ // ----------------------------------------------------------------------
+ // Projects
+ // ----------------------------------------------------------------------
+
+ /**
+ * Get All projects.
+ *
+ * @return List of {@link ProjectSummary}
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ List getProjects()
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Get a project.
+ *
+ * @param projectId the project id
+ * @return The project summary
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ ProjectSummary getProjectSummary( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Get a project with all details.
+ *
+ * @param projectId The project id
+ * @return The project
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ Project getProjectWithAllDetails( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Remove a project.
+ *
+ * @param projectId The project id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int removeProject( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Projects Groups
+ // ----------------------------------------------------------------------
+
+ /**
+ * Get a project group.
+ *
+ * @param projectGroupId The project group id
+ * @return The project group summary
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ ProjectGroupSummary getProjectGroupSummary( int projectGroupId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Get a project group with all details.
+ *
+ * @param projectGroupId The project group id
+ * @return The project group
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ ProjectGroup getProjectGroupWithProjects( int projectGroupId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Remove a project group.
+ *
+ * @param projectGroupId The project group id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int removeProjectGroup( int projectGroupId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Building
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add the project to the build queue.
+ *
+ * @param projectId The project id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int addProjectToBuildQueue( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Add the project to the build queue.
+ *
+ * @param projectId The project id
+ * @param buildDefinitionId The build definition id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int addProjectToBuildQueue( int projectId, int buildDefinitionId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Build the project
+ *
+ * @param projectId The project id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int buildProject( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Build the project
+ *
+ * @param projectId The project id
+ * @param buildDefinitionId The build definition id
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ int buildProject( int projectId, int buildDefinitionId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Build Results
+ // ----------------------------------------------------------------------
+
+ /**
+ * Returns the build result.
+ *
+ * @param projectId The project id
+ * @param buildId The build id
+ * @return The build result
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ BuildResult getBuildResult( int projectId, int buildId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Returns the project build result summary list.
+ *
+ * @param projectId The project id
+ * @return The build result list
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ List getBuildResultsForProject( int projectId )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Returns the build output.
+ *
+ * @param projectId The project id
+ * @param buildId The build id
+ * @return The build output
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ String getBuildOutput( int projectId, int buildId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Maven 2.x projects
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add a maven 2.x project from an url.
+ *
+ * @param url The POM url
+ * @return The result of the action with the list of projects created
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ AddingResult addMavenTwoProject( String url )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Add a maven 2.x project from an url.
+ *
+ * @param url The POM url
+ * @param projectGroupId The id of the group where projects will be stored
+ * @return The result of the action with the list of projects created
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ AddingResult addMavenTwoProject( String url, int projectGroupId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Maven 1.x projects
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add a maven 1.x project from an url.
+ *
+ * @param url The POM url
+ * @return The result of the action with the list of projects created
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ AddingResult addMavenOneProject( String url )
+ throws ContinuumException, XmlRpcException;
+
+ /**
+ * Add a maven 1.x project from an url.
+ *
+ * @param url The POM url
+ * @param projectGroupId The id of the group where projects will be stored
+ * @return The result of the action with the list of projects created
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ AddingResult addMavenOneProject( String url, int projectGroupId )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Maven ANT projects
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add an ANT project.
+ *
+ * @param project The project to add. groupId, artifactId, version and scm informations are required
+ * @return The project populated with the id.
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ ProjectSummary addAntProject( ProjectSummary project )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // Maven Shell projects
+ // ----------------------------------------------------------------------
+
+ /**
+ * Add an shell project.
+ *
+ * @param project The project to add. groupId, artifactId, version and scm informations are required
+ * @return The project populated with the id.
+ * @throws ContinuumException
+ * @throws XmlRpcException
+ */
+ ProjectSummary addShellProject( ProjectSummary project )
+ throws ContinuumException, XmlRpcException;
+
+ // ----------------------------------------------------------------------
+ // ADMIN TASKS
+ // ----------------------------------------------------------------------
+
+ // ----------------------------------------------------------------------
+ // TODO:Schedule
+ // ----------------------------------------------------------------------
+
+ // ----------------------------------------------------------------------
+ // TODO:Users
+ // ----------------------------------------------------------------------
+
+}
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/java/org/apache/maven/continuum/xmlrpc/ContinuumService.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml Fri May 11 09:22:15 2007
@@ -0,0 +1,1052 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<model>
+ <id>continuum-client</id>
+ <name>Continuum Client</name>
+ <description>Continuum's remote client object model.</description>
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.maven.continuum.xmlrpc.project</value>
+ </default>
+ </defaults>
+
+ <classes>
+ <class>
+ <name>ProjectGroupSummary</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.0+</version>
+ <required>true</required>
+ <type>int</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>groupId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ProjectGroup</name>
+ <version>1.1.0+</version>
+ <superClass>ProjectGroupSummary</superClass>
+ <fields>
+ <field>
+ <name>projects</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectSummary</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>notifiers</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectNotifier</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>buildDefinitions</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>BuildDefinition</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ProjectSummary</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>id</name>
+ <required>true</required>
+ <identifier>true</identifier>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>groupId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>artifactId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>executorId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>url</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmUrl</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmTag</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmUsername</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmPassword</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmUseCache</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>version</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <!-- TODO: should these 3 just be queried from the builds list? -->
+ <field>
+ <name>state</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ <defaultValue>1</defaultValue>
+ </field>
+ <field>
+ <name>oldState</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <!-- TODO: maybe buildresult itself? -->
+ <field>
+ <name>latestBuildId</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>buildNumber</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>workingDirectory</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <!-- TODO, this is not exported over XMLRPC yet -->
+ <field>
+ <name>projectGroup</name>
+ <version>1.1.0+</version>
+ <required>true</required>
+ <association xml.reference="true">
+ <type>ProjectGroupSummary</type>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Project</name>
+ <version>1.1.0+</version>
+ <superClass>ProjectSummary</superClass>
+ <fields>
+ <field>
+ <name>parent</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectDependency</type>
+ </association>
+ </field>
+ <field>
+ <name>developers</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectDeveloper</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>dependencies</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectDependency</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>notifiers</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectNotifier</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>buildDefinitions</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>BuildDefinition</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ProjectNotifier</name>
+ <version>1.1.0+</version>
+ <description>
+ Configures one method for notifying users/developers when a build breaks.
+ </description>
+ <fields>
+ <field>
+ <name>id</name>
+ <required>true</required>
+ <identifier>true</identifier>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>type</name>
+ <version>1.1.0+</version>
+ <defaultValue>mail</defaultValue>
+ <type>String</type>
+ <description>The mechanism used to deliver notifications.</description>
+ </field>
+ <field>
+ <name>from</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ <description>The origin of the notifier (pom or user).</description>
+ </field>
+ <field>
+ <name>enabled</name>
+ <version>1.1.0+</version>
+ <defaultValue>true</defaultValue>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>recipientType</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>sendOnSuccess</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>sendOnFailure</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>sendOnError</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>sendOnWarning</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>configuration</name>
+ <version>1.1.0+</version>
+ <description>Extended configuration specific to this notifier goes here.</description>
+ <type>Map</type>
+ <association xml.mapStyle="inline">
+ <type>String</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.1.0+</version>
+ <code><![CDATA[
+
+ public static final int FROM_PROJECT = 1;
+
+ public static final int FROM_USER = 2;
+
+ public boolean isFromProject()
+ {
+ return from == FROM_PROJECT;
+ }
+
+ public boolean isFromUser()
+ {
+ return from == FROM_USER;
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+ </class>
+
+ <class>
+ <name>ProjectDeveloper</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>scmId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>email</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>continuumId</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ProjectDependency</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>groupId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>artifactId</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>version</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>BuildResultSummary</name>
+ <version>1.1.0+</version>
+ <description><![CDATA[
+ This class is a summary of a single continuum build.
+ ]]></description>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>buildNumber</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>state</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>startTime</name>
+ <version>1.1.0+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>endTime</name>
+ <version>1.1.0+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>success</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>exitCode</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>project</name>
+ <version>1.1.0+</version>
+ <required>true</required>
+ <association xml.reference="true">
+ <type>ProjectSummary</type>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>BuildResult</name>
+ <version>1.1.0+</version>
+ <superClass>BuildResultSummary</superClass>
+ <description><![CDATA[
+ This class is a summary of a single continuum build.
+ ]]></description>
+ <fields>
+ <field>
+ <name>trigger</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>error</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmResult</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ScmResult</type>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>AddingResult</name>
+ <version>1.1.0+</version>
+ <description><![CDATA[
+ This class is the result of add maven project action.
+ ]]></description>
+ <fields>
+ <field>
+ <name>projects</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectSummary</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>projectGroups</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ProjectGroupSummary</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.1.0+</version>
+ <code><![CDATA[
+ private java.util.List errors = new java.util.ArrayList();
+
+ /**
+ * Add an error that happened during adding the project to Continuum.
+ *
+ * @param errorKey error id (so it can be internationalized later)
+ */
+ public void addError( String errorKey )
+ {
+ errors.add( errorKey );
+ }
+
+ /**
+ * Get the errors that happened during adding the project to Continuum.
+ * There is an entry with the error key (so it can be internationalized later) for each error.
+ *
+ * @return {@link java.util.List} < {@link String} >
+ */
+ public java.util.List getErrors()
+ {
+ return errors;
+ }
+
+ /**
+ * Quick check to see if there are any errors.
+ *
+ * @return boolean indicating if there are any errors.
+ */
+ public boolean hasErrors()
+ {
+ return ( errors != null ) && ( !errors.isEmpty() );
+ }
+
+ /**
+ * Returns a string representation of the errors.
+ *
+ * @return a string representation of the errors.
+ */
+ public String getErrorsAsString()
+ {
+ if ( !hasErrors() )
+ {
+ return null;
+ }
+
+ StringBuffer message = new StringBuffer();
+ for ( java.util.Iterator i = errors.iterator(); i.hasNext(); )
+ {
+ String error = (String) i.next();
+ message.append( error );
+ message.append( "\n" );
+ }
+ return message.toString();
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+ </class>
+
+ <class>
+ <name>ScmResult</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.scm</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>success</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>commandLine</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>providerMessage</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>commandOutput</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>exception</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>changes</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ChangeSet</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>ChangeSet</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.scm</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>id</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ <identity>true</identity>
+ </field>
+ <field>
+ <name>author</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field stash.maxSize="8192">
+ <name>comment</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>date</name>
+ <version>1.1.0+</version>
+ <!-- TODO: Because JPOX persists as UTC and pulls back using the local time, we have to take over -->
+ <type>long</type>
+ </field>
+ <field>
+ <name>files</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>ChangeFile</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.1.0+</version>
+ <code><![CDATA[
+ /**
+ * @return Returns string representation of the changeset
+ */
+ public String toString()
+ {
+ String result = author + "\n" + date + "\n";
+
+ if ( files != null )
+ {
+ for ( java.util.Iterator i = files.iterator(); i.hasNext(); )
+ {
+ ChangeFile file = (ChangeFile) i.next();
+
+ result += file + "\n";
+ }
+ }
+
+ result += comment;
+
+ return result;
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals( Object obj )
+ {
+ if ( obj instanceof ChangeSet )
+ {
+ ChangeSet changeSet = (ChangeSet) obj;
+
+ if ( toString().equals( changeSet.toString() ) )
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public java.util.Date getDateAsDate()
+ {
+ if ( date > 0 )
+ {
+ return new java.util.Date( date );
+ }
+
+ return null;
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+ </class>
+
+ <class>
+ <name>ChangeFile</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.scm</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>revision</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>status</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.1.0+</version>
+ <code><![CDATA[
+ /**
+ * Provide a version of the object as a string for debugging purposes
+ *
+ * @return a {@link String}made up of the properties of the object
+ */
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer( getName() );
+
+ if ( getRevision() != null )
+ {
+ buffer.append( ", " ).append( getRevision() );
+ }
+
+ return buffer.toString();
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+ </class>
+
+ <class>
+ <name>TestResult</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>testCount</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>failureCount</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>totalTime</name>
+ <version>1.1.0+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>suiteResults</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>SuiteResult</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>SuiteResult</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>testCount</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>failureCount</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>totalTime</name>
+ <version>1.1.0+</version>
+ <type>long</type>
+ </field>
+ <field>
+ <name>failures</name>
+ <version>1.1.0+</version>
+ <association>
+ <type>TestCaseFailure</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>TestCaseFailure</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.test</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>exception</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>BuildDefinition</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>id</name>
+ <required>true</required>
+ <identifier>true</identifier>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>defaultForProject</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ </field>
+ <field>
+ <name>goals</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>arguments</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>buildFile</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>buildFresh</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ <description>
+ true if the build is to be smoked and checked back out from the scm each build
+ </description>
+ </field>
+ <field>
+ <name>schedule</name>
+ <version>1.1.0+</version>
+ <association xml.reference="true">
+ <type>Schedule</type>
+ </association>
+ </field>
+ <field>
+ <name>profile</name>
+ <version>1.1.0+</version>
+ <association xml.reference="true">
+ <type>Profile</type>
+ </association>
+ </field>
+ <field>
+ <name>latestBuildId</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ <defaultValue>0</defaultValue>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Schedule</name>
+ <version>1.1.0+</version>
+ <description><![CDATA[
+ Schedule for a project.
+ ]]></description>
+ <fields>
+ <field>
+ <name>id</name>
+ <identifier>true</identifier>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>active</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>delay</name>
+ <description><![CDATA[
+ Delay in seconds.
+ ]]></description>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>maxJobExecutionTime</name>
+ <description>
+ Maximum execution time of a job in seconds before it's
+ terminated.
+ </description>
+ <version>1.1.0+</version>
+ <type>int</type>
+ <defaultValue>3600</defaultValue>
+ </field>
+ <field>
+ <name>cronExpression</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ </class>
+
+ <class>
+ <name>Profile</name>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>id</name>
+ <identifier>true</identifier>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>active</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>scmMode</name>
+ <version>1.1.0+</version>
+ <type>int</type>
+ </field>
+ <field>
+ <name>buildWithoutChanges</name>
+ <version>1.1.0+</version>
+ <type>boolean</type>
+ </field>
+ </fields>
+ </class>
+
+ <!-- TODO: this isn't really appropriate to generate with Modello -->
+ <class>
+ <name>ContinuumProjectState</name>
+ <packageName>org.apache.maven.continuum.xmlrpc.project</packageName>
+ <version>1.1.0+</version>
+ <fields>
+ <field>
+ <name>name</name>
+ <version>1.1.0+</version>
+ <type>String</type>
+ </field>
+ </fields>
+ <codeSegments>
+ <codeSegment>
+ <version>1.1.0+</version>
+ <code><![CDATA[
+ public final static int NEW = 1;
+ public final static int OK = 2;
+ public final static int FAILED = 3;
+ public final static int ERROR = 4;
+ public final static int BUILDING = 6;
+ public final static int CHECKING_OUT = 7;
+ public final static int UPDATING = 8;
+ public final static int WARNING = 9;
+ public final static int CHECKEDOUT = 10;
+
+ // TODO: maybe move these to another class
+ public static final int TRIGGER_FORCED = 1;
+
+ // TODO: remove
+ public static final int TRIGGER_SCHEDULED = 0;
+
+ public static final int TRIGGER_UNKNOWN = TRIGGER_SCHEDULED;
+
+ public String getI18nKey()
+ {
+ return "org.apache.maven.continuum.project.state." + name;
+ }
+
+ public boolean equals( Object object )
+ {
+ if ( !( object instanceof ContinuumProjectState ) )
+ {
+ return false;
+ }
+
+ ContinuumProjectState other = (ContinuumProjectState) object;
+
+ return name.equals( other.name );
+ }
+
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ public String toString()
+ {
+ return name;
+ }
+ ]]></code>
+ </codeSegment>
+ </codeSegments>
+ </class>
+ </classes>
+</model>
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-api/src/main/mdo/continuum-service.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 11 09:22:15 2007
@@ -0,0 +1,2 @@
+*.iml
+target
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml Fri May 11 09:22:15 2007
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>continuum-xmlrpc-client</artifactId>
+ <name>Continuum XMLRPC :: Client</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-client</artifactId>
+ <version>3.0</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java Fri May 11 09:22:15 2007
@@ -0,0 +1,434 @@
+package org.apache.maven.continuum.xmlrpc.continuum;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.xmlrpc.ContinuumService;
+import org.apache.maven.continuum.xmlrpc.project.AddingResult;
+import org.apache.maven.continuum.xmlrpc.project.BuildResult;
+import org.apache.maven.continuum.xmlrpc.project.ContinuumProjectState;
+import org.apache.maven.continuum.xmlrpc.project.Project;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
+import org.apache.xmlrpc.client.XmlRpcClient;
+import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
+import org.apache.xmlrpc.client.util.ClientFactory;
+
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class ContinuumXmlRpcClient
+ implements ContinuumService
+{
+ private ContinuumService continuum;
+
+ private static Hashtable statusMap;
+
+ static
+ {
+ statusMap = new Hashtable();
+ statusMap.put( new Integer( ContinuumProjectState.NEW ), "New" );
+ statusMap.put( new Integer( ContinuumProjectState.CHECKEDOUT ), "New" );
+ statusMap.put( new Integer( ContinuumProjectState.OK ), "OK" );
+ statusMap.put( new Integer( ContinuumProjectState.FAILED ), "Failed" );
+ statusMap.put( new Integer( ContinuumProjectState.ERROR ), "Error" );
+ statusMap.put( new Integer( ContinuumProjectState.BUILDING ), "Building" );
+ statusMap.put( new Integer( ContinuumProjectState.CHECKING_OUT ), "Checking out" );
+ statusMap.put( new Integer( ContinuumProjectState.UPDATING ), "Updating" );
+ statusMap.put( new Integer( ContinuumProjectState.WARNING ), "Warning" );
+ }
+
+ public ContinuumXmlRpcClient( URL serviceUrl )
+ {
+ this( serviceUrl, null, null );
+ }
+
+ public ContinuumXmlRpcClient( URL serviceUrl, String login, String password )
+ {
+ XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl()
+ {
+ public boolean isEnabledForExtensions()
+ {
+ return true;
+ }
+ };
+
+ if ( login != null )
+ {
+ config.setBasicUserName( login );
+ config.setBasicPassword( password );
+ }
+ config.setServerURL( serviceUrl );
+
+ XmlRpcClient client = new XmlRpcClient();
+ client.setConfig( config );
+ ClientFactory factory = new ClientFactory( client );
+ continuum = (ContinuumService) factory.newInstance( ContinuumService.class );
+ }
+
+ // ----------------------------------------------------------------------
+ // Projects
+ // ----------------------------------------------------------------------
+
+ public List getProjects()
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getProjects();
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public ProjectSummary getProjectSummary( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getProjectSummary( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public Project getProjectWithAllDetails( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getProjectWithAllDetails( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public int removeProject( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.removeProject( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public ProjectSummary refreshProjectSummary( ProjectSummary project )
+ throws ContinuumException
+ {
+ if ( project == null )
+ {
+ return null;
+ }
+ return getProjectSummary( project.getId() );
+ }
+
+ public Project refreshProjectWithAllDetails( ProjectSummary project )
+ throws ContinuumException
+ {
+ if ( project == null )
+ {
+ return null;
+ }
+ return getProjectWithAllDetails( project.getId() );
+ }
+
+ // ----------------------------------------------------------------------
+ // Projects Groups
+ // ----------------------------------------------------------------------
+
+ public ProjectGroupSummary getProjectGroupSummary( int projectGroupId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getProjectGroupSummary( projectGroupId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public ProjectGroup getProjectGroupWithProjects( int projectGroupId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getProjectGroupWithProjects( projectGroupId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public int removeProjectGroup( int projectGroupId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.removeProjectGroup( projectGroupId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public ProjectGroupSummary refreshProjectGroupSummary( ProjectGroupSummary projectGroup )
+ throws ContinuumException
+ {
+ if ( projectGroup == null )
+ {
+ return null;
+ }
+ return getProjectGroupSummary( projectGroup.getId() );
+ }
+
+ public ProjectGroup refreshProjectGroupSummaryWithProjects( ProjectGroupSummary projectGroup )
+ throws ContinuumException
+ {
+ if ( projectGroup == null )
+ {
+ return null;
+ }
+ return getProjectGroupWithProjects( projectGroup.getId() );
+ }
+
+ // ----------------------------------------------------------------------
+ // Building
+ // ----------------------------------------------------------------------
+
+ public int addProjectToBuildQueue( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addProjectToBuildQueue( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+
+ }
+
+ public int addProjectToBuildQueue( int projectId, int buildDefinitionId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addProjectToBuildQueue( projectId, buildDefinitionId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+
+ }
+
+ public int buildProject( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.buildProject( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public int buildProject( int projectId, int buildDefinitionId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.buildProject( projectId, buildDefinitionId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Build Results
+ // ----------------------------------------------------------------------
+
+ public BuildResult getBuildResult( int projectId, int buildId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getBuildResult( projectId, buildId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public List getBuildResultsForProject( int projectId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getBuildResultsForProject( projectId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public String getBuildOutput( int projectId, int buildId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.getBuildOutput( projectId, buildId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Maven 2.x projects
+ // ----------------------------------------------------------------------
+
+ public AddingResult addMavenTwoProject( String url )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addMavenTwoProject( url );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public AddingResult addMavenTwoProject( String url, int projectGroupId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addMavenTwoProject( url, projectGroupId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Maven 1.x projects
+ // ----------------------------------------------------------------------
+
+ public AddingResult addMavenOneProject( String url )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addMavenOneProject( url );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ public AddingResult addMavenOneProject( String url, int projectGroupId )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addMavenOneProject( url, projectGroupId );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Maven ANT projects
+ // ----------------------------------------------------------------------
+
+ public ProjectSummary addAntProject( ProjectSummary project )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addAntProject( project );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Maven Shell projects
+ // ----------------------------------------------------------------------
+
+ public ProjectSummary addShellProject( ProjectSummary project )
+ throws ContinuumException
+ {
+ try
+ {
+ return continuum.addShellProject( project );
+ }
+ catch ( Exception e )
+ {
+ throw new ContinuumException( "The remote method failed.", e );
+ }
+ }
+
+ // ----------------------------------------------------------------------
+ // Utils
+ // ----------------------------------------------------------------------
+
+ public String getProjectStatusAsString( int status )
+ {
+ return (String) statusMap.get( new Integer( status ) );
+ }
+}
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/ContinuumXmlRpcClient.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java Fri May 11 09:22:15 2007
@@ -0,0 +1,97 @@
+package org.apache.maven.continuum.xmlrpc.continuum;
+
+import org.apache.maven.continuum.xmlrpc.project.AddingResult;
+import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
+import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
+
+import java.net.URL;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class SampleClient
+{
+ public static void main( String[] args )
+ throws Exception
+ {
+ ContinuumXmlRpcClient client =
+ new ContinuumXmlRpcClient( new URL( "http://localhost:9090/xmlrpc" ), "admin", "admin1" );
+
+ System.out.println( "Adding project..." );
+ AddingResult result = client.addMavenTwoProject( "http://svn.codehaus.org/plexus/plexus-utils/trunk/pom.xml" );
+ if ( result.hasErrors() )
+ {
+ System.out.println( result.getErrorsAsString() );
+ return;
+ }
+ System.out.println( "Project Groups added." );
+ System.out.println( "=====================" );
+ for ( Iterator i = result.getProjectGroups().iterator(); i.hasNext(); )
+ {
+ ProjectGroupSummary pg = (ProjectGroupSummary) i.next();
+ System.out.println( "Id: " + pg.getId() );
+ System.out.println( "Group Id" + pg.getGroupId() );
+ System.out.println( "Name: " + pg.getName() );
+ System.out.println( "Description:" + pg.getDescription() );
+ }
+
+ System.out.println();
+
+ System.out.println( "Projects added." );
+ System.out.println( "=====================" );
+ for ( Iterator i = result.getProjects().iterator(); i.hasNext(); )
+ {
+ ProjectSummary p = (ProjectSummary) i.next();
+ printProjectSummary( client.getProjectSummary( p.getId() ) );
+ }
+
+ ProjectSummary ps = (ProjectSummary) result.getProjects().get( 0 );
+
+ for ( int i = 0; i < 30; i++ )
+ {
+ ProjectSummary p = client.refreshProjectSummary( ps );
+ System.out.println(
+ "State of " + p.getName() + "(" + p.getId() + "): " + client.getProjectStatusAsString( p.getState() ) );
+ Thread.sleep( 1000 );
+ }
+
+ System.out.println();
+
+ System.out.println( "Projects list." );
+ System.out.println( "=====================" );
+ List projects = client.getProjects();
+ for ( Iterator i = projects.iterator(); i.hasNext(); )
+ {
+ ProjectSummary p = (ProjectSummary) i.next();
+ printProjectSummary( p );
+ System.out.println();
+ }
+
+ Thread.sleep( 60000 );
+
+ System.out.println();
+
+ System.out.println( "Remove all projects." );
+ System.out.println( "=====================" );
+ for ( Iterator i = projects.iterator(); i.hasNext(); )
+ {
+ ProjectSummary p = (ProjectSummary) i.next();
+ System.out.println( "Remove '" + p.getName() + "' - " + p.getVersion() + " (" + p.getId() + ")" );
+ client.removeProject( p.getId() );
+ }
+ }
+
+ public static void printProjectSummary( ProjectSummary project )
+ {
+ System.out.println( "Id: " + project.getId() );
+ System.out.println( "Group Id:" + project.getGroupId() );
+ System.out.println( "Artifact Id: " + project.getArtifactId() );
+ System.out.println( "Version: " + project.getVersion() );
+ System.out.println( "Name: " + project.getName() );
+ System.out.println( "Description: " + project.getDescription() );
+ System.out.println( "SCM Url: " + project.getScmUrl() );
+ }
+}
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-client/src/main/java/org/apache/maven/continuum/xmlrpc/continuum/SampleClient.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 11 09:22:15 2007
@@ -0,0 +1,2 @@
+*.iml
+target
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml Fri May 11 09:22:15 2007
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>continuum-xmlrpc-server</artifactId>
+ <name>Continuum XMLRPC :: Server</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.continuum</groupId>
+ <artifactId>continuum-xmlrpc-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-xwork-integration</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-server</artifactId>
+ <version>3.0</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-maven-plugin</artifactId>
+ <configuration>
+ <roleDefaults>
+ <roleDefault>
+ <role>org.apache.maven.continuum.xmlrpc.ContinuumXmlRpcComponent</role>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
+ </roleDefault>
+ </roleDefaults>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate</id>
+ <goals>
+ <goal>descriptor</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java?view=auto&rev=537223
==============================================================================
--- maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java (added)
+++ maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java Fri May 11 09:22:15 2007
@@ -0,0 +1,107 @@
+package org.apache.maven.continuum.xmlrpc.server;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.apache.xmlrpc.XmlRpcException;
+import org.apache.xmlrpc.XmlRpcRequest;
+import org.apache.xmlrpc.server.RequestProcessorFactoryFactory;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ * @plexus.component role="org.apache.xmlrpc.server.RequestProcessorFactoryFactory"
+ */
+public class ConfiguredBeanProcessorFactory
+ implements RequestProcessorFactoryFactory, Initializable
+{
+ /**
+ * @plexus.requirement role="org.apache.maven.continuum.xmlrpc.ContinuumXmlRpcComponent"
+ */
+ private Map xmlrpcComponents;
+
+ /**
+ * @plexus.requirement
+ */
+ private Listener listener;
+
+ private Map componentsMapping = new HashMap();
+
+ public void initialize()
+ throws InitializationException
+ {
+ for ( Iterator i = xmlrpcComponents.keySet().iterator(); i.hasNext(); )
+ {
+ String key = (String) i.next();
+ String className = xmlrpcComponents.get( key ).getClass().getName();
+ componentsMapping.put( className, key );
+ }
+ }
+
+ public RequestProcessorFactory getRequestProcessorFactory( final Class cls )
+ throws XmlRpcException
+ {
+ return new RequestProcessorFactory()
+ {
+ public Object getRequestProcessor( XmlRpcRequest request )
+ throws XmlRpcException
+ {
+ Object obj = ConfiguredBeanProcessorFactory.this.getRequestProcessor( cls );
+
+ if ( obj instanceof ContinuumXmlRpcComponent )
+ {
+ ContinuumXmlRpcConfig config = (ContinuumXmlRpcConfig) request.getConfig();
+ ( (ContinuumXmlRpcComponent) obj ).setConfig( config );
+ }
+ return obj;
+ }
+ };
+ }
+
+ protected Object getRequestProcessor( Class cls )
+ throws XmlRpcException
+ {
+ listener.getLogger().debug( "Load '" + cls.getName() + "' handler." );
+
+ Object o = getComponent( cls );
+
+ if ( o == null )
+ {
+ throw new XmlRpcException( "Handler bean not found for: " + cls );
+ }
+
+ return o;
+ }
+
+ private String getComponentKey( Class cls )
+ {
+ return (String) componentsMapping.get( cls.getName() );
+ }
+
+ private Object getComponent( Class cls )
+ {
+ return xmlrpcComponents.get( getComponentKey( cls ) );
+ }
+}
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ConfiguredBeanProcessorFactory.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"