ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: Ant Principles
Date Wed, 19 Apr 2000 07:30:56 GMT
>>>>> "JDD" == James Duncan Davidson <james.davidson@eng.sun.com> writes:

 JDD> ant projectfile.xml -props foo=bar;baz=bop [target]

 JDD> rubys@us.ibm.com wrote:
 >> 
 >> Semicolons on the command line are real annoying to Unix users...

 JDD> One more thought:

 JDD>     -prop foo=bar&baz=bap

Do you really think & on the command line are less annoying to Unix
users 8^)? 

If you'd been kidding, you've trolled me.

 JDD> One thought of how to provide this is that instead of an ext/
 JDD> directory, we have a taskdef/ directory and each task is in that
 JDD> directory by taskname used in the build file. For example:

 JDD>    <target name="main"> 
 JDD>       <copydir src="foo/" dest="bar/"/>
 JDD>    </target>

 JDD> would pick out the taskdef in:

 JDD>   $install_dir/taskdefs/copydir.jar

 JDD> This would make it pretty simple for users on a multi user
 JDD> machine to provide their own tasks by placing them in a
 JDD> $user.dir/ant/taskdefs directory.

 JDD> Then, if special tasks needed to be provided with a source base,
 JDD> there could be a tag in the build.xml file:

 JDD>     <taskdefs localdir="customtasks/"/>

I like this idea.

 JDD> To address Stefan's comments about locating the ant distribution
 JDD> directory via ENV_VARs, there isn't a way from Java itself to
 JDD> access environment variables. 

Yes, I know.

What I had in mind was what the current ant.sh does - more or
less. Add ${ANT_HOME}/lib/ant.jar to CLASSPATH and invoke

        java -Dant.dir=${ANT_HOME} org.apache.ant.Main $*

That way I can just symlink ant.sh into /usr/local/bin/ put ANT_HOME
into /etc/profile (or whatever) and every user has instant access to
it.

Maybe the wrapper scripts could even find ANT_HOME themselves much
like the java wrappers find JAVA_HOME in recent JDKs.

I'm aware that this is a platform specific solution but guess it
could be implemented for almost everything in some way.

Stefan

Mime
View raw message