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 ant-descriptor.j ant-roles.j build.dvsl
Date Sun, 14 Apr 2002 07:39:32 GMT
adammurdoch    02/04/14 00:39:32

  Added:       tools/velocity-dvsl dom4j-1.3.jar velocity-dep-1.3-dev.jar
                        velocity-dvsl-0.43.jar
               tools/xdoclet LICENSE.xdoclet.txt log4j-core.jar xdoclet.jar
               src/stylesheets ant-descriptor.j ant-roles.j build.dvsl
  Log:
  Added a rough prototype of a DVSL stylesheet to transform a project
  descriptor into a build file.
  
  Revision  Changes    Path
  1.1                  jakarta-ant-myrmidon/tools/velocity-dvsl/dom4j-1.3.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/velocity-dvsl/velocity-dep-1.3-dev.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/velocity-dvsl/velocity-dvsl-0.43.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/LICENSE.xdoclet.txt
  
  Index: LICENSE.xdoclet.txt
  ===================================================================
   Copyright (c) 2000-2002, XDoclet team
   All rights reserved.
  
   Redistribution and use in source and binary forms, with or without modification, 
   are permitted provided that the following conditions are met:
  
   Redistributions of source code must retain the above copyright notice, this list 
   of conditions and the following disclaimer.
  
   Redistributions in binary form must reproduce the above copyright notice, this list 
   of conditions and the following disclaimer in the documentation and/or other materials
   provided with the distribution.
  
   Neither the name of the XDoclet team nor the names of its contributors may be used 
   to endorse or promote products derived from this software without specific prior
   written permission.
  
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY 
   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
   OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
   SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,

   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
   TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,

   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/log4j-core.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/xdoclet.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/src/stylesheets/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/src/stylesheets/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/src/stylesheets/build.dvsl
  
  Index: build.dvsl
  ===================================================================
  
  ##
  ## A DVSL stylesheet for transforming a project descriptor (project.xml) into
  ## an ant1 build file for that project.
  ##
  
  #match ( "/project" )
  <?xml version="1.0"?>
  <!-- This is a generated file.  Do not edit. -->
  
      #set ( $name = $node.name.value() )
      #set ( $id = $node.id.value() )
      #set ( $version = $node.currentVersion.value() )
      #set ( $year = $node.inceptionYear.value() )
      #set ( $packages = $node.selectNodes( "package" ) )
      #set ( $distname = "${id}-${version}" )
  
  <project name="$node.name.value()" default="main">
  
      <!--
        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"/>
  
      <!-- External resources -->
      <property name="stylesheet.dir" value="../src/stylesheets"/>
      <property name="tools.dir" value="../tools"/>
  
      <!-- 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"/>
  
      <!-- 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"/>
      <property name="build.classes" value="${build.dir}/classes"/>
      <property name="build.reports" value="${build.dir}/reports"/>
      <property name="build.tests" value="${build.dir}/test"/>
  
      <!-- Set the properties for distribution directories -->
      <property name="dist.dir" value="dist"/>
      <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
  
      <!-- property indicating directory where all distribution archives are placed -->
      <property name="dist.base" value="distributions"/>
  
      <!-- Test directories -->
      <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="*"/>
  
      $context.applyTemplates( "build" )
  
  </project>
  #end
  
  #match ( "build" )
  
      <path id="project.class.path">
          $context.applyTemplates( "classpath/*" )
      </path>
      <path id="xdoclet.class.path">
          <fileset dir="${tools.dir}/xdoclet" includes="*.jar"/>
      </path>
  
      <target name="main" depends="jars" description="Builds the project jars" />
      <target name="rebuild" depends="clean, main" description="Rebuilds the project jars"
/>
  
      <target name="clean" description="Cleans up the project">
          <delete file="checkstyle.cache"/>
          <delete dir="${build.dir}" />
          <delete dir="${dist.dir}" />
          <delete>
              <fileset dir="." includes="**/*~" defaultexcludes="no"/>
          </delete>
      </target>
  
      <target name="real-clean" depends="clean" description="Cleans up the project, including
distributions">
          <delete dir="${dist.base}" />
      </target>
  
      <target name="prepare">
          <available property="junit.present"
                     classname="junit.framework.TestCase"/>
          <taskdef name="xdoclet"
                   classname="xdoclet.DocletTask">
              <classpath refid="xdoclet.class.path"/>
          </taskdef>
  
          <!-- Custom tasks -->
          $context.applyTemplates( "prepare/*" )
      </target>
  
      <target name="compile-src" depends="prepare">
          <mkdir dir="${build.classes}"/>
  
          <!-- Compile all classes -->
          <javac
              destdir="${build.classes}"
              debug="${build.debug}"
              optimize="${build.optimize}"
              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/*" )
          </javac>
  
          <!-- copy resources to same location as .class files -->
          <copy todir="${build.classes}">
              #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory"
) )
                  <fileset dir="$srcdir">
                      <exclude name="**/*.java"/>
                  </fileset>
              #end
          </copy>
      </target>
  
      #if ( $node.get( "unitTestSourceDirectory" ) )
  
      #set ( $testdir = $node.get( "unitTestSourceDirectory" ) )
  
      <target name="warn-no-junit" unless="junit.present">
          <echo>WARNING: Could not find JUnit in the project classpath.  Skipping the
