--- Stefan Bodewig <[EMAIL PROTECTED]> wrote:
> Peter Donald <[EMAIL PROTECTED]> wrote:
>
> > they are mostly the same with predictable
> variayions (ie one
> > projects has 1 class to rmic while another may
> have 0 and another
> > may have 10).
>
> I could point you to the verify attribute of rmic
> and say you could
> always invoke it on all your classes, the task is
> smart enough to sort
> out what needs to be handled - trust the tasks ;-)
>
> > The actual example I have been using (rmic)
> doesn't need
> > configuration stage ;). You can do it base on
> input file. A snippet
> > from my tests using XML+XSL to do templating is
> below
> >
> >
>
----------------------------------------------------------------------------
> > <!-- Compiles the source code -->
> > <target name="compile" depends="prepare">
> > <mkdir dir="${build.classes}"/>
> > <javac srcdir="${java.dir}"
> > destdir="${build.classes}"
> > debug="${debug}"
> > optimize="${optimize}"
> > deprecation="${deprecation}">
> > <classpath refid="project.class.path" />
> > <xsl:apply-templates
> select="/project/java-compile"/>
> > </javac>
> >
> > <xsl:apply-templates select="/project/rmic"/>
> >
> > <xsl:apply-templates
> select="/project/resources"/>
> > </target>
>
> If this really captures all variations, you could
> simply break it up
> into three targets and just define the rmic target
> for all 17 projects
> you've been talking about - I don't see any bigger
> maintenance burden
> as you'd have to keep 17 input files anyway.
>
> But I don't suggest that, as I don't think you need
> the template stuff
> here at all, i.e. you can achieve the effect of the
> templating
> mechanism with projectref as it has been described
> and Ant2 features.
>
> Let's take the <xsl:apply-templates
> select="/project/java-compile"/>.
> What do we have here? Given its position on the
> javac task I guess
> this expands to a patternset (maybe more than one,
> but then we'll have
> set union in Ant2). Wouldn't <patternset
> ref="project.java-compile" />
> achieve the same?
>
> Same for rmic (which wouldn't do anything if the
> fileset was empty) or
> the resources part which again just needs some
> filesets to copy - and
> doesn't do anything for empty filesets.
>
> Let's say, your example hasn't convinced me, that we
> need templates,
> yet. 8-)
>
> Stefan
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/