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.dvsl ant-descriptor.j ant-roles.j
Date Mon, 15 Apr 2002 09:55:45 GMT
adammurdoch    02/04/15 02:55:45

  Modified:    .        build.xml
               api      project.xml
               aut      project.xml
               src/stylesheets build.dvsl
  Added:       buildtools project.xml
               buildtools/src/java/org/apache/myrmidon/build
                        ant-descriptor.j ant-roles.j
               container project.xml
  Removed:     src/stylesheets ant-descriptor.j ant-roles.j
  Log:
  Build changes:
  
  * Can produce more than one jar per project, using the <jar> element.
  * Uses the tasks from buildtools to generate the project descriptors.
  * Moved <sourceDirectory> up one level to be child of <build>.
  * Added project.xml to buildtools and container.
  
  Revision  Changes    Path
  1.3       +2 -0      jakarta-ant-myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml	14 Apr 2002 11:43:06 -0000	1.2
  +++ build.xml	15 Apr 2002 09:55:44 -0000	1.3
  @@ -17,8 +17,10 @@
             </classpath>
           </taskdef>
   
  +        <dvsl in="buildtools/project.xml" out="buildtools/sample-build.xml" style="src/stylesheets/build.dvsl"/>
           <dvsl in="api/project.xml" out="api/sample-build.xml" style="src/stylesheets/build.dvsl"/>
           <dvsl in="aut/project.xml" out="aut/sample-build.xml" style="src/stylesheets/build.dvsl"/>
  +        <dvsl in="container/project.xml" out="container/sample-build.xml" style="src/stylesheets/build.dvsl"/>
       </target>
   
   </project>
  
  
  
  1.2       +6 -6      jakarta-ant-myrmidon/api/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	14 Apr 2002 07:41:00 -0000	1.1
  +++ project.xml	15 Apr 2002 09:55:44 -0000	1.2
  @@ -18,9 +18,7 @@
   
       <!-- Build details -->
       <build>
  -        <sourceDirectories>
  -            <sourceDirectory>src/java</sourceDirectory>
  -        </sourceDirectories>
  +        <sourceDirectory>src/java</sourceDirectory>
   
           <!-- Project classpath -->
           <classpath>
  @@ -29,8 +27,10 @@
               </fileset>
           </classpath>
   
  -        <!-- prepare tasks -->
  -        <prepare>
  -        </prepare>
  +        <!-- The jar to build -->
  +        <jar>
  +            <id>myrmidon-api</id>
  +        </jar>
  +
       </build>
   </project>
  
  
  
  1.2       +6 -3      jakarta-ant-myrmidon/aut/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	14 Apr 2002 07:41:00 -0000	1.1
  +++ project.xml	15 Apr 2002 09:55:44 -0000	1.2
  @@ -16,9 +16,7 @@
   
       <!-- Build details -->
       <build>
  -        <sourceDirectories>
  -            <sourceDirectory>src/java</sourceDirectory>
  -        </sourceDirectories>
  +        <sourceDirectory>src/java</sourceDirectory>
   
           <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
   
  @@ -36,6 +34,11 @@
               <exclude name="org/apache/aut/vfs/provider/ftp/**/*.java"
                        unless="netcomp.present" />
           </compilePatterns>
  +
  +        <!-- The jar to build -->
  +        <jar>
  +            <id>myrmidon-aut</id>
  +        </jar>
   
           <!-- Patterns for including/excluding unit tests -->
           <unitTestPatterns>
  
  
  
  1.1                  jakarta-ant-myrmidon/buildtools/project.xml
  
  Index: project.xml
  ===================================================================
  <project>
      <name>Myrmidon Build Tools</name>
      <id>myrmidon-buildtools</id>
      <currentVersion>1.0</currentVersion>
      <inceptionYear>2000-2002</inceptionYear>
  
      <build>
          <sourceDirectory>src/java</sourceDirectory>
          <classpath>
              <fileset dir="../tools/xdoclet" includes="*.jar"/>
          </classpath>
          <generateDescriptors>false</generateDescriptors>
          <jar>
              <id>myrmidon-buildtools</id>
          </jar>
      </build>
  
  </project>
  
  
  1.1                  jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/ant-descriptor.j
  
  Index: ant-descriptor.j
  ===================================================================
  <ant-lib version="1.0">
  
    <types>
  
      <XDtClass:forAllClasses type="org.apache.myrmidon.api.Task" extent="hierarchy">
        <XDtClass:ifHasClassTag tagName="ant.task">
          <task name="<XDtClass:classTagValue tagName="ant.task" paramName="name"/>"
                classname="<XDtClass:fullClassName/>"/>
        </XDtClass:ifHasClassTag>
      </XDtClass:forAllClasses>
  
      <XDtClass:forAllClasses type="org.apache.myrmidon.framework.DataType" extent="hierarchy">
        <XDtClass:ifHasClassTag tagName="ant.data-type">
          <data-type name="<XDtClass:classTagValue tagName="ant.data-type" paramName="name"/>"
                classname="<XDtClass:fullClassName/>"/>
          <task name="<XDtClass:classTagValue tagName="ant.data-type" paramName="name"/>"
                classname="org.apache.myrmidon.framework.TypeInstanceTask"/>
        </XDtClass:ifHasClassTag>
      </XDtClass:forAllClasses>
  
      <XDtClass:forAllClasses extent="concrete-type">
        <XDtClass:forAllClassTags tagName="ant.type" superclasses="false">
          <<XDtClass:classTagValue tagName="ant.type" paramName="type" superclasses="false"/>
            name="<XDtClass:classTagValue tagName="ant.type" paramName="name" superclasses="false"/>"
            classname="<XDtClass:fullClassName/>" />
        </XDtClass:forAllClassTags>
      </XDtClass:forAllClasses>
  
      <XDtClass:forAllClasses type="org.apache.aut.converter.Converter">
        <XDtClass:ifHasClassTag tagName="ant.converter">
          <converter classname="<XDtClass:fullClassName/>"
                     source="<XDtClass:classTagValue tagName="ant.converter" paramName="source"/>"
                     destination="<XDtClass:classTagValue tagName="ant.converter" paramName="destination"/>"/>
        </XDtClass:ifHasClassTag>
      </XDtClass:forAllClasses>
  
    </types>
  
  </ant-lib>
  
  
  
  1.1                  jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/ant-roles.j
  
  Index: ant-roles.j
  ===================================================================
  <roles version="1.0">
      <XDtClass:forAllClasses abstract="true">
        <XDtClass:ifHasClassTag tagName="ant:role" superclasses="false">
          <role shorthand="<XDtClass:classTagValue tagName="ant:role" paramName="shorthand"/>"
                name="<XDtClass:fullClassName/>"/>
        </XDtClass:ifHasClassTag>
      </XDtClass:forAllClasses>
  </roles>
  
  
  
  1.1                  jakarta-ant-myrmidon/container/project.xml
  
  Index: project.xml
  ===================================================================
  <project>
      <name>Myrmidon Container</name>
      <id>myrmidon-container</id>
      <currentVersion>1.0</currentVersion>
      <inceptionYear>2000-2002</inceptionYear>
  
      <package>org.apache.myrmidon</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"/>
          </classpath>
  
          <jar>
              <id>myrmidon-container</id>
              <patterns>
                  <exclude name="org/apache/myrmidon/launcher/**" />
                  <exclude name="org/apache/myrmidon/interfaces/**" />
              </patterns>
          </jar>
          <jar>
              <id>myrmidon-container-api</id>
              <patterns>
                  <include name="org/apache/myrmidon/interfaces/**" />
              </patterns>
          </jar>
          <jar>
              <id>myrmidon-launcher</id>
              <patterns>
                  <include name="org/apache/myrmidon/launcher/**" />
              </patterns>
          </jar>
  
      </build>
  </project>
  
  
  1.2       +83 -65    jakarta-ant-myrmidon/src/stylesheets/build.dvsl
  
  Index: build.dvsl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/src/stylesheets/build.dvsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.dvsl	14 Apr 2002 07:39:32 -0000	1.1
  +++ build.dvsl	15 Apr 2002 09:55:45 -0000	1.2
  @@ -4,6 +4,11 @@
   ## an ant1 build file for that project.
   ##
   
  +
  +##
  +## The root project node
  +##
  +
   #match ( "/project" )
   <?xml version="1.0"?>
   <!-- This is a generated file.  Do not edit. -->
  @@ -63,12 +68,25 @@
   
   #match ( "build" )
   
  +    #if ( ! $node.get( "generateDescriptors" ) || $node.get( "generateDescriptors" ).value()
