ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpfoe...@ThoughtWorks.com
Subject XSLT (was Re: Immutable Properties in 1.1?)
Date Fri, 21 Jul 2000 23:53:38 GMT

I still think that using XSLT as a sort of "preprocessor" is the best way
to handle these kind of situations. You could define the structure of your
project in an XML file, using as simple a syntax as possible, then use XSL
to generate your Ant file. This keeps the Ant syntax small and clean, while
leveraging an already defined standard to automate the repetitive stuff...

Matt Foemmel
ThoughtWorks, Inc.


                                                                                         
                                                       
                    Jesse Glick                                                          
                                                       
                    <Jesse.Glick@net        To:     ant-dev@jakarta.apache.org        
                                                          
                    beans.com>              cc:                                       
                                                          
                    Sent by:                Subject:     Re: Immutable Properties in 1.1?
                                                       
                    Jesse.Glick@netb                                                     
                                                       
                    eans.com                                                             
                                                       
                                                                                         
                                                       
                                                                                         
                                                       
                    07/20/2000 03:49                                                     
                                                       
                    PM                                                                   
                                                       
                    Please respond                                                       
                                                       
                    to ant-dev                                                           
                                                       
                                                                                         
                                                       
                                                                                         
                                                       




Ken Liu wrote:
> BTW, the problem I see with using templated targets ala Jesse's patch is

"patch" -> "proposed patch" :-)

> that it would be difficult to define different "depends" for each
different
> target, no?

Well, I was assuming that you would be able to parametrize depends lists
as well:

<target pattern="prepare-dir-(.*)">
  <somehowCleanIt path="sources/$[1]"/>
</target>
<target pattern="build-dir-(.*)-with-libs-from-(.*)"
        depends="prepare-dir-$[1]">
  <compileIt path="sources/$[1]"
             pullInJars="$[2]/*.jar"/>
</target>

Something like that. Now run targets like
"build-dir-foo/bar-with-libs-from-miscutils". If you have different
*kinds* of dependencies for the different targets, you would need one
template per kind of dependency, I guess.

-Jesse

--
Jesse Glick   <mailto:Jesse.Glick@netbeans.com>
NetBeans, Open APIs  <http://www.netbeans.org/>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR




Mime
View raw message