unit tests.</echo>
      </target>
  
      <target name="compile-tests" depends="compile-src, warn-no-junit" if="junit.present">
          <mkdir dir="${test.classes}"/>
  
          <!-- Compile all classes -->
          <javac
              destdir="${test.classes}"
              debug="${build.debug}"
              optimize="${build.optimize}"
              deprecation="${build.deprecation}"
              target="1.2">
              <classpath location="${build.classes}"/>
              <classpath refid="project.class.path"/>
              <src location="$testdir.value()"/>
              $context.applyTemplates( "compilePatterns/*" )
          </javac>
  
          <!-- copy resources to same location as .class files -->
          <copy todir="${test.classes}">
              <fileset dir="$testdir">
                  <exclude name="**/*.java"/>
              </fileset>
          </copy>
      </target>
  
      <target name="compile" depends="compile-src, compile-tests"/>
  
      <target name="test" depends="compile" if="junit.present" description="Runs the unit
tests">
  
          <mkdir dir="${build.tests}"/>
  
          <junit fork="${junit.fork}"
              haltonfailure="${junit.failonerror}"
              printsummary="yes" >
  
              <classpath refid="project.class.path"/>
              <classpath location="${build.classes}"/>
              <classpath location="${test.classes}"/>
  
              <sysproperty key="test.basedir" value="${test.classes}"/>
  
              <formatter type="xml"/>    <!-- xml reports for junitreport -->
              <formatter type="plain"/>  <!-- text reports for humans     -->
  
              <batchtest todir="${build.tests}">
                  <fileset dir="${test.classes}">
                      <include name="**/${single.test}TestCase.class"/>
                      <exclude name="**/Abstract*"/>
                      $context.applyTemplates( " unitTestPatterns/*" )
                  </fileset>
              </batchtest>
          </junit>
  
      </target>
  
      #else
  
      <target name="compile" depends="compile-src"/>
  
      <target name="test">
          <echo>This project has no unit tests.</echo>
      </target>
  
      #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">
          <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>
      </target>
  
      <target name="javadocs" description="Generates the javadocs">
  
          <mkdir dir="${dist.javadocs}"/>
          <javadoc
              destdir="${dist.javadocs}">
              <classpath refid="project.class.path" />
              #foreach ( $srcdir in $node.selectNodes( "sourceDirectories/sourceDirectory"
) )
              <sourcepath location="$srcdir"/>
              #end
              #foreach ( $package in $packages )
              <package name="${package.value()}.*"/>
              #end
              <doclet name="com.sun.tools.doclets.standard.Standard">
                  <param name="-author"/>
                  <param name="-version"/>
                  <param name="-doctitle" value="${name}"/>
                  <param name="-windowtitle" value="${name}"/>
                  <param name="-link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
                  <param name="-link" value="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
                  <param name="-link" value="http://jakarta.apache.org/avalon/api/"/>
                  <param name="-bottom"
                      value="&quot;Copyright &#169; ${year} Apache Jakarta Project.
All Rights Reserved.&quot;"/>
              </doclet>
          </javadoc>
      </target>
  
      <!-- Creates the distribution -->
      <target name="dist"
              depends="jars, test, javadocs"
              description="Creates the distribution">
  
          <mkdir dir="${dist.dir}"/>
          <copy todir="${dist.dir}">
              <fileset dir="${build.lib}" includes="*.jar"/>
              <fileset dir=".." includes="LICENSE.txt, KEYS"/>
              <fileset dir="." includes="README.txt"/>
          </copy>
  
          <mkdir dir="${dist.base}"/>
  
          <zip zipfile="${dist.base}/${distname}-bin.zip" compress="true">
              <zipfileset dir="${dist.dir}" prefix="${distname}"/>
          </zip>
  
          <!--
            Not supported by released ant but when it is we should enable this across
            all of the products
          <tar longfile="gnu" tarfile="${dist.base}/${distname}-bin.tar">
            <tarfileset dir="${dist.dir}"
                        prefix="${distname}"
                        username="ant"
                        group="ant"/>
          </tar>
  
          <gzip zipfile="${dist.base}/${distname}-bin.tar.gz"
                src="${distname}-bin.tar"/>
          <bzip2 zipfile="${dist.base}/${distname}-bin.tar.gz"
                 src="${distname}-bin.tar"/>
  
          <delete file="${dist.base}/${distname}-bin.tar"/>
  
          <checksum fileext=".md5">
            <fileset dir="${dist.base}" />
          </checksum>
          -->
      </target>
  
  #end
  
  #match ( "*" )
  $node.copy()
  #end
  
  
  

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