!= "false" )
  +    #set ( $genDescriptors = true )
  +    #end
  +    #set ( $srcDirs = $node.selectNodes( "sourceDirectory" ) )
  +
       <path id="project.class.path">
           $context.applyTemplates( "classpath/*" )
       </path>
       <path id="xdoclet.class.path">
           <fileset dir="${tools.dir}/xdoclet" includes="*.jar"/>
       </path>
  +    <path id="project.source.path">
  +    #foreach ( $srcdir in $srcDirs )
  +        <pathelement location="$srcdir.value()"/>
  +    #end
  +    </path>
  +    <patternset id="project.compile.patternset">
  +        $context.applyTemplates( "compilePatterns/*" )
  +    </patternset>
   
       <target name="main" depends="jars" description="Builds the project jars" />
       <target name="rebuild" depends="clean, main" description="Rebuilds the project jars"
/>
  @@ -89,10 +107,15 @@
       <target name="prepare">
           <available property="junit.present"
                      classname="junit.framework.TestCase"/>
  -        <taskdef name="xdoclet"
  -                 classname="xdoclet.DocletTask">
  -            <classpath refid="xdoclet.class.path"/>
  +        #if ( $genDescriptors )
  +        <taskdef name="antlib-descriptor"
  +                 classname="org.apache.myrmidon.build.AntlibDescriptorTask">
  +            <classpath>
  +                <path refid="xdoclet.class.path"/>
  +                <fileset dir="../buildtools/build/lib" includes="*.jar"/>
  +            </classpath>
           </taskdef>
  +        #end
   
           <!-- Custom tasks -->
           $context.applyTemplates( "prepare/*" )
  @@ -109,15 +132,13 @@
               deprecation="${build.deprecation}"
               target="1.2">
               <classpath refid="project.class.path"/>
  -            #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory"
) )
  -                <src location="$srcdir.value()"/>
  -            #end
  -            $context.applyTemplates( "compilePatterns/*" )
  +            <src refid="project.source.path"/>
  +            <patternset refid="project.compile.patternset"/>
           </javac>
   
           <!-- copy resources to same location as .class files -->
           <copy todir="${build.classes}">
  -            #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory"
) )
  +            #foreach ( $srcdir in $srcDirs )
                   <fileset dir="$srcdir">
                       <exclude name="**/*.java"/>
                   </fileset>
  @@ -146,7 +167,7 @@
               <classpath location="${build.classes}"/>
               <classpath refid="project.class.path"/>
               <src location="$testdir.value()"/>
  -            $context.applyTemplates( "compilePatterns/*" )
  +            <patternset refid="project.compile.patternset"/>
           </javac>
   
           <!-- copy resources to same location as .class files -->
  @@ -197,60 +218,9 @@
   
       #end
   
  -    <target name="descriptors-uptodate">
  -        <uptodate property="descriptors.uptodate"
  -                  targetfile="${build.conf}/ant-descriptor.xml">
  -        #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory" )
)
  -            <srcfiles dir="$srcdir">
  -            $context.applyTemplates( "compilePatterns/*" )
  -            </srcfiles>
  -        #end
  -        </uptodate>
  -    </target>
  -
  -    <target name="descriptors" depends="prepare, descriptors-uptodate" unless="descriptors.uptodate">
  -        <xdoclet destdir="${build.conf}">
  -        #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory" )
)
  -            <sourcepath location="$srcdir"/>
  -            <fileset dir="$srcdir">
  -            $context.applyTemplates( "compilePatterns/*" )
  -            </fileset>
  -        #end
  -            <classpath refid="xdoclet.class.path"/>
  -            <classpath refid="project.class.path"/>
  -            <classpath path="${java.class.path}"/>
  -            <template templateFile="${stylesheet.dir}/ant-descriptor.j"
  -                      destinationFile="ant-descriptor.xml"/>
  -            <template templateFile="${stylesheet.dir}/ant-roles.j"
  -                      destinationFile="ant-roles.xml"/>
  -        </xdoclet>
  -    </target>
  -
  -    <target name="prepare-conf" depends="descriptors">
  -        <mkdir dir="${build.conf}"/>
  -        <copy todir="${build.conf}" flatten="true">
  -            <fileset dir=".." includes="LICENSE.txt"/>
  -            <fileset dir="src/conf" includes="MANIFEST.MF"/>
  -            <filterset>
  -                <filter token="id" value="$id"/>
  -                <filter token="name" value="$name"/>
  -                <filter token="version" value="$version"/>
  -            </filterset>
  -        </copy>
  -    </target>
  -
  -    <target name="jars" depends="compile, prepare-conf" description="Builds the project
