|
Permaine Cheung |
12eff8 |
--- apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java.orig 2008-06-27 01:05:16.000000000 -0400
|
|
Permaine Cheung |
12eff8 |
+++ apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java 2008-07-10 16:41:47.456449617 -0400
|
|
Permaine Cheung |
12eff8 |
@@ -166,44 +166,12 @@
|
|
Permaine Cheung |
12eff8 |
* @throws Exception on error
|
|
Permaine Cheung |
12eff8 |
*/
|
|
Permaine Cheung |
12eff8 |
public void transform(File infile, File outfile) throws Exception {
|
|
Permaine Cheung |
12eff8 |
- if (transformer == null) {
|
|
Permaine Cheung |
12eff8 |
- createTransformer();
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- InputStream fis = null;
|
|
Permaine Cheung |
12eff8 |
- OutputStream fos = null;
|
|
Permaine Cheung |
12eff8 |
- try {
|
|
Permaine Cheung |
12eff8 |
- fis = new BufferedInputStream(new FileInputStream(infile));
|
|
Permaine Cheung |
12eff8 |
- fos = new BufferedOutputStream(new FileOutputStream(outfile));
|
|
Permaine Cheung |
12eff8 |
- StreamResult res = new StreamResult(fos);
|
|
Permaine Cheung |
12eff8 |
- // not sure what could be the need of this...
|
|
Permaine Cheung |
12eff8 |
- res.setSystemId(JAXPUtils.getSystemId(outfile));
|
|
Permaine Cheung |
12eff8 |
- Source src = getSource(fis, infile);
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- // set parameters on each transformation, maybe something has changed
|
|
Permaine Cheung |
12eff8 |
- //(e.g. value of file name parameter)
|
|
Permaine Cheung |
12eff8 |
- setTransformationParameters();
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- transformer.transform(src, res);
|
|
Permaine Cheung |
12eff8 |
- } finally {
|
|
Permaine Cheung |
12eff8 |
- // make sure to close all handles, otherwise the garbage
|
|
Permaine Cheung |
12eff8 |
- // collector will close them...whenever possible and
|
|
Permaine Cheung |
12eff8 |
- // Windows may complain about not being able to delete files.
|
|
Permaine Cheung |
12eff8 |
- try {
|
|
Permaine Cheung |
12eff8 |
- if (fis != null) {
|
|
Permaine Cheung |
12eff8 |
- fis.close();
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- } catch (IOException ignored) {
|
|
Permaine Cheung |
12eff8 |
- // ignore
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- try {
|
|
Permaine Cheung |
12eff8 |
- if (fos != null) {
|
|
Permaine Cheung |
12eff8 |
- fos.close();
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- } catch (IOException ignored) {
|
|
Permaine Cheung |
12eff8 |
- // ignore
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
+ if (logger != null) {
|
|
Permaine Cheung |
12eff8 |
+ logger.log("The style task is disabled on this platform");
|
|
Permaine Cheung |
12eff8 |
+ logger.log(
|
|
Permaine Cheung |
12eff8 |
+ "http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163689");
|
|
Permaine Cheung |
12eff8 |
+ }
|
|
Permaine Cheung |
12eff8 |
+ new FileOutputStream(outfile).close();
|
|
Permaine Cheung |
12eff8 |
}
|
|
Permaine Cheung |
12eff8 |
|
|
Permaine Cheung |
12eff8 |
/**
|
|
Permaine Cheung |
12eff8 |
--- apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java.orig 2008-06-27 01:05:22.000000000 -0400
|
|
Permaine Cheung |
12eff8 |
+++ apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java 2008-07-10 16:42:09.270573847 -0400
|
|
Permaine Cheung |
12eff8 |
@@ -285,42 +285,8 @@
|
|
Permaine Cheung |
12eff8 |
* @throws BuildException if failonerror is true and an error happens
|
|
Permaine Cheung |
12eff8 |
*/
|
|
Permaine Cheung |
12eff8 |
public void execute() throws BuildException {
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- int fileProcessed = 0;
|
|
Permaine Cheung |
12eff8 |
- if (file == null && (filesets.size() == 0)) {
|
|
Permaine Cheung |
12eff8 |
- throw new BuildException(
|
|
Permaine Cheung |
12eff8 |
- "Specify at least one source - " + "a file or a fileset.");
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- if (file != null) {
|
|
Permaine Cheung |
12eff8 |
- if (file.exists() && file.canRead() && file.isFile()) {
|
|
Permaine Cheung |
12eff8 |
- doValidate(file);
|
|
Permaine Cheung |
12eff8 |
- fileProcessed++;
|
|
Permaine Cheung |
12eff8 |
- } else {
|
|
Permaine Cheung |
12eff8 |
- String errorMsg = "File " + file + " cannot be read";
|
|
Permaine Cheung |
12eff8 |
- if (failOnError) {
|
|
Permaine Cheung |
12eff8 |
- throw new BuildException(errorMsg);
|
|
Permaine Cheung |
12eff8 |
- } else {
|
|
Permaine Cheung |
12eff8 |
- log(errorMsg, Project.MSG_ERR);
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- for (int i = 0; i < filesets.size(); i++) {
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- FileSet fs = (FileSet) filesets.elementAt(i);
|
|
Permaine Cheung |
12eff8 |
- DirectoryScanner ds = fs.getDirectoryScanner(getProject());
|
|
Permaine Cheung |
12eff8 |
- String[] files = ds.getIncludedFiles();
|
|
Permaine Cheung |
12eff8 |
-
|
|
Permaine Cheung |
12eff8 |
- for (int j = 0; j < files.length; j++) {
|
|
Permaine Cheung |
12eff8 |
- File srcFile = new File(fs.getDir(getProject()), files[j]);
|
|
Permaine Cheung |
12eff8 |
- doValidate(srcFile);
|
|
Permaine Cheung |
12eff8 |
- fileProcessed++;
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- }
|
|
Permaine Cheung |
12eff8 |
- onSuccessfulValidation(fileProcessed);
|
|
Permaine Cheung |
12eff8 |
+ log("The xmlvalidate task is disabled on this platform");
|
|
Permaine Cheung |
12eff8 |
+ log("http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=163689");
|
|
Permaine Cheung |
12eff8 |
}
|
|
Permaine Cheung |
12eff8 |
|
|
Permaine Cheung |
12eff8 |
/**
|