ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From darr...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/tools/xsl build.xsl
Date Tue, 30 Apr 2002 05:09:18 GMT
darrell     02/04/29 22:09:18

  Modified:    .        build.xml
               tools/xsl build.xsl
  Log:
  Build system changes:
  * Top-level build.xml now passes properties to sub-builds
    (allows properties to be set on the command-line)
  * Reorganised subproject "jars" targets into a set of sub-targets.
  * Descriptors are not generated if "xdoclet.omit" property is set.
  
  Revision  Changes    Path
  1.14      +20 -21    jakarta-ant-myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/build.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- build.xml	25 Apr 2002 09:34:45 -0000	1.13
  +++ build.xml	30 Apr 2002 05:09:18 -0000	1.14
  @@ -42,76 +42,75 @@
   
       <target name="jars" description="Builds the jars for all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="jars"/>
  +            <param name="build-subproject.target" value="jars"/>
           </antcall>
       </target>
       <target name="clean" description="Cleans all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="clean"/>
  +            <param name="build-subproject.target" value="clean"/>
           </antcall>
       </target>
       <target name="rebuild" description="Rebuilds all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="rebuild"/>
  +            <param name="build-subproject.target" value="rebuild"/>
           </antcall>
       </target>
       <target name="recompile" description="Rebuilds all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="recompile"/>
  +            <param name="build-subproject.target" value="recompile"/>
           </antcall>
       </target>
       <target name="test" description="Runs unit tests for all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="test"/>
  +            <param name="build-subproject.target" value="test"/>
           </antcall>
       </target>
       <target name="dist-lite" description="Creates a minimal distribution">
           <antcall target="for-all-projects">
  -            <param name="target" value="dist-lite"/>
  +            <param name="build-subproject.target" value="dist-lite"/>
           </antcall>
       </target>
       <target name="dist" description="Creates the distribution">
           <antcall target="for-all-projects">
  -            <param name="target" value="dist-lite"/>
  +            <param name="build-subproject.target" value="dist-lite"/>
           </antcall>
       </target>
   
       <target name="for-all-projects">
           <antcall target="call-project-target">
  -            <param name="project" value="buildtools"/>
  +            <param name="build-subproject.project" value="buildtools"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="api"/>
  +            <param name="build-subproject.project" value="api"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="aut"/>
  +            <param name="build-subproject.project" value="aut"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="container"/>
  +            <param name="build-subproject.project" value="container"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="framework"/>
  +            <param name="build-subproject.project" value="framework"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="antlib"/>
  +            <param name="build-subproject.project" value="antlib"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="ant1compat"/>
  +            <param name="build-subproject.project" value="ant1compat"/>
           </antcall>
           <antcall target="call-project-target">
  -            <param name="project" value="myrmidon"/>
  +            <param name="build-subproject.project" value="myrmidon"/>
           </antcall>
       </target>
   
       <target name="call-project-target">
  -        <style in="${project}/project.xml"
  -               out="${project}/${buildfile.name}"
  +        <style in="${build-subproject.project}/project.xml"
  +               out="${build-subproject.project}/${buildfile.name}"
                  style="${build.xsl}"
                  processor="trax" />
  -        <ant dir="${project}"
  -            antfile="${buildfile.name}"
  -            target="${target}"
  -            inheritAll="false"/>
  +        <ant dir="${build-subproject.project}"
  +             antfile="${buildfile.name}"
  +             target="${build-subproject.target}"/>
       </target>
   
   </project>
  
  
  
  1.7       +64 -50    jakarta-ant-myrmidon/tools/xsl/build.xsl
  
  Index: build.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/tools/xsl/build.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- build.xsl	25 Apr 2002 09:34:45 -0000	1.6
  +++ build.xsl	30 Apr 2002 05:09:18 -0000	1.7
  @@ -275,9 +275,14 @@
   
               <target name="jars" depends="compile" description="Builds the project jar
files">
                   <mkdir dir="${{build.lib}}"/>
  -                <xsl:apply-templates select="build/jar|build/antlib"/>
  +
  +                <xsl:for-each select="build/jar|build/antlib">
  +                    <antcall target="jar-{id}"/>
  +                </xsl:for-each>
               </target>
   
  +            <xsl:apply-templates select="build/jar|build/antlib"/>
  +
               <target name="javadocs" description="Generates the javadocs">
                   <xsl:if test="build/sourceDirectory">
                       <mkdir dir="${{dist.javadocs}}"/>
  @@ -380,56 +385,65 @@
               <xsl:for-each select="attribute"><xsl:value-of select="@name"/>:
<xsl:value-of select="@value"/></xsl:for-each>
           </redirect:write>
   
  -        <mkdir dir="${{build.conf}}/{id}"/>
  +        <target name="jar-{id}" depends="jar-{id}-prepare, jar-{id}-descriptors, jar-{id}-package"/>
  +
  +        <target name="jar-{id}-prepare">
  +            <mkdir dir="${{build.conf}}/{id}"/>
  +        </target>
  +
  +        <target name="jar-{id}-descriptors" unless="xdoclet.omit">
  +            <!-- Generate the descriptors -->
  +            <xsl:if test="not(includeDescriptors = 'false')">
  +                <xsl:variable name="patterns" select="patternset"/>
  +                <antlib-descriptor
  +                    destdir="${{build.conf}}/{id}"
  +                    libName="{id}"
  +                    descriptorName="ant-descriptor.xml"
  +                    rolesDescriptorName="ant-roles.xml">
  +                    <xsl:for-each select="../sourceDirectory">
  +                        <fileset dir="{.}">
  +                            <patternset refid="project.compile.patternset"/>
  +                            <xsl:copy-of select="$patterns"/>
  +                        </fileset>
  +                    </xsl:for-each>
  +                    <classpath refid="xdoclet.class.path"/>
  +                    <classpath refid="compile.class.path"/>
  +                    <classpath path="${{java.class.path}}"/>
  +                </antlib-descriptor>
  +            </xsl:if>
  +        </target>
  +
  +        <target name="jar-{id}-package">
  +            <copy todir="${{build.conf}}/{id}" file="../LICENSE.txt"/>
  +
  +            <xsl:variable name="jarName">
  +                <xsl:choose>
  +                    <xsl:when test="name">
  +                        <xsl:value-of select="name"/>
  +                    </xsl:when>
  +                    <xsl:when test="self::antlib">
  +                        <!-- Don't include version info in antlib name, since
  +                             name is currently used to locate the antlib when
  +                             importing. -->
  +                        <xsl:value-of select="concat(id, '.atl')"/>
  +                    </xsl:when>
  +                    <xsl:otherwise>
  +                        <xsl:value-of select="concat(id, '-', /project/currentVersion,
'.jar')"/>
  +                    </xsl:otherwise>
  +                </xsl:choose>
  +            </xsl:variable>
  +
  +            <jar jarfile="${{build.lib}}/{$jarName}"
  +                basedir="${{build.classes}}"
  +                compress="${{build.compress}}"
  +                manifest="${{build.dir}}/conf/{id}/manifest.mf">
  +                <metainf dir="${{build.conf}}/{id}" excludes="manifest.mf"/>
  +                <xsl:copy-of select="patternset"/>
  +                <xsl:copy-of select="fileset"/>
  +                <xsl:copy-of select="metainf"/>
  +            </jar>
  +        </target>
   
  -        <!-- Generate the descriptors -->
  -        <xsl:if test="not(includeDescriptors = 'false')">
  -            <xsl:variable name="patterns" select="patternset"/>
  -            <antlib-descriptor
  -                destdir="${{build.conf}}/{id}"
  -                libName="{id}"
  -                descriptorName="ant-descriptor.xml"
  -                rolesDescriptorName="ant-roles.xml">
  -                <xsl:for-each select="../sourceDirectory">
  -                    <fileset dir="{.}">
  -                        <patternset refid="project.compile.patternset"/>
  -                        <xsl:copy-of select="$patterns"/>
  -                    </fileset>
  -                </xsl:for-each>
  -                <classpath refid="xdoclet.class.path"/>
  -                <classpath refid="compile.class.path"/>
  -                <classpath path="${{java.class.path}}"/>
  -            </antlib-descriptor>
  -        </xsl:if>
  -
  -        <copy todir="${{build.conf}}/{id}" file="../LICENSE.txt"/>
  -
  -        <xsl:variable name="jarName">
  -            <xsl:choose>
  -                <xsl:when test="name">
  -                    <xsl:value-of select="name"/>
  -                </xsl:when>
  -                <xsl:when test="self::antlib">
  -                    <!-- Don't include version info in antlib name, since
  -                         name is currently used to locate the antlib when
  -                         importing. -->
  -                    <xsl:value-of select="concat(id, '.atl')"/>
  -                </xsl:when>
  -                <xsl:otherwise>
  -                    <xsl:value-of select="concat(id, '-', /project/currentVersion, '.jar')"/>
  -                </xsl:otherwise>
  -            </xsl:choose>
  -        </xsl:variable>
  -
  -        <jar jarfile="${{build.lib}}/{$jarName}"
  -            basedir="${{build.classes}}"
  -            compress="${{build.compress}}"
  -            manifest="${{build.dir}}/conf/{id}/manifest.mf">
  -            <metainf dir="${{build.conf}}/{id}" excludes="manifest.mf"/>
  -            <xsl:copy-of select="patternset"/>
  -            <xsl:copy-of select="fileset"/>
  -            <xsl:copy-of select="metainf"/>
  -        </jar>
       </xsl:template>
   
       <xsl:template match="extension">
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message