You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by se...@apache.org on 2002/08/27 18:04:56 UTC

cvs commit: xml-axis/java/tools test.xml build.xml

seibert     2002/08/27 09:04:55

  Added:       java/tools/org/apache/axis/tools/ant/axis
                        RunAxisFunctionalTestsTask.java
               java/tools/org/apache/axis/tools/ant/wsdl
                        Java2WsdlAntTask.java Wsdl2javaAntTask.java
               java/tools/org/apache/axis/tools/ant/foreach
                        ForeachTask.java js.jar bsf.jar
               java/tools test.xml build.xml
  Log:
  A new tools structure, which gets my foreach stuff out of test/ for starters.
  I have also "seeded" the tree with the RunAxisFunctioanlTestTask and
  wsdl2java and java2wsdl tasks, which are copies from the current test/ src
  tree, and are "marked" up for the new proposed package name
  
  org.apache.axis.tools.ant.<name>
  
  I have also included a tools/build.xml file which compiles these tasks, and
  created ${build.lib}/axis-ant.jar.  The tools/test.xml file attempts to load
  up these tasks, which checks that they are compiled and on the classpath.  It
  could become smarter to try to exec them in the future.
  
  This will replace my buildPreTestTaskdefs.xml file, so I will be cleaning that up
  later.
  
  So far, only my new buildTest and buildSamples stuff will be using this...
  
  Revision  Changes    Path
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/axis/RunAxisFunctionalTestsTask.java
  
  Index: RunAxisFunctionalTestsTask.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 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", "Ant", 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/>.
   */
  package org.apache.axis.tools.ant.axis;
  
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.Task;
  import org.apache.tools.ant.taskdefs.CallTarget;
  
  import java.io.BufferedInputStream;
  import java.io.IOException;
  import java.net.HttpURLConnection;
  import java.net.MalformedURLException;
  import java.net.Socket;
  import java.net.URL;
  
  /**
   * Ant task for starting / stopping servers and running junit in the middle.
   * Based on the Cactus org.apache.commons.cactus.ant package, heavily munged
   * and cruftily dumped into one file.
   *
   * @author Rob Jellinghaus (robj@unrealities.com)
   */
  public class RunAxisFunctionalTestsTask extends Task
  {
      private String startTarget1;
      private String startTarget2;
      private String testTarget;
      private String stopTarget;
      private URL url;
      
      /**
       * Executes the task.
       */
      public void execute() throws BuildException
      {
          try {
              callStart(startTarget1);
              callStart(startTarget2);
              callTests();
          } finally {
              // Make sure we stop the server
              callStop();
          }
      }
      
      /**
       * Call the start server task
       */
      private void callStart(String startTarget)
      {
          new Thread(new TaskRunnable(startTarget)).start();
          // try a ping
          while (true) {
              try {
                  Thread.currentThread().sleep(500);
              } catch (InterruptedException ex) {
              }
              try {
                  sendOnSocket("ping\r\n");
                  // if no exception, return
                  System.out.println("RunAxisFunctionalTestsTask.callStart successfully pinged server.");
                  return;
              } catch (Exception ex) {
                  // loop & try again
              }
          }
          
          // NOTREACHED since the while loop returns if it successfully pings
      }
      
      /**
       * Call the run tests target
       */
      private void callTests()
      {
          antcall(testTarget);
      }
      
      /**
       * Call the stop server task
       */
      private void callStop()
      {
          try {
              // first, stop the tcp server
              sendOnSocket("quit\r\n");
              
              // second, and more involvedly, stop the http server
              // Try connecting in case the server is already stopped.
              URL url = new URL("http://localhost:8080/");
              try {
                  HttpURLConnection connection = (HttpURLConnection)url.openConnection();
                  connection.connect();
                  this.readFully(connection);
                  connection.disconnect();
              } catch (IOException e) {
                  // Server is not running. Make this task a no-op.
                  System.out.println("Error from HTTP read: " + e);
                  return;
              }
              
              // Call the target that stops the server
              antcall(stopTarget);
              
              // Wait a few ms more (just to make sure)
              try {
                  Thread.sleep(500);
              } catch (InterruptedException e) {
                  throw new BuildException("Interruption during sleep", e);
              }
              
              /*
               // Continuously try calling the test URL until it fails
              while (true) {
  System.out.println("Trying localhost:8080...");
                  try {
                      HttpURLConnection connection = (HttpURLConnection)url.openConnection();
                      connection.connect();
                      this.readFully(connection);
                      connection.disconnect();
                  } catch (IOException e) {
                      break;
                  }
                  
                  try {
                      Thread.sleep(500);
                  } catch (InterruptedException ee) {
                      throw new BuildException("Interruption during sleep", ee);
                  }
                  
              }
              
              // Wait a few ms more (just to be sure !)
              try {
                  Thread.sleep(500);
              } catch (InterruptedException e) {
                  throw new BuildException("Interruption during sleep", e);
              }
               */
              System.out.println("RunAxisFunctionalTestsTask.callStop successfully sent quit message.");
          } catch (Exception ex) {
              // ignore; if socket not there, presume dead already
          }
      }
      
      
      /**
       * Call the selected ant task.
       */
      private void antcall (String taskName) {
          CallTarget callee;
          callee = (CallTarget)project.createTask("antcall");
          callee.setOwningTarget(target);
          callee.setTaskName(getTaskName());
          callee.setLocation(location);
          callee.init();
          callee.setTarget(taskName);
          callee.execute();
      }
      
      /**
       * Make a socket to the url, and send the given string
       */
      private void sendOnSocket (String str) throws Exception {
          Socket sock = null;
          try {
              sock = new Socket(url.getHost(), url.getPort());
              sock.getOutputStream().write(new String(str).getBytes());
              // get a single byte response
              int i = sock.getInputStream().read();
          } catch (Exception ex) {
              throw ex;
          }/* finally {
              if (sock != null) {
                  try {
                      sock.close();
                  } catch (IOException ex) {
                      // ignore
                  }
              }
           }*/
      }
      
      
      /**
       * Read all the contents that are to be read
       */
      static void readFully(HttpURLConnection connection) throws IOException
      {
          // finish reading it to prevent (harmless) server-side exceptions
          BufferedInputStream is = new BufferedInputStream(connection.getInputStream());
          byte[] buffer = new byte[256];
          while((is.read(buffer)) > 0) {}
          is.close();
      }
  
      /**
       * Sets the target to call to start server 1.
       *
       * @param theStartTarget the Ant target to call
       */
      public void setStartTarget1(String theStartTarget)
      {
          startTarget1 = theStartTarget;
      }
      
      /**
       * Sets the target to call to start server 2.
       *
       * @param theStartTarget the Ant target to call
       */
      public void setStartTarget2(String theStartTarget)
      {
          startTarget2 = theStartTarget;
      }
      
      /**
       * Sets the target to call to run the tests.
       *
       * @param theTerstTarget the Ant target to call
       */
      public void setTestTarget(String theTestTarget)
      {
          testTarget = theTestTarget;
      }
      
      /**
       * Sets the stop target.  This is the target which does
       * a HTTP admin shutdown on the simple server.
       */
      public void setStopTarget (String theStopTarget)
      {
          stopTarget = theStopTarget;
      }
      
      /**
       * Sets the target URL (just http://host:port)
       */
      public void setUrl (String theUrl) {
          try {
              url = new URL(theUrl);
          } catch (MalformedURLException ex) {
              System.err.println("Can't make URL from "+theUrl);
          }
      }
      
      
      /**
       * Helper class to execute a task in a thread.
       */
      public class TaskRunnable implements Runnable
      {
          String taskName;
          public TaskRunnable (String taskName) {
              this.taskName = taskName;
          }
          public void run () {
              antcall(taskName);
          }
      }
  }
  
  
  
  
  
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/wsdl/Java2WsdlAntTask.java
  
  Index: Java2WsdlAntTask.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 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", "Ant", 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/>.
   */
  package org.apache.axis.tools.ant.wsdl;
  
  import org.apache.axis.wsdl.fromJava.Emitter;
  
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  import org.apache.axis.encoding.DefaultTypeMappingImpl;
  import org.apache.axis.encoding.DefaultSOAP12TypeMappingImpl;
  
  import java.util.HashMap;
  import java.io.StringWriter;
  import java.io.PrintWriter;
  
  /**
   * Simple Ant task for running Java2Wsdl utility. 
   *
   * @author Rich Scheuerle (scheu@us.ibm.com)
   */
  public class Java2WsdlAntTask extends Task
  {
      private String namespace = "";
      private String namespaceImpl = null;
      private HashMap namespaceMap = new HashMap();
      private String location = "";
      private String locationImport = null;
      private String output = "." ;
      private String input = null ;
      private String outputImpl = null;
      private String className = "." ;
      private String servicePortName = null ;
      private String portTypeName = null ;
      private String bindingName = null ;
      private String implClass = null;
      private boolean useInheritedMethods = false;
      private String exclude = null;
      private String stopClasses = null;
      private String tm = "1.1";
      private String style = null;
  
      // The method executing the task
      public void execute() throws BuildException {
          try {
              log("Running Java2WsdlAntTask with parameters:", Project.MSG_VERBOSE);
              log("\tnamespace:" + namespace, Project.MSG_VERBOSE);
              log("\tPkgtoNS:" + namespaceMap, Project.MSG_VERBOSE);
              log("\tlocation:" + location, Project.MSG_VERBOSE);
              log("\toutput:" + output, Project.MSG_VERBOSE);
              log("\tinput:" + input, Project.MSG_VERBOSE);
              log("\tclassName:" + className, Project.MSG_VERBOSE);
              log("\tservicePortName:" + servicePortName, Project.MSG_VERBOSE);
              log("\tportTypeName:" + portTypeName, Project.MSG_VERBOSE);
              log("\tbindingName:" + bindingName, Project.MSG_VERBOSE);
              log("\timplClass:" + implClass, Project.MSG_VERBOSE);
              log("\tinheritance:" + useInheritedMethods, Project.MSG_VERBOSE);
              log("\texcluded:" + exclude, Project.MSG_VERBOSE);
              log("\tstopClasses:" + stopClasses, Project.MSG_VERBOSE);
              log("\ttypeMappingVersion:" + tm, Project.MSG_VERBOSE);
              log("\tstyle:" + style, Project.MSG_VERBOSE);
              log("\toutputImpl:" + outputImpl, Project.MSG_VERBOSE);
              log("\tnamespaceImpl:" + namespaceImpl, Project.MSG_VERBOSE);
              log("\tlocationImport:" + locationImport, Project.MSG_VERBOSE);
              
              // Instantiate the emitter
              Emitter emitter = new Emitter();
  
              if (!namespaceMap.isEmpty()) {
                  emitter.setNamespaceMap(namespaceMap);
              }
              if (servicePortName != null) {
                  emitter.setServicePortName(servicePortName);
              }
              if (portTypeName != null) {
                  emitter.setPortTypeName(portTypeName);
              }
              if (bindingName != null) {
                  emitter.setBindingName(bindingName);
              }
              log("Java2WSDL " + className, Project.MSG_INFO);
              emitter.setCls(className);
              if (implClass != null) {
                  emitter.setImplCls(implClass);
              }
              if (exclude != null) {
                  emitter.setDisallowedMethods(exclude);
              }
              if (stopClasses != null) {
                  emitter.setStopClasses(stopClasses);
              }
  
              if (tm.equals("1.1")) {
                  emitter.setDefaultTypeMapping(DefaultTypeMappingImpl.getSingleton());
              } else {
                  emitter.setDefaultTypeMapping(DefaultSOAP12TypeMappingImpl.create());
              }
              if (style != null) {
                  if (style.equalsIgnoreCase("DOCUMENT")) {
                      emitter.setMode(Emitter.MODE_DOCUMENT);
                  } else if (style.equalsIgnoreCase("RPC")) {
                      emitter.setMode(Emitter.MODE_RPC);
                  }
              }
              if (input != null) {
                  emitter.setInputWSDL(input);
              }
              emitter.setIntfNamespace(namespace);
              emitter.setImplNamespace(namespaceImpl);
              emitter.setLocationUrl(location);
              emitter.setImportUrl(locationImport);
              emitter.setUseInheritedMethods(useInheritedMethods);
              if (outputImpl == null) {
                  // Normal case
                  emitter.emit(output, Emitter.MODE_ALL);
              } else {
                  // Emit interface and implementation wsdls
                  emitter.emit(output, outputImpl);
              }
          } catch (Throwable t) {
              StringWriter writer = new StringWriter();
              t.printStackTrace(new PrintWriter(writer));
              log(writer.getBuffer().toString(), Project.MSG_ERR);
              throw new BuildException("Error while running " + getClass().getName(), t);
          }
      }
  
      // The setter for the "output" attribute
      public void setOutput(String parameter) {
          this.output = parameter;
      }
  
      // The setter for the "input" attribute
      public void setInput(String parameter) {
          this.input = parameter;
      }
  
      // The setter for the "outputImpl" attribute
      public void setOutputImpl(String parameter) {
          this.outputImpl = parameter;
      }
  
      // The setter for the "location" attribute
      public void setLocation(String parameter) {
          this.location = parameter;
      }
  
      // The setter for the "locationImport" attribute
      public void setLocationImport(String parameter) {
          this.locationImport = parameter;
      }
  
      // The setter for the "className" attribute
      public void setClassName(String parameter) {
          this.className = parameter;
      }
  
      // The setter for the "implClass" attribute
      public void setImplClass(String parameter) {
          this.implClass = parameter;
      }
  
      // The setter for the "servicePortName" attribute
      public void setServicePortName(String parameter) {
          this.servicePortName = parameter;
      }
  
      // The setter for the "portTypeName" attribute
      public void setPortTypeName(String parameter) {
          this.portTypeName = parameter;
      }
  
      // The setter for the "bindingName" attribute
      public void setBindingName(String parameter) {
          this.bindingName = parameter;
      }
  
      // The setter for the "namespace" attribute
      public void setNamespace(String parameter) {
          this.namespace = parameter;
      }
  
      // The setter for the "namespaceImpl" attribute
      public void setNamespaceImpl(String parameter) {
          this.namespaceImpl = parameter;
      }
  
      // The setter for the "useInheritedMethods" attribute
      public void setUseInheritedMethods(boolean parameter) {
          this.useInheritedMethods = parameter;
      }
  
      // The setter for the "exclude" attribute
      public void setExclude(String exclude) {
          this.exclude = exclude;
      }
  
      // The setter for the "stopClasses" attribute
      public void setStopClasses(String stopClasses) {
          this.stopClasses = stopClasses;
      }
  
      // The setter for the "style" attribute
      public void setStyle(String style) {
          this.style = style;
      }
  
      /** the command arguments */
      public Mapping createMapping() {
          Mapping pkg = new Mapping();
          return pkg;
      }
  
      // The setter for the "typeMappingVersion" attribute
      public void setTypeMappingVersion(String parameter) {
          this.tm = parameter;
      } 
  
      /**
       * Used for nested package definitions.
       */
      public class Mapping {
          private String namespace = null;
          private String packageName = null;
  
          public void setNamespace(String value) {
              namespace = value;
              if(namespace != null && packageName != null) {
                  namespaceMap.put(packageName,namespace);
                  namespace = null; 
                  packageName = null;
              }
          }
  
          public void setPackage(String value) {
              packageName = value;
              if(namespace != null && packageName != null) {
                  namespaceMap.put(packageName,namespace);
                  namespace = null;
                  packageName = null;
              }
          }
      }
  }
  
  
  
  
  
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/wsdl/Wsdl2javaAntTask.java
  
  Index: Wsdl2javaAntTask.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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", "Ant", 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/>.
   */
  package org.apache.axis.tools.ant.wsdl;
  
  import org.apache.axis.enum.Scope;
  import org.apache.axis.utils.DefaultAuthenticator;
  import org.apache.axis.wsdl.toJava.Emitter;
  
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  
  import java.io.File;
  import java.io.IOException;
  import java.net.Authenticator;
  import java.util.HashMap;
  
  /**
   * Ant task for running Wsdl2java utility. It is still not ready for
   * end users, though that is the final intent.
   * This task does no dependency checking; files are generated whether they
   * need to be or not. 
   * As well as the nested parameters, this task uses  the file 
   * <tt>NStoPkg.properties</tt> in the project base directory
   * for namespace mapping
   * @ant.task category="xml"
   * @author steve loughran
   * @author Davanum Srinivas (dims@yahoo.com)
   */
  public class Wsdl2javaAntTask extends Task
  {
      private boolean verbose = false;
      private boolean server = false;
      private boolean skeletonDeploy = false;
      private boolean testCase = false;
      private boolean noImports = false;
      private boolean all = false;
      private boolean helperGen = false;
      private String factory = null;
      private HashMap namespaceMap = new HashMap();
      private String output = "." ;
      private String deployScope = "";
      private String url = "";
      private String tm = "1.1";
      private long timeout = 45000;
      
      /**
       * do we print a stack trace when something goes wrong?
       */
      private boolean printStackTraceOnFailure=false;
      /**
       * what action to take when there was a failure and the source was some
       * URL
       */
      private boolean failOnNetworkErrors=false;    
  
      /**
       * validation code
       * @throws  BuildException  if validation failed
       */ 
      protected void validate() 
              throws BuildException {
          if(url==null || url.length()==0) {
              throw new BuildException("No url specified");
          }
          if(timeout<-1) {
              throw new BuildException("negative timeout supplied");
          }
          File outdir=new File(output);
          if(!outdir.isDirectory() || !outdir.exists()) {
              throw new BuildException("output directory is not valid");
          }
              
      }
      
      /**
       * trace out parameters
       * @param level to log at
       * @see org.apache.tools.ant.Project#log
       */
      public void traceParams(int logLevel) {
          log("Running Wsdl2javaAntTask with parameters:", logLevel);
          log("\tverbose:" + verbose, logLevel);
          log("\tserver-side:" + server, logLevel);
          log("\tskeletonDeploy:" + skeletonDeploy, logLevel);
          log("\thelperGen:" + helperGen, logLevel);
          log("\tfactory:" + factory, logLevel);
          log("\ttestCase:" + testCase, logLevel);
          log("\tnoImports:" + noImports, logLevel);
          log("\tNStoPkg:" + namespaceMap, logLevel);
          log("\toutput:" + output, logLevel);
          log("\tdeployScope:" + deployScope, logLevel);
          log("\tURL:" + url, logLevel);
          log("\tall:" + all, logLevel);
          log("\ttypeMappingVersion:" + tm, logLevel);
          log("\ttimeout:" + timeout, logLevel);
          log("\tfailOnNetworkErrors:" + failOnNetworkErrors, logLevel);
          log("\tprintStackTraceOnFailure:" + printStackTraceOnFailure, logLevel);
      }    
  
      /**
       * The method executing the task
       * @throws  BuildException  if validation or execution failed
       */ 
      public void execute() throws BuildException {
          traceParams(Project.MSG_VERBOSE);
          validate();
          try {
              // Instantiate the emitter
              Emitter emitter = new Emitter();
  
              Scope scope = Scope.getScope(deployScope, null);
              if (scope != null) {
                  emitter.setScope(scope);
              } else if ("none".equalsIgnoreCase(deployScope)) {
                  /* leave default (null, or not-explicit) */;
              } else {
                  log("Unrecognized scope:  " + deployScope + ".  Ignoring it.", Project.MSG_VERBOSE);
              }
              
              if (!namespaceMap.isEmpty()) {
                  emitter.setNamespaceMap(namespaceMap);
              }
              emitter.setTestCaseWanted(testCase);
              emitter.setHelperWanted(helperGen);    
              if (factory != null) {
                  emitter.setFactory(factory);
              }   
              emitter.setImports(!noImports);
              emitter.setAllWanted(all);
              emitter.setOutputDir(output);
              emitter.setServerSide(server);
              emitter.setSkeletonWanted(skeletonDeploy);
              emitter.setVerbose(verbose);
              emitter.setTypeMappingVersion(tm);
              //TODO: extract this and make it an attribute
              emitter.setNStoPkg(project.resolveFile("NStoPkg.properties"));
              emitter.setTimeout(timeout);
  
              Authenticator.setDefault(new DefaultAuthenticator(null,null));
  
              log("WSDL2Java " + url, Project.MSG_INFO);
              try {
                  emitter.run(url);
              } catch (Throwable e) {
                  if (url.startsWith("http://")) {
                      // What we have is either a network error or invalid XML -
                      // the latter most likely an HTML error page.  This makes
                      // it impossible to continue with the test, so we stop here
                      if(!failOnNetworkErrors) {
                          // test mode, issue a warning, and return without
                          //reporting a fatal error.
                          log(e.toString(), Project.MSG_WARN);
                          return;
                      } else {
                          //in 'consumer' mode, bail out with the URL
                          throw new BuildException("Could not build "+url,e);
                      }
                  } else {
                      throw e;
                  }
              }
          } catch (BuildException b) {
              throw b;
          } catch (Throwable t) {
              if(printStackTraceOnFailure) {
                  traceParams(Project.MSG_INFO);
                  t.printStackTrace();
              }
              throw new BuildException("Error while generating WSDL for "+url,t); 
          }
  
      }
  
      /**
       *  flag for verbose output; default=false
       *
       *@param  verbose  The new verbose value
       */   
      public void setVerbose(boolean verbose) {
          this.verbose = verbose;
      }
  
      /**
       *  emit server-side bindings for web service; default=false
       */
      public void setServerSide(boolean parameter) {
          this.server = parameter;
      }
  
      /**
       * deploy skeleton (true) or implementation (false) in deploy.wsdd. 
       * Default is false.  Assumes server-side="true".     
       */
      public void setSkeletonDeploy(boolean parameter) {
          this.skeletonDeploy = parameter;
      }
  
      /**
       * flag for automatic Junit testcase generation
       * default is false
       */
      public void setTestCase(boolean parameter) {
          this.testCase = parameter;
      }
  
      /**
       * Turn on/off Helper class generation;
       * default is false
       */
      public void setHelperGen(boolean parameter) {
          this.helperGen = parameter;
      }
  
      /**
       * name of the Java2WSDLFactory class for 
       * extending WSDL generation functions
       */
      public void setFactory(String parameter) {
          this.factory = parameter;
      }
  
      /**
       * only generate code for the immediate WSDL document,
       * and not imports; default=false;
       */
      public void setNoImports(boolean parameter) {
          this.noImports = parameter;
      }
  
      /**
       * output directory for emitted files 
       */
      public void setOutput(File parameter) throws BuildException {
          try {
              this.output = parameter.getCanonicalPath();
          } catch (IOException ioe) {
              throw new BuildException(ioe);
          }
      }
  
      /**
       * add scope to deploy.xml: "Application", "Request", "Session" 
       * optional; 
       */
      public void setDeployScope(String parameter) {
          this.deployScope = parameter;
      }
      
      /**
       * url to fetch and generate WSDL for. Can be remote or a local file.
       * required.
       */
      public void setURL(String parameter) {
          this.url = parameter;
      }
  
      /**
       * flag to generate code for all elements, even unreferenced ones
       * default=false;
       */
      public void setAll(boolean parameter) {
          this.all = parameter;
      }
  
      /**
       * set the type mapping version. default is "1.2"
       */
      public void setTypeMappingVersion(String parameter) {
          this.tm = parameter;
      }
  
      /**
       * timeout in seconds for URL retrieval; default is 45 seconds.
       * Set this to -1 to disable timeouts altogether: other negative values
       * are not allowed)
       * TODO: normally format conversions are failures, but because this method
       * ignored such errors, we have to keep going. Maybe it could be escalated to 
       * a failure in end-user versions.
       */
      public void setTimeout(String parameter) {
          try {
              this.timeout = new Long(parameter).longValue();
          } catch (NumberFormatException e) {
              // Sorry, stick with default.
              log("Could not convert "+parameter+" to a number", Project.MSG_WARN);
          }
      }
  
      /** the command arguments */
      public Mapping createMapping() {
          Mapping pkg = new Mapping();
          return pkg;
      }
  
      /**
       * Used for nested package definitions.
       */
      public class Mapping {
          private String namespace;
          private String packageName;
  
          /**
           * namespace to map to a package
           */        
          public void setNamespace(String value) {
              namespace = value;
              if(namespace != null && packageName != null)
                  namespaceMap.put(namespace, packageName);
          }
          
          /**
           * java package to generate for the namespace's classes
           */
          public void setPackage(String value) {
              packageName = value;
              if(namespace != null && packageName != null)
                  namespaceMap.put(namespace, packageName);
          }
      }
  
  }
  
  
  
  
  
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/foreach/ForeachTask.java
  
  Index: ForeachTask.java
  ===================================================================
  /*
  * The Apache Software License, Version 1.1
  *
  * Copyright (c) 1999 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", "Ant", 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/>.
  */
  package org.apache.axis.tools.ant.foreach;
  
  import java.io.File;
  import java.util.Enumeration;
  import java.util.Hashtable;
  import java.util.Vector;
  import org.apache.tools.ant.BuildException;
  import org.apache.tools.ant.DirectoryScanner;
  import org.apache.tools.ant.Project;
  import org.apache.tools.ant.Task;
  import org.apache.tools.ant.taskdefs.CallTarget;
  import org.apache.tools.ant.taskdefs.Property;
  import org.apache.tools.ant.types.EnumeratedAttribute;
  import org.apache.tools.ant.types.FileSet;
  /**
   * Call a target foreach entry in a set of parameters based on a fileset.
   *  <pre>
   *    <target name="target1">
   *      <foreach target="target2">
   *        <param name="param1">
   *            <fileset refid="fset1"/>
   *        </param>
   *        <param name="param2">
   *          <item value="jar" />
   *          <item value="zip" />
   *        </param>
   *       </foreach>
   *    </target>
   *
   *    <target name="target2">
   *      <echo message="prop is ${param1}.${param2}" />
   *    </target>
   * </pre>
   * <br>
   * Really this just a wrapper around "AntCall"
   * <br>
   * Added a "type" attribute that works precisely like its equivalent
   * in <code>ExecuteOn</code>.  It allows the user
   * to specify whether directories, files, or both directories and files
   * from the filesets are included as entries in the parameter set.
   * @author <a href="mailto:tpv@spamcop.net">Tim Vernum</a>
   */
  public class ForeachTask extends Task {
  	/** Defaults to "file". */
      protected String type = "file";
      private String subTarget;
      private Vector params;
      private Hashtable properties;
      /**
       * Enumerated attribute with the values "file", "dir" and "both"
       * for the type attribute.
       */
      public static class FileDirBoth extends EnumeratedAttribute {
          public String[] getValues() {
              return new String[] {
                  "file", "dir", "both"
              };
          }
      }
      /**
       * Inner class stores <item>s with <param> lists
       */
      public class ParamItem {
          private String value;
          public void setValue(String value) {
              this.value = value;
          }
          public String getValue() {
              return this.value;
          }
      }
      /**
       * Inner class stores sets of <param>s.
       * It can hold <fileset>s or <item>s or both.
       */
      public class ParamSet {
          private Vector filesets;
          private Vector items;
          private String name;
          public ParamSet() {
              filesets = new Vector();
              items = new Vector();
          }
          public void addFileset(FileSet fileset) {
              filesets.addElement(fileset);
          }
          public ParamItem createItem() {
              ParamItem item = new ParamItem();
              items.addElement(item);
              return item;
          }
          public void setName(String name) {
              this.name = name;
          }
          public String getName() {
              return name;
          }
          public Enumeration getValues(Project project) {
              /* As an arbitrary rule, this will return filesets first,
              and then <item>s. The ordering of the buildfile is
              not guaranteed. */
              Vector values = new Vector();
              Enumeration enum = filesets.elements();
              while (enum.hasMoreElements()) {
                  FileSet fileSet          = (FileSet)enum.nextElement();
                  File base                = fileSet.getDir(project);
                  DirectoryScanner scanner = fileSet.getDirectoryScanner(project);
                  if (! "dir".equals(type)) {
                      String[] files = getFiles(base, scanner);
                      for (int j = 0; j < files.length; j++) {
                          values.addElement(files[j]);
                      }
                  }
                  if (! "file".equals(type)) {
                      String[] dirs = getDirs(base, scanner);
                      for (int j = 0; j < dirs.length; j++) {
                          values.addElement(dirs[j]);
                      }
                  }
              }
              enum = items.elements();
              while (enum.hasMoreElements()) {
                  ParamItem item = (ParamItem)enum.nextElement();
                  values.addElement(item.getValue());
              }
              return values.elements();
          }
      }
      public ForeachTask() {
          params = new Vector();
          properties = new Hashtable();
      }
      public void init() {
      }
      private void buildProperty(String propName, String propValue) {
          properties.put(propName, propValue);
      }
      private void executeTarget() {
          /* The "callee" has to be created each time in order to make
          the properties mutable. */
          CallTarget callee;
          callee = (CallTarget)project.createTask("antcall");
          callee.init();
          callee.setTarget(subTarget);
          Enumeration keys = properties.keys();
          while (keys.hasMoreElements()) {
              String key = (String)keys.nextElement();
              String val = (String)properties.get(key);
              Property prop = callee.createParam();
              prop.setName(key);
              prop.setValue(val);
          }
          callee.execute();
      }
      /**
       * This method is used to recursively iterate through
       * each parameter set.
       * It ends up being something like:
       * <pre>
        *    for( i=0; i< params[0].size ; i++ )
        *       for( j=0; j < params[1].size ; j++ )
        *          for( k=0; k < params[2].size ; k++ )
        *             executeTarget( params[0][i], params[1][j] , params[2][k] ) ;
        * </pre>
       */
      private void executeParameters(int paramNumber) {
          if (paramNumber == params.size()) {
              executeTarget();
          } else {
              ParamSet paramSet = (ParamSet)params.elementAt(paramNumber);
              Enumeration values = paramSet.getValues(project);
              while (values.hasMoreElements()) {
                  String val = (String)values.nextElement();
                  buildProperty(paramSet.getName(), val);
                  executeParameters(paramNumber + 1);
              }
          }
      }
      public void execute() {
          if (subTarget == null) {
              throw new BuildException("Attribute target is required.", location);
          }
          executeParameters(0);
      }
      public ParamSet createParam() {
          ParamSet param = new ParamSet();
          params.addElement(param);
          return param;
      }
      public void setTarget(String target) {
          subTarget = target;
      }
      /**
       * Return the list of files from this DirectoryScanner that should
       * be included on the command line.
       */
      protected String[] getFiles(File basedir, DirectoryScanner ds) {
          return ds.getIncludedFiles();
      }
      /**
       * Return the list of Directories from this DirectoryScanner that
       * should be included on the command line.
       */
      protected String[] getDirs(File basedir, DirectoryScanner ds) {
          return ds.getIncludedDirectories();
      }
      /**
       * Shall the command work only on files, directories or both?
       */
      public void setType(FileDirBoth type) {
          this.type = type.getValue();
      }
  }
  
  
  
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/foreach/js.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-axis/java/tools/org/apache/axis/tools/ant/foreach/bsf.jar
  
  	<<Binary file>>
  
  
  1.1                  xml-axis/java/tools/test.xml
  
  Index: test.xml
  ===================================================================
  <?xml version="1.0" ?>
  <!DOCTYPE project [
          <!ENTITY properties SYSTEM "file:../xmls/properties.xml">
          <!ENTITY paths  SYSTEM "file:../xmls/path_refs.xml">
          <!ENTITY taskdefs SYSTEM "file:../xmls/taskdefs.xml">
          <!ENTITY taskdefs_post_compile SYSTEM "file:../xmls/taskdefs_post_compile.xml">
          <!ENTITY targets SYSTEM "file:../xmls/targets.xml">
  ]>
  
  <!-- ===================================================================
  <description>
     Test/Sample Component file for Axis
  
  Notes:
     This is a build file for use with the Jakarta Ant build tool.
  
  Prerequisites:
  
     jakarta-ant from http://jakarta.apache.org
  
  Build Instructions:
     To compile
          ant compile
     To execute
          ant run
  
  Author:
    Matt Seibert mseibert@us.ibm.com
  
  Copyright:
    Copyright (c) 2002-2003 Apache Software Foundation.
  </description>
  ==================================================================== -->
  
  <project default="compile">
  
  <property name="axis.home" location=".." />
  <property name="componentName" value="tools/ant" />
          &properties;
          &paths;
          &taskdefs;
          &taskdefs_post_compile;
          &targets;
  
  
  <target name="clean"/>
  
  <target name="copy" depends="setenv,clean"/>
  
  <target name="compile" depends="copy">
    <echo message="Testing tools.ant"/>
  </target>
  
  <target name="run" />
  
  </project>
  
  
  
  1.1                  xml-axis/java/tools/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" ?>
  <!DOCTYPE project [
          <!ENTITY properties SYSTEM "file:../xmls/properties.xml">
          <!ENTITY paths  SYSTEM "file:../xmls/path_refs.xml">
          <!ENTITY taskdefs SYSTEM "file:../xmls/taskdefs.xml">
          <!ENTITY targets SYSTEM "file:../xmls/targets.xml">
  ]>
  
  <!-- ===================================================================
  <description>
     Tools Component file for Axis
  
  Notes:
     This is a build file for use with the Jakarta Ant build tool.
  
  Prerequisites:
  
     jakarta-ant from http://jakarta.apache.org
  
  Build Instructions:
     To compile
          ant compile
     To execute
          ant run
  
  Author:
    Matt Seibert mseibert@us.ibm.com
  
  Copyright:
    Copyright (c) 2002-2003 Apache Software Foundation.
  </description>
  ==================================================================== -->
  
  <project default="compile">
  
  <property name="axis.home" location=".." />
  <property name="componentName" value="org/apache/axis/tools/ant" />
          &properties;
          &paths;
          &taskdefs;
          &targets;
  
  <target name="clean">
      <echo message="Removing ${build.dir}/tools/${componentName}" />
      <delete dir="${build.dir}/tools/${componentName}" />
      <delete file="${build.lib}/axis-ant.jar"/>
  </target>
  
  <target name="copy" depends="setenv,clean">
     <mkdir dir="${build.dir}/tools"/>
  </target>
  
  <target name="compile" depends="copy">
    <echo message="Compiling tools.ant"/>
  
      <!-- build my ForEach task -->
      <echo message="Building ForEach" />
      <javac srcdir="${axis.home}/tools/${componentName}/foreach" destdir="${build.dir}/tools">
        <classpath refid="classpath"/>
        <include name="*.java" />
      </javac>
  
      <!-- build the RunAxisFunctionalTest task -->
      <echo message="Building RunAxisFunctionalTest" />
      <javac srcdir="${axis.home}/tools/${componentName}/axis" destdir="${build.dir}/tools">
        <classpath refid="classpath"/>
        <include name="*.java" />
      </javac>
  
      <!-- build the wsdl2java and java2wsdl tasks -->
      <echo message="wsdl2java and java2wsdl" />
      <javac srcdir="${axis.home}/tools/${componentName}/wsdl" destdir="${build.dir}/tools">
        <classpath>
          <pathelement location="${build.lib}/${name}.jar"/>
          <pathelement location="${build.lib}/${jaxrpc}.jar"/>
          <path refid="classpath"/>
        </classpath>
        <include name="*.java" />
      </javac>
  
    <copy todir="${build.dir}/${componentName}/foreach" >
       <fileset dir="${axis.home}/tools/${componentName}/foreach" excludes="**/*.java"/>
    </copy>
  
    <jar jarfile="${build.lib}/axis-ant.jar" basedir="${build.dir}/tools">
      <include name="${componentName}/**"/>
    </jar>
  </target>
  
  <target name="test" >
     <ant antfile="${axis.home}/tools/test.xml" /> 
  </target>
  
  </project>
  
  
  

