From: "James Taylor" <[EMAIL PROTECTED]>
> I'm intrigued by this patch, but am concerned about the overlap with
> callbacks (I want to be sure we encourage the best approach). I
> discussed this with Pete a bit on IRC this morning and he explained to
> me that the problem with callbacks is that references were not being
> passed. I made a small change (using out back-ported Ant task when
> invoking callbacks) which seems to clear up that issue.
>
> Thus what you were trying to accomplish in your original example --
> invoking this target after compile:
>
> <target name="hello.world">
> <java classname="org.apache.foo.Bar" fork="yes">
> <classpath>
> <pathelement path="${maven.build.dest}"/>
> <path refid="maven.dependency.classpath"/>
> </classpath>
> </java>
> </target>
>
> can be accomplished by adding this to project.properties:
>
> maven.core.callback.post-compile.buildFile = build.xml
> maven.core.callback.post-compile.buildTarget = hello.world
>
> One of the nice things about this is that it does not require you to add
> the special maven ant task to your projects local build file.
>
> How do you feel about this approach?
It works, but, its completely the wrong way around. It means that maven's
compile task calls back the projects' build to run the hello world example,
while compiling. Thats just plain wierd :-)
I want to have a bunch of different targets in the projects build.xml that a
developer can use, whenever they wish (that are independent from the
maven:compile target) to run various example programs, run specific test
cases and so forth. Each of these targets in the projects build.xml will
want to reuse the classpath that Maven creates. The callback approach above
only lets me have 1 target that Maven calls when I compile.
So in other words I don't want a compile callback. I just want maven/ant to
output the classpath it uses when its compiled the code. The patch I sent
does exactly this. The callback approach, while it works for 1 target only,
isn't really what I want.
James
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>