stevel      02/04/11 14:46:05

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        WsdlToDotnet.java
  Log:
  task now working
  
  Revision  Changes    Path
  1.3       +18 -3     
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
  
  Index: WsdlToDotnet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WsdlToDotnet.java 11 Apr 2002 07:28:47 -0000      1.2
  +++ WsdlToDotnet.java 11 Apr 2002 21:46:05 -0000      1.3
  @@ -103,12 +103,12 @@
       /**
        *  flag to control action on execution trouble
        */
  -    private boolean failOnError;
  +    private boolean failOnError=true;
   
       /**
        *  any extra command options?
        */
  -    protected String extraOptions;
  +    protected String extraOptions=null;
       
       /**
        *
  @@ -159,6 +159,10 @@
           if(destFile==null) {
               throw new BuildException("destination file must be specified");
           }
  +        if(destFile.isDirectory() ) {
  +            throw new BuildException(
  +                "destination file is a directory");
  +        }        
           if(url!=null && srcFile!=null) {
               throw new BuildException(
                       "you can not specify both a source file and a URL");
  @@ -167,6 +171,17 @@
               throw new BuildException(
                       "you must specify either a source file or a URL");
           }
  +        if(srcFile!=null) {
  +            if(!srcFile.exists() ) {
  +                throw new BuildException(
  +                    "source file does not exist");
  +            }
  +            if(srcFile.isDirectory() ) {
  +                throw new BuildException(
  +                    "source file is a directory");
  +            }
  +        }
  +
       }
   
       /**
  @@ -183,7 +198,7 @@
           command.setTraceCommandLine(true);
           //fill in args
           command.addArgument("/nologo");
  -        command.addArgument("/outfile:"+destFile);
  +        command.addArgument("/out:"+destFile);
           command.addArgument("/language:",language);
           if(server) {
               command.addArgument("/server");
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to