Re: cvs commit: xml-axis/java/tools test.xml build.xml

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Matt Seibert" <ms...@us.ibm.com>
To: <ax...@xml.apache.org>
Sent: Tuesday, August 27, 2002 10:37 AM
Subject: Re: cvs commit: xml-axis/java/tools test.xml build.xml


>
> I guess I misunderstood you.  I assumed that you meant tools/<packagename>
> where the packagename contained "ant" for these first few.
>
> My idea was (in order to name them package approximate):
>
> tools/            (to set the stuff apart from src/, samples/, lib/,
test/)
>       org/apache/axis/tools/ant/axis      (this stuff)
>       org/apache/axis/tools/ant/xdoclet
>       org/apache/axis/tools/ant/taglib
> etc.etc.etc.

I see.

I'd assumed that each thing would be a sub project under tools so that they
can have their own build files, test stuff &c.


> I can re-organize this stuff however.....

ahh, that is one of the things that CVS really hates to do. And why
subversion will be so good.

Maybe we should leave it until there is pressing need.



Re: cvs commit: xml-axis/java/tools test.xml build.xml

Posted by Matt Seibert <ms...@us.ibm.com>.
I guess I misunderstood you.  I assumed that you meant tools/<packagename>
where the packagename contained "ant" for these first few.

