ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet DotnetCompile.java NetCommand.java
Date Mon, 14 Mar 2005 11:49:29 GMT
bodewig     2005/03/14 03:49:29

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs/optional/dotnet Tag:
                        ANT_16_BRANCH DotnetCompile.java NetCommand.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.196 +3 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.195
  retrieving revision 1.503.2.196
  diff -u -r1.503.2.195 -r1.503.2.196
  --- WHATSNEW	14 Mar 2005 11:35:24 -0000	1.503.2.195
  +++ WHATSNEW	14 Mar 2005 11:49:27 -0000	1.503.2.196
  @@ -283,6 +283,9 @@
     attribute to point to.  This is the last version of the XSLT
     stylesheet that is expected to be compatible with Xalan-J 1.
   
  +* <csc>'s extraoptions can now contain multiple arguments.
  +  Bugzilla Report 23599.
  +
   Fixed bugs:
   -----------
   
  
  
  
  No                   revision
  No                   revision
  1.17.2.8  +13 -2     ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
  
  Index: DotnetCompile.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java,v
  retrieving revision 1.17.2.7
  retrieving revision 1.17.2.8
  diff -u -r1.17.2.7 -r1.17.2.8
  --- DotnetCompile.java	14 Apr 2004 15:42:40 -0000	1.17.2.7
  +++ DotnetCompile.java	14 Mar 2005 11:49:28 -0000	1.17.2.8
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2001-2004 The Apache Software Foundation
  + * Copyright  2001-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -35,6 +35,7 @@
   
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.FileSet;
   import org.apache.tools.ant.types.EnumeratedAttribute;
  @@ -469,6 +470,16 @@
           }
       }
   
  +    /**
  +     *  get any extra options or null for no argument needed, split
  +     *  them if they represent multiple options.
  +     *
  +     * @return    The ExtraOptions Parameter to CSC
  +     */
  +    protected String[] getExtraOptionsParameters() {
  +        String extra = getExtraOptionsParameter();
  +        return extra == null ? null : Commandline.translateCommandline(extra);
  +    }
   
       /**
        * Set the destination directory of files to be compiled.
  @@ -831,7 +842,7 @@
           command.addArgument(getAdditionalModulesParameter());
           command.addArgument(getDebugParameter());
           command.addArgument(getDefinitionsParameter());
  -        command.addArgument(getExtraOptionsParameter());
  +        command.addArguments(getExtraOptionsParameters());
           command.addArgument(getMainClassParameter());
           command.addArgument(getOptimizeParameter());
           command.addArgument(getDestFileParameter());
  
  
  
  1.25.2.6  +15 -1     ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  
  Index: NetCommand.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
  retrieving revision 1.25.2.5
  retrieving revision 1.25.2.6
  diff -u -r1.25.2.5 -r1.25.2.6
  --- NetCommand.java	9 Mar 2004 17:01:44 -0000	1.25.2.5
  +++ NetCommand.java	14 Mar 2005 11:49:28 -0000	1.25.2.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000-2004 The Apache Software Foundation
  + * Copyright  2000-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -202,6 +202,20 @@
       }
   
       /**
  +     *  add an argument to a command line; do nothing if the arg is null or
  +     *  empty string
  +     *
  +     *@param  argument  The feature to be added to the Argument attribute
  +     */
  +    public void addArguments(String[] arguments) {
  +        if (arguments != null && arguments.length != 0) {
  +            for (int i = 0; i < arguments.length; i++) {
  +                addArgument(arguments[i]);
  +            }
  +        }
  +    }
  +
  +    /**
        *  concatenate two strings together and add them as a single argument,
        *  but only if argument2 is non-null and non-zero length
        *
  
  
  

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


Mime
View raw message