Jason,

I had submitted an example directly to David sometime last week, but
I'll share with the world now so that the entire Jboss team can benefit.
Its not a Java project per se, as it really only uses a sitemap.xml and
an XSL to produce another ant script for running XSL transformations on
a web site I manage. But, you are welcome to use it as a starting point.
I was hoping to convert a project that I am managing from using
redundant task bodies to use something like (half-baked mind you):

<module name="Foo"
  <depends>
    <module name="Bar"/>
  </depends>
  <libs>
    <lib ref="my.class.path.ref"
  </libs>
  <ear/>
  <war/>
  <java/>
  <xdoclet/>
</module>

But for now, take a look at the following project for an example of
using XSL + XML to produce dynamic Ant scripts. Not sure if it will
help, but see if it will get you started. I can answer any questions you
have about how it works, as I am fluent in XSL. 

cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/ccaustin login

cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/ccaustin
co ccaustin

The interesting files are the src/web/xml/sitemap.xml ,
src/web/xml/sitemap-build.xsl, and if you run the ant script with an XSL
engine in your $ANT_HOME/lib, it will produce a file called
autogen-build.xml in src/web/xml

HTH,
James

> -----Original Message-----
> From: Jason Dillon [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, October 03, 2002 9:26 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [JBoss-dev] Build System... any ideas
> 
> 
> If I send you an example .xml file can you send me a basic skeleton 
> stylesheet with examples on how to replave tags and access emements?
> 
> --jason
> 
> 
> On Fri, 20 Sep 2002, David Jencks wrote:
> 
> > I've seen similar explanations on the ant list sometimes, 
> but they all 
> > go way over my head.  Is there any chance of showing us one 
> of these 
> > projects build system to look at in detail?
> > 
> > thanks
> > david jencks
> > 
> > On 2002.09.20 15:49:51 -0400 James Higginbotham wrote:
> > > Not sure what you may want to do with XSL, but we use it for our 
> > > product's build system and I use it for a personal 
> project as well. 
> > > Its quite powerful, since you have define a modules.xml 
> that has all 
> > > the dependencies and let XSL generate the right build targets. It 
> > > would offer primary targets for the caller to invoke and would 
> > > delegate to the generated script. The main build.xml 
> would determine 
> > > if the generated xml is out of date or missing and XSLT the 
> > > modules.xml or whatever into the resulting ant script before 
> > > invoking the delegated call.
> > > 
> > > I haven't dove into your buildmagic too much, but a commontargets 
> > > that is shared by all modules lets you share common 
> targets, while 
> > > the XSL could be done to drive each modules' build script or a 
> > > master build script.
> > > 
> > > I'm sure you guys have a complex build env, but thought I'd throw 
> > > this out for you and others that may want to know how we 
> are using 
> > > XSL + Ant.
> > > 
> > > 
> > > HTH,
> > > James
> > > 
> > > > -----Original Message-----
> > > > From: Jason Dillon [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, September 20, 2002 2:17 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: RE: [JBoss-dev] Build System... any ideas
> > > > 
> > > > 
> > > > Can you find any more info about using xslt or velocity as a
> > > > preprocessor to the build files?  I think this might be a 
> > > > good idea, but just as you say I can not find any examples of 
> > > > it to study.
> > > > 
> > > > --jason
> > > > 
> > > > 
> > > > > -----Original Message-----
> > > > > From: [EMAIL PROTECTED] 
> > > > > [mailto:jboss-
> > > > > [EMAIL PROTECTED]] On Behalf Of 
> David Jencks
> > > > > Sent: Thursday, September 19, 2002 6:43 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Re: [JBoss-dev] Build System... any ideas
> > > > > 
> > > > > There seems to be an <import> and an <include> and I'm not
> > > > completely
> > > > sure
> > > > > what the difference is or where the include task is.  The
> > > > import might
> > > > get
> > > > > into ant 1.6 and is already part of centipede.  
> Here's the code 
> > > > > for
> > > > > import:
> > > > > 
> > > > > 
> > > > 
> http://cvs.apache.org/viewcvs.cgi/jakarta-ant/proposal/embed/#dirl
> > > > ist
> > > > > 
> > > > > Most of the build gurus on the ant list seem to like 
> the idea of
> > > > > generating build files using xslt or velocity and 
> then running them 
> > > > > with plain
> > > > ant
> > > > > rather than using things like <foreach>.  I haven't seen an
> > > > example of
> > > > > this yet.
> > > > > 
> > > > > david jencks
> > > > > 
> > > > > 
> > > > > On 2002.09.19 20:43:43 -0400 Jason Dillon wrote:
> > > > > > Where is the include task documented... I didn't find it on 
> > > > > > their
> > > > > > website.
> > > > > >
> > > > > > --jason
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: [EMAIL PROTECTED]
> > > > [mailto:jboss-
> > > > > > > [EMAIL PROTECTED]] On Behalf Of
> > > > David Jencks
> > > > > > > Sent: Thursday, September 19, 2002 5:27 PM
> > > > > > > To: [EMAIL PROTECTED]
> > > > > > > Subject: Re: [JBoss-dev] Build System... any ideas
> > > > > > >
> > > > > > > On 2002.09.19 19:32:25 -0400 Scott M Stark wrote:
> > > > > > > > I still don't buy it. Many of the existing tests
> > > > involve several
> > > > > > > > functional modules so how do I associate the 
> test with its
> > > > > > > > module?
> > > > > > >
> > > > > > > I see your point, many of the "jmx" tests that test
> > > > system module
> > > > > > > functionality rely on ejbs, etc etc, to provide a 
> sufficient
> > > > > > environment.
> > > > > > >
> > > > > > >
> > > > > > > The compilation issue is
> > > > > > > > a simple
> > > > > > > > by product of having a huge monolithic build file,
> > > > and further
> > > > > > > > complicated by xdoclet having to be run as a 
> first pass to
> > > > > > > > generate the code. I
> > > > > > better
> > > > > > > > not wake
> > > > > > > > up one morning and have the testsuite laying in 
> pieces in 
> > > > > > > > CVS
> > > > > > without a
> > > > > > > > clear
> > > > > > > > consensus on this approach.
> > > > > > >
> > > > > > > So are you suggesting that there be, more or 
> less, a build 
> > > > > > > file
> > > > per
> > > > > > > testsuite directory (e.g. org/jboss/test/jmx gets a 
> > > > > > > build.xml)?
> > > > Then
> > > > > > the
> > > > > > > testsuite/build.xml calls each of them?
> > > > > > >
> > > > > > > I think that would accomplish essentially the 
> same thing I 
> > > > > > > was
> > > > > > suggesting
> > > > > > > with the generic targets for "run xdoclet in one 
> directory" 
> > > > > > > and
> > > > "build
> > > > > > > jars
> > > > > > > from one directory" suggestion.  Smaller build 
> files might 
> > > > > > > be
> > > > easier
> > > > > > to
> > > > > > > understand individually, but might also be significantly 
> > > > > > > slower.
> > > > > > >
> > > > > > > The ant 1.5.1 include task might help, we could 
> include the
> > > > specific
> > > > > > > xdoclet and jar targets from small build files 
> while keeping 
> > > > > > > a
> > > > single
> > > > > > > global javac task.
> > > > > > >
> > > > > > > david jencks
> > > > > > >
> > > > > > > >
> > > > > > > > xxxxxxxxxxxxxxxxxxxxxxxx
> > > > > > > > Scott Stark
> > > > > > > > Chief Technology Officer
> > > > > > > > JBoss Group, LLC
> > > > > > > > xxxxxxxxxxxxxxxxxxxxxxxx
> > > > > > > >
> > > > > > > > ----- Original Message -----
> > > > > > > > From: "David Jencks" <[EMAIL PROTECTED]>
> > > > > > > > To: <[EMAIL PROTECTED]>
> > > > > > > > Sent: Thursday, September 19, 2002 4:15 PM
> > > > > > > > Subject: Re: [JBoss-dev] Build System... any ideas
> > > > > > > >
> > > > > > > >
> > > > > > > > > On 2002.09.19 18:05:46 -0400 Scott M Stark wrote:
> > > > > > > > > > Add -Dnojars=true during the run of the single
> > > > test and zero
> > > > > > > > compilation
> > > > > > > > > > time is the result.
> > > > > > > > >
> > > > > > > > > Umm, yes, I know about nojars, I wrote it.
> > > > > > > > >
> > > > > > > > > It doesn't help much if you changed the test 
> and need to
> > > > > > recompile,
> > > > > > > the
> > > > > > > > > situation I find time consuming.
> > > > > > > > >
> > > > > > > > > > Add -Djbosstest.nodeploy=true and you can also
> > > > avoid having
> > > > to
> > > > > > > deploy
> > > > > > > > the
> > > > > > > > > > tests
> > > > > > > > > > into the server.
> > > > > > > > >
> > > > > > > > > Doesn't this require you to copy the appropriate
> > > > test jar into
> > > > the
> > > > > > > > deploy
> > > > > > > > > directory?  Are there any deployments that take a
> > > > significant
> > > > > > amount
> > > > > > > of
> > > > > > > > > time?
> > > > > > > > >
> > > > > > > > > I routinely run single tests in 10 seconds with these
> > > > > > > > > > options. Refactoring
> > > > > > > > > > the entire testsuite for a simple usage problems is 
> > > > > > > > > > silly.
> > > > > > > > >
> > > > > > > > > Having to spend 7 minutes to try a simple change to
> > > > a test is
> > > > a
> > > > > > lot
> > > > > > > > > sillier.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > Breaking up the huge monolithic build file into 
> > > > > > > > > > seperates
> > > > test
> > > > > > files
> > > > > > > > > > would be a good thing.
> > > > > > > > > > This is what we had in 2.4 and it was nice when
> > > > we had < 200
> > > > > > tests.
> > > > > > > > Now
> > > > > > > > > > as we
> > > > > > > > > > approach 1000 its time to revisit this as well.
> > > > > > > > >
> > > > > > > > > Agreed, this is a better solution, but also 
> more work.  
> > > > > > > > > I
> > > > think
> > > > > > the
> > > > > > > > > test/module in the modules is the way to go here.
> > > > > > > > >
> > > > > > > > > david jencks
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > -------------------------------------------------------
> > > > > > > > This sf.net email is sponsored by:ThinkGeek Welcome to 
> > > > > > > > geek heaven. http://thinkgeek.com/sf
> > > > > > > > _______________________________________________
> > > > > > > > Jboss-development mailing list 
> > > > > > > > [EMAIL PROTECTED]
> > > > > > > > 
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > -------------------------------------------------------
> > > > > > > This sf.net email is sponsored by:ThinkGeek
> > > > > > > Welcome to geek heaven.
> > > > > > > http://thinkgeek.com/sf 
> > > > > > > _______________________________________________
> > > > > > > Jboss-development mailing list 
> > > > > > > [EMAIL PROTECTED]
> > > > > > > 
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > > > >
> > > > > >
> > > > > >
> > > > > > -------------------------------------------------------
> > > > > > This sf.net email is sponsored by:ThinkGeek
> > > > > > Welcome to geek heaven.
> > > > > > http://thinkgeek.com/sf 
> > > > > > _______________________________________________
> > > > > > Jboss-development mailing list 
> > > > > > [EMAIL PROTECTED]
> > > > > > 
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > > > >
> > > > > >
> > > > > 
> > > > > 
> > > > > -------------------------------------------------------
> > > > > This sf.net email is sponsored by:ThinkGeek
> > > > > Welcome to geek heaven.
> > > > > http://thinkgeek.com/sf 
> > > > > _______________________________________________
> > > > > Jboss-development mailing list 
> > > > [EMAIL PROTECTED]
> > > > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > > 
> > > > 
> > > > 
> > > > -------------------------------------------------------
> > > > This sf.net email is sponsored by:ThinkGeek
> > > > Welcome to geek heaven.
> > > > http://thinkgeek.com/sf
> > > > _______________________________________________
> > > > Jboss-development mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > > 
> > > 
> > > 
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Jboss-development mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > > 
> > > 
> > 
> > 
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> > 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to