My idea was (in order to name them package approximate):

tools/            (to set the stuff apart from src/, samples/, lib/, test/)
      org/apache/axis/tools/ant/axis      (this stuff)
      org/apache/axis/tools/ant/xdoclet
      org/apache/axis/tools/ant/taglib
etc.etc.etc.

I can re-organize this stuff however.....

Matt Seibert                                           mseibert@us.ibm.com
IBM        External:    (512) 838-3656      Internal:   678-3656


----- Original Message -----
From: <se...@apache.org>
To: <xm...@apache.org>
Sent: Tuesday, August 27, 2002 9:04 AM
Subject: cvs commit: xml-axis/java/tools test.xml build.xml


> seibert     2002/08/27 09:04:55
>
>   Added:       java/tools/org/apache/axis/tools/ant/axis
>                         RunAxisFunctionalTestsTask.java
>                java/tools/org/apache/axis/tools/ant/wsdl
>                         Java2WsdlAntTask.java Wsdl2javaAntTask.java
>                java/tools/org/apache/axis/tools/ant/foreach
>                         ForeachTask.java js.jar bsf.jar
>                java/tools test.xml build.xml
>   Log:
>   A new tools structure, which gets my foreach stuff out of test/ for
starters.
>   I have also "seeded" the tree with the RunAxisFunctioanlTestTask and
>   wsdl2java and java2wsdl tasks, which are copies from the current test/
src
>   tree, and are "marked" up for the new proposed package name
>
>   org.apache.axis.tools.ant.<name>
>
>   I have also included a tools/build.xml file which compiles these tasks,
and
>   created ${build.lib}/axis-ant.jar.  The tools/test.xml file attempts to
load
>   up these tasks, which checks that they are compiled and on the
classpath.  It
>   could become smarter to try to exec them in the future.
>
>   This will replace my buildPreTestTaskdefs.xml file, so I will be
cleaning that up
>   later.


