stevel 02/04/11 14:45:52
Modified: src/main/org/apache/tools/ant/taskdefs/optional/dotnet
NetCommand.java Ilasm.java CSharp.java
Log:
good thing nobody was using these, cos I broke them.
Revision Changes Path
1.12 +9 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
Index: NetCommand.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NetCommand.java 11 Apr 2002 06:48:20 -0000 1.11
+++ NetCommand.java 11 Apr 2002 21:45:51 -0000 1.12
@@ -132,9 +132,9 @@
*/
public NetCommand(Task owner, String title, String program) {
- owner = owner;
- title = title;
- program = program;
+ this.owner = owner;
+ this.title = title;
+ this.program = program;
commandLine = new Commandline();
commandLine.setExecutable(program);
prepareExecutor();
@@ -215,6 +215,12 @@
*/
protected void prepareExecutor() {
// default directory to the project's base directory
+ if(owner==null) {
+ throw new RuntimeException("no owner");
+ }
+ if(owner.getProject()==null) {
+ throw new RuntimeException("Owner has no project");
+ }
File dir = owner.getProject().getBaseDir();
ExecuteStreamHandler handler = new LogStreamHandler(owner,
Project.MSG_INFO, Project.MSG_WARN);
1.16 +1 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
Index: Ilasm.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Ilasm.java 11 Apr 2002 06:47:41 -0000 1.15
+++ Ilasm.java 11 Apr 2002 21:45:51 -0000 1.16
@@ -226,7 +226,7 @@
public void setTargetType(String targetType)
throws BuildException {
- targetType = targetType.toLowerCase();
+ this.targetType = targetType.toLowerCase();
if (targetType.equals("exe") || targetType.equals("library")) {
targetType = targetType;
} else {
1.20 +12 -5
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
Index: CSharp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- CSharp.java 11 Apr 2002 07:29:58 -0000 1.19
+++ CSharp.java 11 Apr 2002 21:45:51 -0000 1.20
@@ -69,9 +69,9 @@
// ====================================================================
import java.io.File;
-
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
@@ -746,9 +746,9 @@
[EMAIL PROTECTED] BuildException if target is not one of
* exe|library|module|winexe
*/
- public void setTargetType(String targetType)
+ public void setTargetType(String ttype)
throws BuildException {
- targetType = targetType.toLowerCase();
+ targetType = ttype.toLowerCase();
if (targetType.equals("exe") || targetType.equals("library") ||
targetType.equals("module") || targetType.equals("winexe")) {
targetType = targetType;
@@ -1006,7 +1006,7 @@
*/
protected String getFileAlignParameter() {
if (fileAlign != 0) {
- return "/filealing:" + fileAlign;
+ return "/filealign:" + fileAlign;
} else {
return null;
}
@@ -1068,6 +1068,7 @@
if (srcDir == null) {
srcDir = project.resolveFile(".");
}
+ log("CSC working from source directory "+srcDir,Project.MSG_VERBOSE);
validate();
NetCommand command = new NetCommand(this, "CSC", csc_exe_name);
@@ -1114,11 +1115,17 @@
//add to the command
for (int i = 0; i < dependencies.length; i++) {
File targetFile = new File(base,dependencies[i]);
+ log(targetFile.toString(),Project.MSG_VERBOSE);
command.addArgument(targetFile.toString());
if(targetFile.lastModified()>outputTimestamp) {
filesOutOfDate++;
- log("Source file "+targetFile.toString()+" is out of date");
+ log("Source file "+targetFile.toString()+" is out of date",
+ Project.MSG_VERBOSE);
+ } else {
+ log("Source file "+targetFile.toString()+" is up to date",
+ Project.MSG_VERBOSE);
}
+
}
//now run the command of exe + settings + files
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>