Browse Source

includes for .NET tasks doesn't work as expected. PR 24194

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277941 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
6b47f81bd1
6 changed files with 27 additions and 9 deletions
  1. +2
    -2
      docs/manual/OptionalTasks/csc.html
  2. +1
    -1
      docs/manual/OptionalTasks/jsharpc.html
  3. +2
    -2
      docs/manual/OptionalTasks/vbc.html
  4. +8
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  5. +7
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/JSharp.java
  6. +7
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java

+ 2
- 2
docs/manual/OptionalTasks/csc.html View File

@@ -46,7 +46,7 @@
</td></tr> </td></tr>


<tr><td><blockquote> <tr><td><blockquote>
Compiles C# source into executables or modules. csc.exe on Windows or mcs on any other platform must be on the execute path, unless another executable or the full path to that executable is specified in the <tt>executable</tt> parameter <p> All parameters are optional: <code>&lt;csc/&gt;</code> should suffice to produce a debug build of all *.cs files. However, naming an <tt>destFile</tt>stops the csc compiler from choosing an output name from random, and allows the dependency checker to determine if the file is out of date. <p> The task is a directory based task, so attributes like <b>includes="*.cs" </b> and <b>excludes="broken.cs"</b> can be used to control the files pulled in. By default, all *.cs files from the project folder down are included in the command. When this happens the output file -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with <tt>destFile</tt> seems prudent. <p> <p> For more complex source trees, nested <tt>src</tt> elements can be supplied. When such an element is present, the implicit fileset is ignored. This makes sense, when you think about it :) <p> References to external files can be made through the references attribute, or (since Ant1.6), via nested <code>&lt;reference&gt;</code> filesets. With the latter, the timestamps of the references are also used in the dependency checking algorithm. <p> Example <pre>&lt;csc optimize=&quot;true&quot; debug=&quot;false&quot; docFile=&quot;documentation.xml&quot; warnLevel=&quot;4&quot; unsafe=&quot;false&quot; targetType=&quot;exe&quot; incremental=&quot;false&quot; mainClass = &quot;MainApp&quot; destFile=&quot;NetApp.exe&quot; &gt; &lt;src dir="src" includes="*.cs"/&gt; &lt;reference file="${testCSC.dll}"/&gt; &lt;define name="RELEASE"/&gt; &lt;define name="DEBUG" if="debug.property"/&gt; &lt;define name="def3" unless="def3.property"/&gt; &lt;/csc&gt; </pre>
Compiles C# source into executables or modules. csc.exe on Windows or mcs on any other platform must be on the execute path, unless another executable or the full path to that executable is specified in the <tt>executable</tt> parameter <p> All parameters are optional: <code>&lt;csc/&gt;</code> should suffice to produce a debug build of all *.cs files. However, naming an <tt>destFile</tt>stops the csc compiler from choosing an output name from random, and allows the dependency checker to determine if the file is out of date. <p> The task is a directory based task, so attributes like <b>includes="*.cs" </b> and <b>excludes="broken.cs"</b> can be used to control the files pulled in. By default, all *.cs files from the project folder down are included in the command. When this happens the output file -if not specified- is taken as the first file in the list, which may be somewhat hard to control. Specifying the output file with <tt>destFile</tt> seems prudent. <p> <p> For more complex source trees, nested <tt>src</tt> elements can be supplied. When such an element is present, the implicit fileset is ignored. This makes sense, when you think about it :) <p>For historical reasons the pattern <code>**/*.cs</code> is preset as includes list and you can not override it with an explicit includes attribute. Use nested <code>&lt;src&gt;</code> elements instead of the basedir attribute if you need more control.</p> <p> References to external files can be made through the references attribute, or (since Ant1.6), via nested <code>&lt;reference&gt;</code> filesets. With the latter, the timestamps of the references are also used in the dependency checking algorithm. <p> Example <pre>&lt;csc optimize=&quot;true&quot; debug=&quot;false&quot; docFile=&quot;documentation.xml&quot; warnLevel=&quot;4&quot; unsafe=&quot;false&quot; targetType=&quot;exe&quot; incremental=&quot;false&quot; mainClass = &quot;MainApp&quot; destFile=&quot;NetApp.exe&quot; &gt; &lt;src dir="src" includes="*.cs"/&gt; &lt;reference file="${testCSC.dll}"/&gt; &lt;define name="RELEASE"/&gt; &lt;define name="DEBUG" if="debug.property"/&gt; &lt;define name="def3" unless="def3.property"/&gt; &lt;/csc&gt; </pre>
</blockquote></td></tr> </blockquote></td></tr>


</table> </table>
@@ -503,7 +503,7 @@
<tr> <tr>
<td> <td>
<div align="center"><font color="#525D76" size="-1"><em> <div align="center"><font color="#525D76" size="-1"><em>
Copyright &copy; 2000-2004, The Apache Software Foundation. All Rights Reserved.
Copyright &copy; 2000-2005, The Apache Software Foundation. All Rights Reserved.
</em></font></div> </em></font></div>
</td> </td>
</tr> </tr>


