diff --git a/docs/ant_task_guidelines.html b/docs/ant_task_guidelines.html index 7666f56fc..77a101695 100644 --- a/docs/ant_task_guidelines.html +++ b/docs/ant_task_guidelines.html @@ -7,7 +7,7 @@ Ant Task Design Guidelines
-One controversial rule is 'no tabs'. Use four spaces instead. Not two, +One important rule is 'no tabs'. Use four spaces instead. Not two, not eight, four. Even if your editor is configured to have a tab of four spaces, lots of others aren't -spaces have more consistency across editors and platforms.
+ failonerror + | ++ boolean to control whether failure to execute should throw a + BuildException or just print an error. + Parameter validation failures should always throw an error, regardless + of this flag + | +
+ destdir + | ++ destination directory for output + | +
The other common re-use mechanism in ant is for one task to create and -configure another. This is fairly simple. (TODO: example) +configure another. This is fairly simple. + +
+What is problematic is code which is dependent on Java1.2 features +-Collections, Reader and Writer classes, extra methods in older classes. +These can not be used directly by any code and still be able to compile +and run on a Java 1.1 system. So please stick to the older collection +classes, and the older IO classes. If a new method in an existing class +is to be used, it must be used via reflection and the +NoSuchMethodException handled somehow. +
+What if code simply does not work on Java1.1? It can happen. It will +probably be OK to have the task as an optional task, with compilation +restricted to Java1.2 or later through build.xml modifications. +Better still, use reflection to link to the classes at run time. +
+Java 1.4 adds a new optional change to the language itself, the +assert keyword, which is only enabled if the compiler is told +to compile 1.4 version source. Clearly with the 1.1 compatibility requirement, +Ant tasks can not use this keyword. They also need to move away from +using the JUnit assert() method and start calling assertTrue() +instead. + +
-A well written set of test cases will break the ant task while it is in +A well written set of test cases will break the Ant task while it is in development, until the code is actually complete. And every bug which surfaces later should have a test case added to demonstrate the problem, and to fix it. @@ -135,11 +187,9 @@ credibility significantly.
-Remember also that ant 1.x is designed to compile and run on Java1.1, so -you should test on java 1.1 as well as any later version which you use. -If you are developing on Windows you may well have the Microsoft JVM at -hand for this, otherwise you can download an old SDK or runtime from -Sun. +Remember also that Ant 1.x is designed to compile and run on Java1.1, so +you should test on Java 1.1 as well as any later version which you use. +You can download an old SDK from Sun for this purpose.
-Patches to existing files should be generated with cvs diff -u filename
+Patches to existing files should be generated with
+cvs diff -u filename
and save the output to a file. If you want to get
the changes made to multiple files in a directory , just use cvs
diff -u
. The patches should be sent as an attachment to a message titled [PATCH]
@@ -234,7 +285,14 @@ New submissions should be proceeded with [SUBMIT]. The mailer-daemon
will reject any messages over 100KB, so any large update should be
zipped up. If your submission is bigger than that, why not break it up
into separate tasks.
+
+If you hear nothing after a couple of weeks, remind the mailing list. +Sometimes really good submissions get lost in the noise of other issues. +This is particularly the case just prior to a new point release of +the product. At that time anything other than bug fixes will tend +to be neglected. +