Here is some of what is new from the previous discussion:

1) I added an explicit <generate/> tag. This works around a problem
with ant typedefs where there is no callback to tell you have finished parsing
that xml element. 
This enabled me to remove of the complications with target generation where it 
had
to be done lazily. There is almost certainly some code still present that is 
legacy
from the previous way of doing it.

2) There is now an "ant show" which also takes an optional property
to see specific targets:

  | [EMAIL PROTECTED] common]$ ant -f jbossbuild.xml show 
-Dshow=build.namespace.jar
  | Buildfile: jbossbuild.xml
  | 
  | show:
  | <!-- Build for the artifact namespace.jar -->
  | <target name="build.namespace.jar">
  | <mkdir dir="/home/ejort/newjboss/jboss-head/common/output/lib"/>
  | <jar 
manifest="/home/ejort/newjboss/jboss-head/common/output/etc/default.mf" 
destfile="/home/ejort/newjboss/jboss-head/common/output/lib/namespace.jar">
  |   <fileset dir="/home/ejort/newjboss/jboss-head/common/output/classes/main">
  |     <include name="javax/xml/namespace/*"/>
  |   </fileset>
  | </jar>
  | </target>
  | 

3) You can now specify any attribute on a definition which negates the need
to explicitly add code for the use case where you want to pass a parameter from 
the
definition to the targetdef.

This says run junit against all source definitions that have a test attribute
build.xml

  |       <source id="test" test="**/*TestCase.java">
  |          <include input="classes"/>
  |          <include input="test.path"/>
  |       </source>
  | 
tasks.xml

  |          <source when="@{test}">
  |             <mkdir dir="@{testDir}"/>
  |             <junit fork="true"
  |                    printSummary="true">
  |                <formatter type="plain"/>
  |                <classpath>
  |                   <pathElements/>
  |                </classpath>
  |                <batchtest todir="@{testDir}">
  |                   <fileset dir="@{sourceDir}" includes="@{test}"/>
  |                </batchtest>
  |             </junit>
  |          </source>
  | 

4) Allow an output path to be directly overriden:
This was done because slide is in apache-slide/client rather than lib

5) Allowed includes/excludes when using filesets. This needs to be generalized
to other groupings.

6) Added componentmain as a target definition. This allows the top level build
to run tasks against a component rather than running a target inside the 
component
build file.
e.g. in the synchronize task we want to do either a cvs update or co depending
upon whether the component directory actually exists:


  |       <targetdef target="synchronize" description="Synchronize">
  | 
  |          <!-- Update the main build folder and tools from cvs
  |               then do the same for the components before running
  |               the after synchronization processing
  |               NOTE: Does not automatically invoke component builds
  |               as the list of components maybe out-of-date at this point
  |               and we need to conditionally do cvs co/update
  |          -->
  |          <main components="none">
  |             <cvs command="update -dP" failonerror="true"/>
  |             <invoke target="synchronize" dir="../tools"/>
  |             <execant target="synchronize.components"/>
  |             <execant target="synchronize.after.main"/>
  |          </main>
  | 
  |          <!-- If the component exists we just do a cvs update -->
  |          <componentmain if="@{exists}">
  |             <invoke target="synchronize" dir="@{dir}"/> 
  |             <execant target="synchronize.after" dir="@{dir}"/> 
  |          </componentmain>
  | 
  |          <!-- If the component doesn't exist and we want to
  |               get the source build check it out from cvs
  |          -->
  |          <componentmain unless="@{exists}" if="@{local}">
  |             <cvs dest="@{dir.parent}">
  |                <commandline>
  |                   <argument value="-d"/>
  |                   <argument value="@{build.cvsroot}"/>
  |                   <argument value="co"/>
  |                   <argument value="@{module}"/>
  |                </commandline>
  |             </cvs>
  |             <execant target="synchronize.after" dir="@{dir}"/> 
  |          </componentmain>
  | 

7) Some other minor changes I can't remember at the moment?

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862653#3862653

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862653


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to