+ 1
- 1
docs/manual/OptionalTasks/jsharpc.html View File

@@ -18,7 +18,7 @@
<td valign="bottom"> <td valign="bottom">
<font size="+3" face="arial,helvetica,sanserif"><strong>Jsharpc <font size="+3" face="arial,helvetica,sanserif"><strong>Jsharpc
Task</strong></font> Task</strong></font>
<br><font face="arial,helvetica,sanserif">Compile J# source down to a managed .NET application.</font>
<br><font face="arial,helvetica,sanserif">Compile J# source down to a managed .NET application. <p>For historical reasons the pattern <code>**/*.java</code> is preset as includes list and you can not override it with an explicit includes attribute. Use nested <code>&lt;src&gt;</code> elements instead of the basedir attribute if you need more control.</p></font>
</td> </td>
<td> <td>
<!-- PROJECT LOGO --> <!-- PROJECT LOGO -->


+ 2
- 2
docs/manual/OptionalTasks/vbc.html View File

@@ -18,7 +18,7 @@
<td valign="bottom"> <td valign="bottom">
<font size="+3" face="arial,helvetica,sanserif"><strong>Vbc <font size="+3" face="arial,helvetica,sanserif"><strong>Vbc
Task</strong></font> Task</strong></font>
<br><font face="arial,helvetica,sanserif">This task compiles Visual Basic.NET source into executables or modules.</font>
<br><font face="arial,helvetica,sanserif">This task compiles Visual Basic.NET source into executables or modules. <p>For historical reasons the pattern <code>**/*.vb</code> is preset as includes list and you can not override it with an explicit includes attribute. Use nested <code>&lt;src&gt;</code> elements instead of the basedir attribute if you need more control.</p></font>
</td> </td>
<td> <td>
<!-- PROJECT LOGO --> <!-- PROJECT LOGO -->
@@ -479,7 +479,7 @@
<tr> <tr>
<td> <td>
<div align="center"><font color="#525D76" size="-1"><em> <div align="center"><font color="#525D76" size="-1"><em>
Copyright &copy; 2000-2004, The Apache Software Foundation. All Rights Reserved.
Copyright &copy; 2000-2005, The Apache Software Foundation. All Rights Reserved.
</em></font></div> </em></font></div>
</td> </td>
</tr> </tr>


+ 8
- 2
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java View File

@@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -60,8 +60,14 @@ import org.apache.tools.ant.taskdefs.condition.Os;
* For more complex source trees, nested <tt>src</tt> elemements can be * For more complex source trees, nested <tt>src</tt> elemements can be
* supplied. When such an element is present, the implicit fileset is ignored. * supplied. When such an element is present, the implicit fileset is ignored.
* This makes sense, when you think about it :) * This makes sense, when you think about it :)
* <p>
* *
* <p>For historical reasons the pattern
* <code>**</code><code>/*.cs</code> is preset as includes list and
* you can not override it with an explicit includes attribute. Use
* nested <code>&lt;src&gt;</code> elements instead of the basedir
* attribute if you need more control.</p>
*
* <p>
* References to external files can be made through the references attribute, * References to external files can be made through the references attribute,
* or (since Ant1.6), via nested &lt;reference&gt; filesets. With the latter, * or (since Ant1.6), via nested &lt;reference&gt; filesets. With the latter,
* the timestamps of the references are also used in the dependency * the timestamps of the references are also used in the dependency


+ 7
- 1
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/JSharp.java View File

@@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -27,6 +27,12 @@ import org.apache.tools.ant.BuildException;
* generates a .NET managed exe or dll. * generates a .NET managed exe or dll.
* <p> * <p>
* *
* <p>For historical reasons the pattern
* <code>**</code><code>/*.java</code> is preset as includes list and
* you can not override it with an explicit includes attribute. Use
* nested <code>&lt;src&gt;</code> elements instead of the basedir
* attribute if you need more control.</p>
*
* @see <A=ref="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html/vjoriMicrosoftVisualJ.asp"> * @see <A=ref="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vjsharp/html/vjoriMicrosoftVisualJ.asp">
* Visual J++ online documentation</a> * Visual J++ online documentation</a>
* *


+ 7
- 1
src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java View File

@@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -43,6 +43,12 @@ import org.apache.tools.ant.BuildException;
<p> <p>
* Also, dependency checking only works if destfile is set. * Also, dependency checking only works if destfile is set.
* *
* <p>For historical reasons the pattern
* <code>**</code><code>/*.vb</code> is preset as includes list and
* you can not override it with an explicit includes attribute. Use
* nested <code>&lt;src&gt;</code> elements instead of the basedir
* attribute if you need more control.</p>
*
* As with &lt;csc&gt; nested <tt>src</tt> filesets of source, * As with &lt;csc&gt; nested <tt>src</tt> filesets of source,
* reference filesets, definitions and resources can be provided. * reference filesets, definitions and resources can be provided.
* *


Loading…
Cancel
Save