ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 56337] Extension point target rewriting
Date Thu, 03 Apr 2014 11:37:15 GMT

--- Comment #3 from ---
My use case:

Imagine a java.xml that, among many other things, hooks into a compile
extension point:

<project name="java">
        <import file="compile.xml" />
    <target name="java:compile" extensionOf="compile">
        <javac ... />

from compile.xml:

<project name="compile">
    <extension-point name="compile" />

Most projects would find using the default implementation of the java:compile
target provided by the compile extension point, but sometimes we'd like to
override its behavior:

<project name="build">
    <import file="java.xml" />
    <target name="java:compile">
        <javac ... />

This is usually needed when the default implementation doesn't do what is
needed by this particular build and the generic scripts aren't quite flexible

While I do see the logic of the change: while I overrode the target--calling
the java:compile target directly does work--the extension point is preserving
its dependencies like regular dependencies do, I'm a little stuck.  Without the
override, how would I allow a build script author to do what they need without
resorting to copying and pasting the entirety of the original java.xml?  (It
does more than just compile: javadoc, zipping up the source, etc.)  I'm failing
to see how <bindtargets> helps in this case...unless I ditched using
extensionOf entirely, using <bindtargets> with unless:true attributes and a
while bunch of properties for each?  That seems complicated and error prone.

You are receiving this mail because:
You are the assignee for the bug.

View raw message