ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/src/stylesheets build.xsl
Date Wed, 17 Apr 2002 07:23:54 GMT
adammurdoch    02/04/17 00:23:54

  Modified:    .        build.xml
               buildtools project.xml
               src/stylesheets build.xsl
  Added:       ant1compat project.xml
               antlib   project.xml
               framework project.xml
  Log:
  More project descriptor changes:
  
  * Added an <antlib> element - works the same as <jar>.
  
  * Added <depends> element to allow dependency info to be included in the
    manifests.
  
  * Added <ant-runtime> element, to explicitly request that the ant runtime
    be included when compiling.  Default is false.
  
  * Added descriptors for framework, antlibs, and ant1compat (doesn't compile yet).
  
  Revision  Changes    Path
  1.5       +60 -0     jakarta-ant-myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml	16 Apr 2002 11:10:24 -0000	1.4
  +++ build.xml	17 Apr 2002 07:23:53 -0000	1.5
  @@ -25,6 +25,66 @@
                  out="container/sample-build.xml"
                  style="src/stylesheets/build.xsl"
                  processor="trax" />
  +        <style in="framework/project.xml"
  +               out="framework/sample-build.xml"
  +               style="src/stylesheets/build.xsl"
  +               processor="trax" />
  +        <style in="antlib/project.xml"
  +               out="antlib/sample-build.xml"
  +               style="src/stylesheets/build.xsl"
  +               processor="trax" />
  +        <style in="ant1compat/project.xml"
  +               out="ant1compat/sample-build.xml"
  +               style="src/stylesheets/build.xsl"
  +               processor="trax" />
  +    </target>
  +
  +    <target name="build-projects" description="Builds all of the projects">
  +        <antcall target="for-all-projects">
  +            <param name="target" value="main"/>
  +        </antcall>
  +    </target>
  +    <target name="rebuild-projects" description="Rebuilds all of the projects">
  +        <antcall target="for-all-projects">
  +            <param name="target" value="rebuild"/>
  +        </antcall>
  +    </target>
  +    <target name="test-projects" description="Runs unit tests for all of the projects">
  +        <antcall target="for-all-projects">
  +            <param name="target" value="test"/>
  +        </antcall>
  +    </target>
  +
  +    <target name="for-all-projects">
  +        <antcall target="call-project-target">
  +            <param name="project" value="buildtools"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="api"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="aut"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="container"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="framework"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="antlib"/>
  +        </antcall>
  +        <antcall target="call-project-target">
  +            <param name="project" value="ant1compat"/>
  +        </antcall>
  +    </target>
  +
  +    <target name="call-project-target">
  +        <style in="${project}/project.xml"
  +               out="${project}/sample-build.xml"
  +               style="src/stylesheets/build.xsl"
  +               processor="trax" />
  +        <ant dir="${project}" antfile="sample-build.xml" target="${target}"/>
       </target>
   
   </project>
  
  
  
  1.1                  jakarta-ant-myrmidon/ant1compat/project.xml
  
  Index: project.xml
  ===================================================================
  <project>
      <name>Myrmidon Ant1 Compatibility</name>
      <id>myrmidon-ant1-compat</id>
      <currentVersion>1.0</currentVersion>
      <inceptionYear>2002</inceptionYear>
      <package>org.apache.tools.ant</package>
  
      <build>
          <sourceDirectory>src/java</sourceDirectory>
          <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  
          <classpath>
              <fileset dir="../lib" includes="*.jar"/>
              <fileset dir="../api/build/lib" includes="*.jar"/>
              <fileset dir="../aut/build/lib" includes="*.jar"/>
              <fileset dir="../container/build/lib" includes="*api*.jar"/>
          </classpath>
  
          <antlib>
              <id>myrmidon-ant1-compat</id>
              <depends>
                  <extension extension-name="com.sun.tools"
                             specification-version="1.0"/>
              </depends>
          </antlib>
      </build>
  </project>
  
  
  1.1                  jakarta-ant-myrmidon/antlib/project.xml
  
  Index: project.xml
  ===================================================================
  <project>
      <name>Myrmidon Task Libraries</name>
      <id>myrmidon-antlibs</id>
      <currentVersion>1.0</currentVersion>
      <inceptionYear>2000-2002</inceptionYear>
      <package>org.apache.antlib</package>
  
      <build>
          <sourceDirectory>src/java</sourceDirectory>
          <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  
          <classpath>
              <fileset dir="../lib" includes="**/*.jar"/>
              <fileset dir="../api/build/lib" includes="*.jar"/>
              <fileset dir="../aut/build/lib" includes="*.jar"/>
              <fileset dir="../framework/build/lib" includes="*.jar"/>
              <fileset dir="../container/build/lib" includes="*api*.jar"/>
          </classpath>
  
          <antlib>
              <id>archive</id>
              <patterns>
                  <include name="org/apache/antlib/archive/**"/>
              </patterns>
              <depends>
                  <extension extension-name="excalibur-bzip2"/>
              </depends>
          </antlib>
          <antlib>
              <id>build</id>
              <patterns>
                  <include name="org/apache/antlib/build/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>core</id>
              <patterns>
                  <include name="org/apache/antlib/core/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>cvslib</id>
              <patterns>
                  <include name="org/apache/antlib/cvslib/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>dotnet</id>
              <patterns>
                  <include name="org/apache/antlib/dotnet/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>extensions</id>
              <patterns>
                  <include name="org/apache/antlib/extensions/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>file</id>
              <patterns>
                  <include name="org/apache/antlib/file/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>java</id>
              <patterns>
                  <include name="org/apache/antlib/java/**"/>
              </patterns>
              <depends>
                  <extension extension-name="com.sun.tools"
                             specification-version="1.0"/>
              </depends>
          </antlib>
          <antlib>
              <id>nativelib</id>
              <patterns>
                  <include name="org/apache/antlib/nativelib/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>runtime</id>
              <patterns>
                  <include name="org/apache/antlib/runtime/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>security</id>
              <patterns>
                  <include name="org/apache/antlib/security/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>selftest</id>
              <patterns>
                  <include name="org/apache/antlib/selftest/**"/>
              </patterns>
              <depends>
                  <extension extension-name="myrmidon.test.extension"
                             specification-version="1.0"
                             implementation-version="1.0.2"
                             implementation-vendor-id="org.apache.avalon"/>
              </depends>
          </antlib>
          <jar>
              <id>selftest-extension1</id>
              <extension extension-name="myrmidon.test.extension"
                         specification-version="1.0"
                         implementation-version="1.0.2"
                         implementation-vendor-id="org.apache.avalon"/>
              <patterns>
                  <include name="org/apache/antlib/security/**"/>
              </patterns>
          </jar>
          <antlib>
              <id>vfile</id>
              <patterns>
                  <include name="org/apache/antlib/vfile/**"/>
              </patterns>
          </antlib>
          <antlib>
              <id>xml</id>
              <patterns>
                  <include name="org/apache/antlib/xml/**"/>
              </patterns>
          </antlib>
      </build>
  </project>
  
  
  1.3       +1 -0      jakarta-ant-myrmidon/buildtools/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/buildtools/project.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- project.xml	16 Apr 2002 11:10:25 -0000	1.2
  +++ project.xml	17 Apr 2002 07:23:53 -0000	1.3
  @@ -8,6 +8,7 @@
       <build>
           <sourceDirectory>src/java</sourceDirectory>
           <classpath>
  +            <ant-runtime/>
               <fileset dir="../tools/xdoclet" includes="*.jar"/>
           </classpath>
           <jar>
  
  
  
  1.1                  jakarta-ant-myrmidon/framework/project.xml
  
  Index: project.xml
  ===================================================================
  <project>
      <name>Myrmidon Task Framework</name>
      <id>myrmidon-framework</id>
      <currentVersion>1.0</currentVersion>
      <inceptionYear>2000-2002</inceptionYear>
      <package>org.apache.myrmidon.framework</package>
      <package>org.apache.tools.todo</package>
  
      <build>
          <sourceDirectory>src/java</sourceDirectory>
          <sourceDirectory>src/todo</sourceDirectory>
          <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  
          <classpath>
              <ant-runtime/>
              <fileset dir="../lib" includes="**/*.jar"/>
              <fileset dir="../aut/build/lib" includes="*.jar"/>
              <fileset dir="../api/build/lib" includes="*.jar"/>
              <fileset dir="../container/build/lib" includes="*api*.jar"/>
          </classpath>
  
          <prepare>
              <available property="netcomp.present"
                  classname="com.oroinc.net.ftp.FTPClient"
                  classpathref="project.class.path" />
              <available property="jaf.present"
                  classname="javax.activation.DataHandler"
                  classpathref="project.class.path" />
              <available property="mail.present"
                  classname="javax.mail.internet.MimeBodyPart"
                  classpathref="project.class.path" />
              <available property="bcel.present"
                  classname="org.apache.bcel.classfile.ClassParser"
                  classpathref="project.class.path" />
              <available property="netrexx.present"
                  classname="netrexx.lang.Rexx"
                  classpathref="project.class.path" />
              <available property="bsf.present"
                  classname="com.ibm.bsf.BSFException"
                  classpathref="project.class.path" />
              <available property="jdepend.present"
                  classname="jdepend.textui.JDepend"
                  classpathref="project.class.path" />
              <available property="xalan.present"
                  classname="org.apache.xalan.xslt.XSLTProcessorFactory"
                  classpathref="project.class.path" />
              <available property="icontract.present"
                  classname="com.reliablesystems.iContract.IContracted"
                  classpathref="project.class.path"/>
              <available property="stylebook.present"
                  classname="org.apache.stylebook.Engine"
                  classpathref="project.class.path"/>
          </prepare>
  
          <compilePatterns>
              <exclude name="org/apache/tools/todo/taskdefs/net/*"
                       unless="netcomp.present" />
              <exclude name="org/apache/tools/todo/taskdefs/net/MimeMail.*"
                       unless="javamail.present" />
              <exclude name="org/apache/tools/todo/util/depend/Dependencies.*"
                       unless="bcel.present" />
              <exclude name="org/apache/tools/todo/taskdefs/NetRexxC.*"
                       unless="netrexx.present" />
              <exclude name="org/apache/tools/todo/taskdefs/Script.*"
                       unless="bsf.present" />
              <exclude name="org/apache/tools/todo/util/regexp/Jakarta*"
                       unless="regexp.present" />
              <exclude name="org/apache/tools/todo/util/regexp/Jdk14*"
                       unless="jdk14.present" />
              <exclude name="org/apache/tools/todo/taskdefs/jdepend/JDependTask.*"
                       unless="jdepend.present" />
              <exclude name="org/apache/tools/todo/taskdefs/IContract.*"
                       unless="icontract.present"/>
              <exclude name="org/apache/tools/todo/taskdefs/stylebook/StyleBook.*"
                       unless="stylebook.present"/>
              <exclude name="org/apache/tools/todo/taskdefs/junit/Xalan1Executor.*"
                       unless="xalan.present"/>
          </compilePatterns>
  
          <jar>
              <id>myrmidon-framework</id>
              <extension extension-name="myrmidon.framework"
                         specification-version="1.0"
                         implementation-version="1.0"/>
              <patterns>
                  <include name="org/apache/myrmidon/framework/**"/>
              </patterns>
          </jar>
  
          <jar>
              <id>myrmidon-ant1-todo</id>
              <patterns>
                  <include name="org/apache/tools/todo/**"/>
              </patterns>
          </jar>
      </build>
  </project>
  
  
  1.2       +58 -27    jakarta-ant-myrmidon/src/stylesheets/build.xsl
  
  Index: build.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/src/stylesheets/build.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xsl	16 Apr 2002 11:10:25 -0000	1.1
  +++ build.xsl	17 Apr 2002 07:23:54 -0000	1.2
  @@ -8,25 +8,23 @@
           <xsl:comment>This is a generated file - do not edit.</xsl:comment>
           <project name="{name}" default="main">
   
  -            <xsl:comment>
  -Give user a chance to override without editing this file (and without
  -typing -D each time he compiles it)
  -</xsl:comment>
  +            <!-- Give user a chance to override without editing this file (and without
  +                 typing -D each time he compiles it) -->
               <property file="ant.properties"/>
               <property file="../ant.properties"/>
               <property file="${{user.home}}/.ant.properties"/>
   
  -            <xsl:comment>External resources</xsl:comment>
  +            <!-- External resources -->
               <property name="stylesheet.dir" value="../src/stylesheets"/>
               <property name="tools.dir" value="../tools"/>
   
  -            <xsl:comment>Settings used to configure compile environment</xsl:comment>
  +            <!-- Settings used to configure compile environment -->
               <property name="build.debug" value="on"/>
               <property name="build.optimize" value="off"/>
               <property name="build.deprecation" value="off"/>
               <property name="build.compress" value="false"/>
   
  -            <xsl:comment>Location of intermediate products</xsl:comment>
  +            <!--Location of intermediate products-->
               <property name="build.dir" value="build"/>
               <property name="build.lib" value="${{build.dir}}/lib"/>
               <property name="build.conf" value="${{build.dir}}/conf"/>
  @@ -34,21 +32,22 @@
               <property name="build.reports" value="${{build.dir}}/reports"/>
               <property name="build.tests" value="${{build.dir}}/test"/>
   
  -            <xsl:comment>Set the properties for distribution directories</xsl:comment>
  +            <!--Set the properties for distribution directories-->
               <property name="dist.dir" value="dist"/>
               <property name="dist.javadocs" value="${{dist.dir}}/docs/api"/>
   
  -            <xsl:comment>property indicating directory where all distribution archives
are placed</xsl:comment>
  +            <!--property indicating directory where all distribution archives are placed-->
               <property name="dist.base" value="distributions"/>
   
  -            <xsl:comment>Properties for running the unit tests</xsl:comment>
  +            <!--Properties for running the unit tests-->
               <property name="test.classes" value="${{build.tests}}/classes"/>
               <property name="junit.fork" value="false"/>
               <property name="junit.failonerror" value="true"/>
               <property name="single.test" value="*"/>
   
  +            <!-- Various paths and patternsets -->
               <path id="project.class.path">
  -                <xsl:copy-of select="build/classpath/*"/>
  +                <xsl:copy-of select="build/classpath/*[name() != 'ant-runtime']"/>
               </path>
               <path id="xdoclet.class.path">
                   <fileset dir="${{tools.dir}}/xdoclet" includes="*.jar"/>
  @@ -81,7 +80,11 @@
               <target name="prepare">
                   <available property="junit.present"
                              classname="junit.framework.TestCase"/>
  -                <xsl:if test="not(build/jar/includeDescriptors[. = 'false'])" >
  +                <available property="jdk1.2+" classname="java.lang.ThreadLocal" />
  +                <available property="jdk1.3+" classname="java.lang.StrictMath" />
  +                <available property="jdk1.4+" classname="java.lang.CharSequence" />
  +
  +                <xsl:if test="build/antlib|build/jar[not(includeDescriptors = 'false')]"
>
                       <taskdef name="antlib-descriptor"
                           classname="org.apache.myrmidon.build.AntlibDescriptorTask">
                           <classpath>
  @@ -105,11 +108,15 @@
                       optimize="${{build.optimize}}"
                       deprecation="${{build.deprecation}}"
                       target="1.2">
  +                    <xsl:if test="not(build/classpath/ant-runtime)">
  +                        <xsl:attribute name="includeAntRuntime">false</xsl:attribute>
  +                    </xsl:if>
                       <classpath refid="project.class.path"/>
                       <src refid="project.source.path"/>
                       <patternset refid="project.compile.patternset"/>
                   </javac>
   
  +
                   <!-- copy resources to same location as .class files -->
                   <copy todir="${{build.classes}}">
                       <xsl:for-each select="build/sourceDirectory">
  @@ -190,7 +197,7 @@
                       <xsl:attribute name="depends">compile-src, compile-tests</xsl:attribute>
                   </xsl:if>
                   <mkdir dir="${{build.lib}}"/>
  -                <xsl:apply-templates select="build/jar"/>
  +                <xsl:apply-templates select="build/jar|build/antlib"/>
               </target>
   
               <target name="javadocs" description="Generates the javadocs">
  @@ -223,7 +230,7 @@
   
                   <mkdir dir="${{dist.dir}}"/>
                   <copy todir="${{dist.dir}}">
  -                    <fileset dir="${{build.lib}}" includes="*.jar"/>
  +                    <fileset dir="${{build.lib}}" includes="*.jar, *.atl"/>
                       <fileset dir=".." includes="LICENSE.txt, KEYS"/>
                       <fileset dir="." includes="README.txt"/>
                   </copy>
  @@ -267,23 +274,28 @@
           </project>
       </xsl:template>
   
  -    <xsl:template match="jar">
  +    <xsl:template match="jar|antlib">
           <!-- Generate the manifest -->
  -        <redirect:write file="{id}.mf">Manifest-Version: 1.0
  +        <redirect:write file="{id}.mf">
  +            <xsl:text>Manifest-Version: 1.0
   Created-By: Apache Ant Project
  -<xsl:for-each select="extension">Extension-Name: <xsl:value-of select="@extension-name"/>
  -Specification-Vendor: Jakarta Apache Project
  -Specification-Version: <xsl:value-of select="@specification-version"/>
  -Implementation-Vendor: Jakarta Apache Project
  -Implementation-Vendor-Id: org.apache.jakarta
  -Implementation-Version: <xsl:value-of select="@implementation-version"/></xsl:for-each>
  -<xsl:for-each select="attribute"><xsl:value-of select="@name"/>: <xsl:value-of
select="@value"/></xsl:for-each>
  -</redirect:write>
  +</xsl:text>
  +            <xsl:apply-templates select="extension">
  +                <xsl:with-param name="prefix"></xsl:with-param>
  +            </xsl:apply-templates>
  +            <xsl:for-each select="depends/extension[1]">Extension-List: ext1</xsl:for-each>
  +            <xsl:for-each select="depends/extension[position() > 1]">, ext<xsl:value-of
select="position()+1"/></xsl:for-each>
  +            <xsl:for-each select="depends/extension[last()]"><xsl:text>
  +</xsl:text>
  +            </xsl:for-each>
  +            <xsl:apply-templates select="depends/extension" />
  +            <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}"/>
   
           <!-- Generate the descriptors -->
  -        <xsl:if test="not(includeDescriptors[. = 'false'])">
  +        <xsl:if test="name() = 'antlib' or not(includeDescriptors[. = 'false'])">
               <xsl:variable name="patterns">
                   <patternset>
                       <xsl:copy-of select="patterns/*"/>
  @@ -308,7 +320,14 @@
   
           <copy todir="${{build.conf}}/{id}" file="../LICENSE.txt"/>
   
  -        <jar jarfile="${{build.lib}}/{id}-{/project/currentVersion}.jar"
  +        <xsl:variable name="jarExt">
  +            <xsl:choose>
  +                <xsl:when test="name() = 'antlib'">atl</xsl:when>
  +                <xsl:otherwise>jar</xsl:otherwise>
  +            </xsl:choose>
  +        </xsl:variable>
  +
  +        <jar jarfile="${{build.lib}}/{id}-{/project/currentVersion}.{$jarExt}"
               basedir="${{build.classes}}"
               compress="${{build.compress}}"
               manifest="{id}.mf">
  @@ -319,7 +338,19 @@
           </jar>
       </xsl:template>
   
  -    <xsl:template match="text()"></xsl:template>
  +    <xsl:template match="extension">
  +        <xsl:param name="prefix" select="concat( 'ext', position(), '-' )"/>
  +        <!--<xsl:param name="prefix"/>-->
  +<xsl:value-of select="$prefix"/>Extension-Name: <xsl:value-of select="@extension-name"/><xsl:text>
  +</xsl:text><xsl:value-of select="$prefix"/>Specification-Vendor: <xsl:value-of
select="@specification-vendor"/><xsl:text>
  +</xsl:text><xsl:value-of select="$prefix"/>Specification-Version: <xsl:value-of
select="@specification-version"/><xsl:text>
  +</xsl:text><xsl:value-of select="$prefix"/>Implementation-Vendor: <xsl:value-of
select="@implementation-vendor"/><xsl:text>
  +</xsl:text><xsl:value-of select="$prefix"/>Implementation-Vendor-Id: <xsl:value-of
select="@implementation-vendor-id"/><xsl:text>
  +</xsl:text><xsl:value-of select="$prefix"/>Implementation-Version: <xsl:value-of
select="@implementation-version"/><xsl:text>
  +</xsl:text>
  +    </xsl:template>
   
  +    <!-- Chuck all text content -->
  +    <xsl:template match="text()"></xsl:template>
   
   </xsl:stylesheet>
  
  
  

--
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