You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/05/24 01:14:17 UTC

cvs commit: maven-new/server/src/java/org/apache/maven/server Server.java DefaultServer.java XMLThing.java

bwalding    2003/05/23 16:14:17

  Modified:    server/src/java/org/apache/maven/server Server.java
                        DefaultServer.java XMLThing.java
  Log:
  
  
  Revision  Changes    Path
  1.5       +56 -6     maven-new/server/src/java/org/apache/maven/server/Server.java
  
  Index: Server.java
  ===================================================================
  RCS file: /home/cvs/maven-new/server/src/java/org/apache/maven/server/Server.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Server.java	28 Apr 2003 08:30:46 -0000	1.4
  +++ Server.java	23 May 2003 23:14:17 -0000	1.5
  @@ -1,10 +1,60 @@
  -/*
  - * Created on 28/04/2003
  +package org.apache.maven.server;
  +
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2003 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 acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
    *
  - * To change this generated comment go to 
  - * Window>Preferences>Java>Code Generation>Code Template
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Maven" 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",
  + *    "Apache Maven", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * 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/>.
  + *
  + * ====================================================================
    */
  -package org.apache.maven.server;
   
   /**
    * @author <a href="bwalding@jakarta.org">Ben Walding</a>
  
  
  
  1.3       +56 -7     maven-new/server/src/java/org/apache/maven/server/DefaultServer.java
  
  Index: DefaultServer.java
  ===================================================================
  RCS file: /home/cvs/maven-new/server/src/java/org/apache/maven/server/DefaultServer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultServer.java	28 Apr 2003 10:28:32 -0000	1.2
  +++ DefaultServer.java	23 May 2003 23:14:17 -0000	1.3
  @@ -1,11 +1,60 @@
  -/*
  - * Created on 27/04/2003
  - *
  - * To change this generated comment go to 
  - * Window>Preferences>Java>Code Generation>Code Template
  - */
   package org.apache.maven.server;
   
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2003 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 acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Maven" 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",
  + *    "Apache Maven", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * 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 org.apache.xmlrpc.WebServer;
   
  
  
  
  1.8       +66 -15    maven-new/server/src/java/org/apache/maven/server/XMLThing.java
  
  Index: XMLThing.java
  ===================================================================
  RCS file: /home/cvs/maven-new/server/src/java/org/apache/maven/server/XMLThing.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMLThing.java	4 May 2003 16:38:19 -0000	1.7
  +++ XMLThing.java	23 May 2003 23:14:17 -0000	1.8
  @@ -1,10 +1,60 @@
  -/*
  - * Created on 27/04/2003
  +package org.apache.maven.server;
  +
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2003 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 acknowledgment:
  + *       "This product includes software developed by the
  + *        Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself,
  + *    if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *    "Apache Maven" 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.
    *
  - * To change this generated comment go to 
  - * Window>Preferences>Java>Code Generation>Code Template
  + * 5. Products derived from this software may not be called "Apache",
  + *    "Apache Maven", nor may "Apache" appear in their name, without
  + *    prior written permission of the Apache Software Foundation.
  + *
  + * 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/>.
  + *
  + * ====================================================================
    */
  -package org.apache.maven.server;
   
   import java.io.File;
   import java.io.InputStream;
  @@ -38,21 +88,21 @@
           System.out.println("Authentication Required: " + user + "," + password);
   
       }
  -    /* (non-Javadoc)
  -     * @see org.apache.xmlrpc.AuthenticatedXmlRpcHandler#execute(java.lang.String, java.util.Vector, java.lang.String, java.lang.String)
  -     */
  -    public Object execute(String method, Vector params, String user, String password) throws Exception
  +
  +    //inherit javadoc
  +    public Object execute(String method, Vector params, String theUser, String thePassword) throws Exception
       {
  -        System.out.println("execute(" + method + "," + params + "," + user + "," + password);
  -        if (!this.user.equals(user))
  +        System.out.println("execute(" + method + "," + params + "," + theUser + "," + thePassword);
  +        if (!this.user.equals(theUser))
           {
               return "401";
           }
   
  -        if (!this.password.equals(password)) {
  +        if (!this.password.equals(thePassword))
  +        {
               return "401";
           }
  -        
  +
           System.out.println("Authentication successful");
   
           if ("server.attainGoals".equals(method))
  @@ -88,7 +138,8 @@
               result.append("Available [Plugins] / Goals\n");
               result.append("```````````````````````````\n");
               result.append("\n");
  -            for (Iterator i=maven.listGoals().iterator(); i.hasNext();)
  +            //FIXME check whether maven.getProject().getGoalNames() was an appropriate replacement for maven.listGoals()
  +            for (Iterator i=maven.getProject().getGoalNames().iterator(); i.hasNext();)
               {
                   PluginGoal goal = (PluginGoal) i.next();
                   result.append(goal.getName() + " " + goal.getDescription() + "\n");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org