jars">
  +    <target name="jars" depends="compile" description="Builds the project jars">
           <mkdir dir="${build.lib}"/>
  -
  -        <jar jarfile="${build.lib}/${distname}.jar"
  -            basedir="${build.classes}"
  -            compress="${build.compress}"
  -            manifest="${build.conf}/MANIFEST.MF">
  -            <metainf dir="${build.conf}">
  -                <include name="LICENSE.txt"/>
  -                <include name="*.xml"/>
  -            </metainf>
  -        </jar>
  +        $context.applyTemplates( "jar" )
       </target>
   
       <target name="javadocs" description="Generates the javadocs">
  @@ -259,9 +229,7 @@
           <javadoc
               destdir="${dist.javadocs}">
               <classpath refid="project.class.path" />
  -            #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory"
) )
  -            <sourcepath location="$srcdir"/>
  -            #end
  +            <sourcepath refid="project.source.path" />
               #foreach ( $package in $packages )
               <package name="${package.value()}.*"/>
               #end
  @@ -320,6 +288,56 @@
           -->
       </target>
   
  +#end
  +
  +#match ( "jar" )
  +    #set ( $metainfDir = "${build.conf}/${node.id}" )
  +
  +    <mkdir dir="$metainfDir"/>
  +
  +    #if ( $genDescriptors )
  +
  +    <antlib-descriptor
  +        destdir="$metainfDir"
  +        libName="$node.id"
  +        descriptorName="ant-descriptor.xml"
  +        rolesDescriptorName="ant-roles.xml">
  +    #foreach ( $srcdir in $srcDirs )
  +        <fileset dir="$srcdir">
  +            <patternset refid="project.compile.patternset"/>
  +            <patternset>
  +                $context.applyTemplates( "patterns/*" )
  +            </patternset>
  +        </fileset>
  +    #end
  +        <classpath refid="xdoclet.class.path"/>
  +        <classpath refid="project.class.path"/>
  +        <classpath path="${java.class.path}"/>
  +    </antlib-descriptor>
  +
  +    #end
  +
  +    <copy todir="$metainfDir" flatten="true">
  +        <fileset dir=".." includes="LICENSE.txt"/>
  +        <fileset dir="src/conf" includes="MANIFEST.MF"/>
  +        <filterset>
  +            <filter token="id" value="$node.id"/>
  +            <filter token="name" value="$name"/>
  +            <filter token="version" value="$version"/>
  +        </filterset>
  +    </copy>
  +
  +    <jar jarfile="${build.lib}/${node.id}-${version}.jar"
  +        basedir="${build.classes}"
  +        compress="${build.compress}"
  +        manifest="${metainfDir}/MANIFEST.MF">
  +        <metainf dir="$metainfDir">
  +            <exclude name="MANIFEST.MF"/>
  +        </metainf>
  +        <patternset>
  +            $context.applyTemplates( "patterns/*" )
  +        </patternset>
  +    </jar>
   #end
   
   #match ( "*" )
  
  
  

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