审视了几个关于中继流动和其他来源的员额(在线+ ANT定义指南书),但迄今没有任何一个帮助。 我不能将档案排除在汇编之外。
I have just one file that wants to exclude from compiling and ANT documentation is not really telling the detail.
I m trying to exclude HTMLParser.java
from compiling.
Also tried using excludesfile
too. But it still complies HTMLParser.java
我写了简便的国别评估,以审查试图在下文中作出不同改动的情况。
谁能告诉我什么错误?
<javac srcdir="${utilitiesSrc}" destdir="${dest}">
<excludesfile name="C:Program FilesApache Software FoundationTomcat 6.0webappshead_firstsrccommasatosanutilitiesHTMLParser.java" />
</javac>
<project
name="CompileMasatosan"
default="main"
basedir="C:Program FilesApache Software FoundationTomcat 6.0webappshead_firstsrccommasatosan">
<property name="dest"
location="C:Program FilesApache Software FoundationTomcat 6.0webappshead_firstWEB-INFclasses" />
<property name="utilitiesSrc"
location="C:Program FilesApache Software FoundationTomcat 6.0webappshead_firstsrccommasatosanutilities" />
<javac srcdir="${utilitiesSrc}" destdir="${dest}">
<exclude name="C:Program FilesApache Software FoundationTomcat 6.0webappshead_firstsrccommasatosanutilitiesHTMLParser.java" />
</javac>
</project>
The RUSParser.java 我认为没有任何依赖性,因为我评论了除阶级声明线以外的所有线。
<>斯特罗敦>
package com.masatosan.utilities;
public class HTMLParser {
/* commenting out since Eclipse doesn t like some characters :(
public static final String escapeHTML(String s){
StringBuffer sb = new StringBuffer();
int n = s.length();
for (int i = 0; i < n; i++) {
char c = s.charAt(i);
switch (c) {
case < : sb.append("<"); break;
case > : sb.append(">"); break;
case & : sb.append("&"); break;
case " : sb.append("""); break;
case à : sb.append("à");break;
case À : sb.append("À");break;
case â : sb.append("â");break;
case  : sb.append("Â");break;
case ä : sb.append("ä");break;
case Ä : sb.append("Ä");break;
case Ã¥ : sb.append("å");break;
case Ã… : sb.append("Å");break;
case æ : sb.append("æ");break;
case Æ : sb.append("Æ");break;
case ç : sb.append("ç");break;
case Ç : sb.append("Ç");break;
case é : sb.append("é");break;
case É : sb.append("É");break;
case è : sb.append("è");break;
case È : sb.append("È");break;
case ê : sb.append("ê");break;
case Ê : sb.append("Ê");break;
case ë : sb.append("ë");break;
case Ë : sb.append("Ë");break;
case ï : sb.append("ï");break;
case Ã� : sb.append("Ï");break;
case ô : sb.append("ô");break;
case Ô : sb.append("Ô");break;
case ö : sb.append("ö");break;
case Ö : sb.append("Ö");break;
case ø : sb.append("ø");break;
case Ø : sb.append("Ø");break;
case ß : sb.append("ß");break;
case ù : sb.append("ù");break;
case Ù : sb.append("Ù");break;
case û : sb.append("û");break;
case Û : sb.append("Û");break;
case ü : sb.append("ü");break;
case Ãœ : sb.append("Ü");break;
case ® : sb.append("®");break;
case © : sb.append("©");break;
case € : sb.append("€"); break;
// be carefull with this one (non-breaking whitee space)
case : sb.append(" ");break;
default: sb.append(c); break;
}
}
return sb.toString();
}
*/
}//
<>>>>>
正如评论中所建议的那样,我改变了排除文件名称的属性,即是 s的相对途径,而是! 因此, s看起来:
<javac srcdir="${utilitiesSrc}" destdir="${dest}">
<excludesfile name="HTMLParser.java" />
</javac>