I'd have preferred the ant stuff in a sub-project beneath ant  (tools/ant),
as that way when we add taglibs or xdoclet stuff they can go into
tools/taglib and tools/xdoclet.

nothing major.



Re: cvs commit: xml-axis/java/tools test.xml build.xml

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: <se...@apache.org>
To: <xm...@apache.org>
Sent: Tuesday, August 27, 2002 9:04 AM
Subject: cvs commit: xml-axis/java/tools test.xml build.xml


> seibert     2002/08/27 09:04:55
>
>   Added:       java/tools/org/apache/axis/tools/ant/axis
>                         RunAxisFunctionalTestsTask.java
>                java/tools/org/apache/axis/tools/ant/wsdl
>                         Java2WsdlAntTask.java Wsdl2javaAntTask.java
>                java/tools/org/apache/axis/tools/ant/foreach
>                         ForeachTask.java js.jar bsf.jar
>                java/tools test.xml build.xml
>   Log:
>   A new tools structure, which gets my foreach stuff out of test/ for
starters.
>   I have also "seeded" the tree with the RunAxisFunctioanlTestTask and
>   wsdl2java and java2wsdl tasks, which are copies from the current test/
src
>   tree, and are "marked" up for the new proposed package name
>
>   org.apache.axis.tools.ant.<name>
>
>   I have also included a tools/build.xml file which compiles these tasks,
and
>   created ${build.lib}/axis-ant.jar.  The tools/test.xml file attempts to
load
>   up these tasks, which checks that they are compiled and on the
classpath.  It
>   could become smarter to try to exec them in the future.
>
>   This will replace my buildPreTestTaskdefs.xml file, so I will be
cleaning that up
>   later.


I'd have preferred the ant stuff in a sub-project beneath ant  (tools/ant),
as that way when we add taglibs or xdoclet stuff they can go into
tools/taglib and tools/xdoclet.

nothing major.