On Mon, 3 May 2004 14:06:27 +1000, <[EMAIL PROTECTED]> wrote:
Jason van Zyl <[EMAIL PROTECTED]> wrote on 03/05/2004 01:03:57 PM:
On Sun, 2004-05-02 at 21:10, [EMAIL PROTECTED] wrote:
Given the vast amount of ant build scripts out there, there must be a
few.
Yes, but that's a result of there never being a choice. If someone had
made a build tool using something like beanshell during the time ant was
becoming popular I do wonder what the population of XML build files
would be. Maybe a lot, maybe not. I'm used to them now as I've been
exposed to them for quite a while like most but it doesn't mean they are
optimal or ideal.
Another thing to consider is the IO model for Ant is a lot less verbose
than plain Java.
Groovy is a step ahead in this regard, but still standard Java is very
verbose and a large effort compared to a build snippet to do copies,
moves, xml transforms on multiple files.
Compare:
-----ant approach----
<project>
<delete dir="${maven.build.dir}"/>
</project>
ant
-----ant approach----
with
----- java approach----
public class Clean {
public static void main(String[] args)
{
new java.io.File(args[0]).delete();
}
}
javac Clean.java
java Clean target
-----java approach----
I relly don't thinkt this is so bad. Most of the plugins are much more than
one liners and as you can see the overhead for each file here is 4 lines.
On the upside the plugins will be much easier to test and will run fast as
hell.
----- windows shell approach----
rmdir target /q /s
----- windows shell approach----
And the java approach doesn't handle simple stuff like deleting non-empty
directories.
The real issue is a lack of decent libraries for doing typical build
tasks. If java-based plugins are to be a success, we'll need to beef up
the existing libraries to handle common tasks.
There are quite a bit of very good file handing methods in commons-io but
I totally agree with you. We might wan't to create a maven-plugin-utils
library for making plugin development easier.
--
dIon Gillard, Multitask Consulting
--
Trygve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]