Dominique Devienne schrieb:
On 9/18/07, Jochen Theodorou <[EMAIL PROTECTED]> wrote:
Dominique Devienne schrieb:
Actually, no. One of the great advantage of composing a forking <java>
task is that it no longer requires the Ant task itself to depend on
the forked program classes (Groovyc in this case).
it mght be free of groovyc, but don't I get just a new dependency, this
time for my frontend? And doesn't have the frontend refer to the groovyc
classes in some way to setup the classpath for the fork correctly?
No. A classpath is just a collection of dirs and jars. How would that
require groovyc classes???
the classpath of course not, but the frontend class would require
something.. if not groovyc itself, then another class in the same
package in the same dir/jar
[...]
The task allows to present a nice front-end to specify in a nice Ant
way (using filesets, etc...) what you want to do, package that up into
a long an ugly command line, and fork that away. The Task itself
become Groovyc-dependency free.
we have a nice frontend, filesets are supported, the javac task can now
be embeeded for joint compilation... which means my frontend will have
to simulate the javac part too... :(
Well, yeah, that brings a bit of complication, this javac business.
Although you handle it now, so forking via Java the Groovyc bit
doesn't imply doing anything to your composed <javac> class. You have
access to the front-end tasks config just the same.
which means using reflection to go through all getter, transport the
values via command line and call the setter in the forked JVM?
[...]
the current state is:
<taskdef
name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc"
classpath="${mainClassesDirectory}"
/>
<groovyc
srcdir="${testSourceDirectory}"
destdir="${testClassesDirectory}"
>
<classpath>
<pathelement path="${testClassesDirectory}"/>
</classpath>
<javac source="1.4" target="1.4" fork="true"/>
</groovyc>
you see the embedded javac task?
Sure. I don't think it's such a good idea, but I see it.
then how would you do that?
bye blackdrag
--
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]