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 Thu, 18 Apr 2002 13:03:00 GMT
adammurdoch    02/04/18 06:03:00

  Modified:    ant1compat project.xml
               antlib   project.xml
               api      project.xml
               aut      project.xml
               container project.xml
               framework project.xml
               src/stylesheets build.xsl
  Added:       framework/src/conf ant-services.xml
  Removed:     framework/src/conf core-services.xml
  Log:
  More project descriptor changes:
  
  - Separated out the unit test stuff from the build stuff in the descriptor.
  - Renamed a bunch of elements, to make <jar> look more like an ant <jar> task.
  - Support different compile and test class-paths.
  - Generate antlib descriptors for the unit tests.
  - junit is now mandatory, the build fails if it cannot be found.
  
  Revision  Changes    Path
  1.2       +13 -8     jakarta-ant-myrmidon/ant1compat/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	17 Apr 2002 07:23:53 -0000	1.1
  +++ project.xml	18 Apr 2002 13:02:59 -0000	1.2
  @@ -5,23 +5,28 @@
       <inceptionYear>2002</inceptionYear>
       <package>org.apache.tools.ant</package>
   
  +    <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>
  +
       <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>
  +            <includeDescriptors>false</includeDescriptors>
  +            <metainf dir="src/conf" includes="*.xml"/>
               <depends>
                   <extension extension-name="com.sun.tools"
                              specification-version="1.0"/>
               </depends>
           </antlib>
       </build>
  +
  +    <unitTest>
  +        <sourceDirectory>src/test</sourceDirectory>
  +    </unitTest>
   </project>
  
  
  
  1.2       +32 -49    jakarta-ant-myrmidon/antlib/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/antlib/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	17 Apr 2002 07:23:53 -0000	1.1
  +++ project.xml	18 Apr 2002 13:02:59 -0000	1.2
  @@ -5,68 +5,54 @@
       <inceptionYear>2000-2002</inceptionYear>
       <package>org.apache.antlib</package>
   
  +    <classpath>
  +        <fileset dir="../api/build/lib" includes="*.jar"/>
  +        <fileset dir="../aut/build/lib" includes="*.jar"/>
  +        <fileset dir="../framework/build/lib" includes="*.jar"/>
  +    </classpath>
  +
       <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>
  +            <patternset includes="org/apache/antlib/archive/**"/>
               <depends>
                   <extension extension-name="excalibur-bzip2"/>
               </depends>
           </antlib>
           <antlib>
               <id>build</id>
  -            <patterns>
  -                <include name="org/apache/antlib/build/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/build/**"/>
           </antlib>
           <antlib>
               <id>core</id>
  -            <patterns>
  -                <include name="org/apache/antlib/core/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/core/**"/>
           </antlib>
           <antlib>
               <id>cvslib</id>
  -            <patterns>
  -                <include name="org/apache/antlib/cvslib/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/cvslib/**"/>
           </antlib>
           <antlib>
               <id>dotnet</id>
  -            <patterns>
  -                <include name="org/apache/antlib/dotnet/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/dotnet/**"/>
           </antlib>
           <antlib>
               <id>extensions</id>
  -            <patterns>
  -                <include name="org/apache/antlib/extensions/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/extensions/**"/>
           </antlib>
           <antlib>
               <id>file</id>
  -            <patterns>
  -                <include name="org/apache/antlib/file/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/file/**"/>
           </antlib>
           <antlib>
               <id>java</id>
  -            <patterns>
  -                <include name="org/apache/antlib/java/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/java/**"/>
               <depends>
                   <extension extension-name="com.sun.tools"
                              specification-version="1.0"/>
  @@ -74,27 +60,19 @@
           </antlib>
           <antlib>
               <id>nativelib</id>
  -            <patterns>
  -                <include name="org/apache/antlib/nativelib/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/nativelib/**"/>
           </antlib>
           <antlib>
               <id>runtime</id>
  -            <patterns>
  -                <include name="org/apache/antlib/runtime/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/runtime/**"/>
           </antlib>
           <antlib>
               <id>security</id>
  -            <patterns>
  -                <include name="org/apache/antlib/security/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/security/**"/>
           </antlib>
           <antlib>
               <id>selftest</id>
  -            <patterns>
  -                <include name="org/apache/antlib/selftest/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/selftest/**"/>
               <depends>
                   <extension extension-name="myrmidon.test.extension"
                              specification-version="1.0"
  @@ -108,21 +86,26 @@
                          specification-version="1.0"
                          implementation-version="1.0.2"
                          implementation-vendor-id="org.apache.avalon"/>
  -            <patterns>
  -                <include name="org/apache/antlib/security/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/security/**"/>
           </jar>
           <antlib>
               <id>vfile</id>
  -            <patterns>
  -                <include name="org/apache/antlib/vfile/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/vfile/**"/>
           </antlib>
           <antlib>
               <id>xml</id>
  -            <patterns>
  -                <include name="org/apache/antlib/xml/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/antlib/xml/**"/>
           </antlib>
       </build>
  +
  +    <unitTest>
  +        <sourceDirectory>src/test</sourceDirectory>
  +        <classpath>
  +            <fileset dir="../lib" includes="**/*.jar" excludes="xml-apis.jar"/>
  +            <fileset dir="../container/build/lib" includes="*.jar"/>
  +            <path location="../aut/build/test/classes"/>
  +            <path location="../container/build/test/classes"/>
  +            <path location="../framework/build/test/classes"/>
  +        </classpath>
  +    </unitTest>
   </project>
  
  
  
  1.4       +6 -8      jakarta-ant-myrmidon/api/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	16 Apr 2002 11:10:24 -0000	1.3
  +++ project.xml	18 Apr 2002 13:03:00 -0000	1.4
  @@ -16,17 +16,15 @@
       <package>org.apache.myrmidon.listeners</package>
       <package>org.apache.myrmidon.aspects</package>
   
  +    <!-- Project classpath -->
  +    <classpath>
  +        <fileset dir="../lib" includes="*.jar"/>
  +    </classpath>
  +
       <!-- Build details -->
       <build>
           <sourceDirectory>src/java</sourceDirectory>
   
  -        <!-- Project classpath -->
  -        <classpath>
  -            <fileset dir="../lib">
  -                <include name="*.jar"/>
  -            </fileset>
  -        </classpath>
  -
           <!-- The jar to build -->
           <jar>
               <id>myrmidon-api</id>
  @@ -34,6 +32,6 @@
                          specification-version="1.0"
                          implementation-version="1.0"/>
           </jar>
  -
       </build>
  +
   </project>
  
  
  
  1.4       +15 -15    jakarta-ant-myrmidon/aut/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	16 Apr 2002 11:10:25 -0000	1.3
  +++ project.xml	18 Apr 2002 13:03:00 -0000	1.4
  @@ -14,19 +14,15 @@
       <!-- Java packages for the project -->
       <package>org.apache.aut</package>
   
  +    <!-- Project classpath -->
  +    <classpath>
  +        <fileset dir="../lib" includes="*.jar"/>
  +    </classpath>
  +
       <!-- Build details -->
       <build>
           <sourceDirectory>src/java</sourceDirectory>
   
  -        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  -
  -        <!-- Project classpath -->
  -        <classpath>
  -            <fileset dir="../lib">
  -                <include name="*.jar"/>
  -            </fileset>
  -        </classpath>
  -
           <!-- Patterns for including/excluding source files from the project -->
           <compilePatterns>
               <exclude name="org/apache/aut/vfs/provider/smb/**/*.java"
  @@ -44,12 +40,6 @@
                   implementation-version="1.0"/>
           </jar>
   
  -        <!-- Patterns for including/excluding unit tests -->
  -        <unitTestPatterns>
  -            <exclude name="**/SmbFileSystemTestCase.class" unless="test.smb"/>
  -            <exclude name="**/FtpFileSystemTestCase.class" unless="test.ftp"/>
  -        </unitTestPatterns>
  -
           <!-- prepare tasks -->
           <prepare>
               <available property="jcifs.present"
  @@ -77,4 +67,14 @@
               </target>
           </additionalTargets>
       </build>
  +
  +    <unitTest>
  +        <sourceDirectory>src/test</sourceDirectory>
  +
  +        <!-- Patterns for including/excluding unit tests -->
  +        <unitTestPatterns>
  +            <exclude name="**/SmbFileSystemTestCase.class" unless="test.smb"/>
  +            <exclude name="**/FtpFileSystemTestCase.class" unless="test.ftp"/>
  +        </unitTestPatterns>
  +    </unitTest>
   </project>
  
  
  
  1.4       +27 -16    jakarta-ant-myrmidon/container/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/project.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- project.xml	17 Apr 2002 12:01:25 -0000	1.3
  +++ project.xml	18 Apr 2002 13:03:00 -0000	1.4
  @@ -6,47 +6,58 @@
   
       <package>org.apache.myrmidon</package>
   
  +    <classpath>
  +        <fileset dir="../api/build/lib" includes="*.jar"/>
  +        <fileset dir="../aut/build/lib" includes="*.jar"/>
  +    </classpath>
  +
       <build>
           <sourceDirectory>src/java</sourceDirectory>
  -        <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
  +
           <classpath>
  -            <ant-runtime/>
  -            <fileset dir="../lib" includes="**/*.jar" excludes="xml-apis.jar"/>
  -            <fileset dir="../api/build/lib" includes="*.jar"/>
  -            <fileset dir="../aut/build/lib" includes="*.jar"/>
  +            <fileset dir="../lib" includes="**/*.jar"/>
           </classpath>
   
  -        <unitTestPatterns>
  -            <exclude name="**/DependencyMetricsTestCase*"/>
  -        </unitTestPatterns>
  -
           <jar>
               <id>myrmidon-container</id>
               <extension extension-name="myrmidon.container"
                          specification-version="1.0"
                          implementation-version="1.0"/>
  -            <patterns>
  +            <patternset>
                   <exclude name="org/apache/myrmidon/launcher/**" />
                   <exclude name="org/apache/myrmidon/interfaces/**" />
  -            </patterns>
  +            </patternset>
           </jar>
           <jar>
               <id>myrmidon-container-api</id>
               <extension extension-name="myrmidon.container.api"
                          specification-version="1.0"
                          implementation-version="1.0"/>
  -            <patterns>
  +            <patternset>
                   <include name="org/apache/myrmidon/interfaces/**" />
  -            </patterns>
  +            </patternset>
           </jar>
           <jar>
               <id>myrmidon-launcher</id>
               <includeDescriptors>false</includeDescriptors>
               <attribute name="Main-Class" value="org.apache.myrmidon.launcher.Main"/>
  -            <patterns>
  +            <patternset>
                   <include name="org/apache/myrmidon/launcher/**" />
  -            </patterns>
  +            </patternset>
           </jar>
  +    </build>
  +
  +    <unitTest>
  +        <sourceDirectory>src/test</sourceDirectory>
  +
  +        <classpath>
  +            <fileset dir="../lib" includes="**/*.jar" excludes="xml-apis.jar"/>
  +            <path location="../aut/build/test/classes"/>
  +        </classpath>
  +
  +        <unitTestPatterns>
  +            <exclude name="**/DependencyMetricsTestCase*"/>
  +        </unitTestPatterns>
   
           <test-prepare>
               <!-- Prepare deployer tests -->
  @@ -102,6 +113,6 @@
               <jar jarfile="${test.classloader.dir}/ext/cycle-extension-2.jar"
                    manifest="src/test/${test.classloader.pkg}/cycle-extension-2.mf" />
           </test-prepare>
  +    </unitTest>
   
  -    </build>
   </project>
  
  
  
  1.2       +19 -10    jakarta-ant-myrmidon/framework/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	17 Apr 2002 07:23:54 -0000	1.1
  +++ project.xml	18 Apr 2002 13:03:00 -0000	1.2
  @@ -6,17 +6,19 @@
       <package>org.apache.myrmidon.framework</package>
       <package>org.apache.tools.todo</package>
   
  +    <classpath>
  +        <fileset dir="../aut/build/lib" includes="*.jar"/>
  +        <fileset dir="../api/build/lib" includes="*.jar"/>
  +    </classpath>
  +
       <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"/>
  +            <fileset dir="../lib" includes="**/*.jar"/>
           </classpath>
   
           <prepare>
  @@ -82,16 +84,23 @@
               <extension extension-name="myrmidon.framework"
                          specification-version="1.0"
                          implementation-version="1.0"/>
  -            <patterns>
  -                <include name="org/apache/myrmidon/framework/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/myrmidon/framework/**"/>
  +            <metainf dir="src/conf" includes="ant-services.xml"/>
           </jar>
   
           <jar>
               <id>myrmidon-ant1-todo</id>
  -            <patterns>
  -                <include name="org/apache/tools/todo/**"/>
  -            </patterns>
  +            <patternset includes="org/apache/tools/todo/**"/>
           </jar>
       </build>
  +
  +    <unitTest>
  +        <sourceDirectory>src/test</sourceDirectory>
  +        <classpath>
  +            <fileset dir="../lib" includes="**/*.jar" excludes="xml-apis.jar"/>
  +            <path location="../aut/build/test/classes"/>
  +            <path location="../container/build/test/classes"/>
  +            <fileset dir="../container/build/lib" includes="*.jar"/>
  +        </classpath>
  +    </unitTest>
   </project>
  
  
  
  1.1                  jakarta-ant-myrmidon/framework/src/conf/ant-services.xml
  
  Index: ant-services.xml
  ===================================================================
  <services version="1.0">
      <exec-manager factory="org.apache.myrmidon.framework.factories.ExecManagerFactory"/>
      <file-system-manager factory="org.apache.myrmidon.framework.factories.VfsManagerFactory"/>
  </services>
  
  
  
  1.4       +61 -30    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xsl	17 Apr 2002 12:01:25 -0000	1.3
  +++ build.xsl	18 Apr 2002 13:03:00 -0000	1.4
  @@ -9,7 +9,7 @@
           <project name="{name}" default="main">
   
               <!-- Give user a chance to override without editing this file (and without
  -                 typing -D each time he compiles it) -->
  +                 typing -D each time they compile it) -->
               <property file="ant.properties"/>
               <property file="../ant.properties"/>
               <property file="${{user.home}}/.ant.properties"/>
  @@ -43,12 +43,24 @@
               <property name="test.classes" value="${{build.tests}}/classes"/>
               <property name="test.working.dir" value="${{test.classes}}"/>
               <property name="junit.fork" value="false"/>
  -            <property name="junit.failonerror" value="true"/>
  +            <property name="junit.failonerror" value="false"/>
               <property name="single.test" value="*"/>
   
               <!-- Various paths and patternsets -->
               <path id="project.class.path">
  -                <xsl:copy-of select="build/classpath/*[name() != 'ant-runtime']"/>
  +                <xsl:copy-of select="classpath/*|classpath/@*"/>
  +            </path>
  +            <path id="compile.class.path">
  +                <path refid="project.class.path"/>
  +                <path>
  +                    <xsl:copy-of select="build/classpath/*[name() != 'ant-runtime']|build/classpath/@*"/>
  +                </path>
  +            </path>
  +            <path id="test.class.path">
  +                <path refid="project.class.path"/>
  +                <path>
  +                    <xsl:copy-of select="unitTest/classpath/*|unitTest/classpath/@*"/>
  +                </path>
               </path>
               <path id="xdoclet.class.path">
                   <fileset dir="${{tools.dir}}/xdoclet" includes="*.jar"/>
  @@ -75,6 +87,10 @@
                       <fileset dir="." includes="**/*~" defaultexcludes="no"/>
                   </delete>
               </target>
  +            <target name="clean-classes" description="Cleans all compiled classes">
  +                <delete dir="${{build.classes}}"/>
  +                <delete dir="${{test.classes}}"/>
  +            </target>
   
               <target name="real-clean" depends="clean" description="Cleans up the project,
including distributions">
                   <delete dir="${{dist.base}}" />
  @@ -87,7 +103,7 @@
                   <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')]"
>
  +                <xsl:if test="build/jar[not(includeDescriptors = 'false')]|build/antlib[not(includeDescriptors
= 'false')]" >
                       <taskdef name="antlib-descriptor"
                           classname="org.apache.myrmidon.build.AntlibDescriptorTask">
                           <classpath>
  @@ -114,12 +130,11 @@
                       <xsl:if test="not(build/classpath/ant-runtime)">
                           <xsl:attribute name="includeAntRuntime">false</xsl:attribute>
                       </xsl:if>
  -                    <classpath refid="project.class.path"/>
  +                    <classpath refid="compile.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">
  @@ -131,14 +146,14 @@
               </target>
   
               <xsl:choose>
  -                <xsl:when test="build/unitTestSourceDirectory">
  +                <xsl:when test="unitTest">
                       <target name="compile" depends="compile-src, compile-tests"/>
   
  -                    <target name="warn-no-junit" unless="junit.present">
  -                        <echo>WARNING: Could not find JUnit in the project classpath.
 Skipping the unit tests.</echo>
  +                    <target name="fail-no-junit" unless="junit.present">
  +                        <fail>Could not find JUnit in the project classpath.  Cannot
compile the unit tests.</fail>
                       </target>
   
  -                    <target name="compile-tests" depends="compile-src, warn-no-junit"
if="junit.present">
  +                    <target name="compile-tests" depends="compile-src, fail-no-junit"
if="junit.present">
                           <mkdir dir="${{test.classes}}"/>
   
                           <!-- Compile all classes -->
  @@ -149,33 +164,49 @@
                               deprecation="${{build.deprecation}}"
                               target="1.2">
                               <classpath location="${{build.classes}}"/>
  -                            <classpath refid="project.class.path"/>
  -                            <src location="{build/unitTestSourceDirectory}"/>
  +                            <classpath refid="test.class.path"/>
  +                            <src location="{unitTest/sourceDirectory}"/>
                               <patternset refid="project.compile.patternset"/>
                           </javac>
   
                           <!-- copy resources to same location as .class files -->
                           <copy todir="${{test.classes}}">
  -                            <fileset dir="{build/unitTestSourceDirectory}">
  +                            <fileset dir="{unitTest/sourceDirectory}">
                                   <exclude name="**/*.java"/>
                               </fileset>
                           </copy>
                       </target>
   
                       <target name="test-prepare">
  -                        <xsl:copy-of select="build/test-prepare/*"/>
  +                        <xsl:copy-of select="unitTest/test-prepare/*"/>
                       </target>
   
  -                    <target name="test" depends="compile-tests, test-prepare" if="junit.present"
description="Runs the unit tests">
  -
  +                    <target name="run-tests" depends="jars, compile-tests, test-prepare"
if="junit.present">
                           <mkdir dir="${{build.tests}}"/>
   
  +                        <antlib-descriptor
  +                            destdir="${{test.classes}}/META-INF"
  +                            libName="tests"
  +                            descriptorName="ant-descriptor.xml"
  +                            rolesDescriptorName="ant-roles.xml">
  +                            <fileset dir="{unitTest/sourceDirectory}">
  +                                <patternset refid="project.compile.patternset"/>
  +                            </fileset>
  +                            <classpath refid="xdoclet.class.path"/>
  +                            <classpath location="${{build.classes}}"/>
  +                            <classpath refid="test.class.path"/>
  +                            <classpath path="${{java.class.path}}"/>
  +                        </antlib-descriptor>
  +
                           <junit fork="${{junit.fork}}"
                               haltonfailure="${{junit.failonerror}}"
  +                            failureProperty="tests.failed"
                               printsummary="yes" >
   
  -                            <classpath refid="project.class.path"/>
  -                            <classpath location="${{build.classes}}"/>
  +                            <classpath refid="test.class.path"/>
  +                            <classpath>
  +                                <fileset dir="${{build.lib}}" includes="*.jar, *.atl"/>
  +                            </classpath>
                               <classpath location="${{test.classes}}"/>
   
                               <sysproperty key="test.basedir" file="${{test.classes}}"/>
  @@ -187,12 +218,17 @@
                                   <fileset dir="${{test.classes}}">
                                       <include name="**/${{single.test}}TestCase.class"/>
                                       <exclude name="**/Abstract*"/>
  -                                    <xsl:copy-of select="build/unitTestPatterns/*"/>
  +                                    <xsl:copy-of select="unitTest/unitTestPatterns/*"/>
                                   </fileset>
                               </batchtest>
                           </junit>
                       </target>
  +
  +                    <target name="test" if="tests.failed"  depends="run-tests" description="Runs
the unit tests">
  +                        <fail>Unit tests failed.</fail>
  +                    </target>
                   </xsl:when>
  +
                   <xsl:otherwise>
                       <target name="compile" depends="compile-src"/>
                       <target name="test" depends="compile">
  @@ -210,7 +246,7 @@
                   <mkdir dir="${{dist.javadocs}}"/>
                   <javadoc
                       destdir="${{dist.javadocs}}">
  -                    <classpath refid="project.class.path" />
  +                    <classpath refid="compile.class.path" />
                       <sourcepath refid="project.source.path" />
                       <xsl:for-each select="package">
                           <package name="{.}.*"/>
  @@ -301,12 +337,8 @@
           <mkdir dir="${{build.conf}}/{id}"/>
   
           <!-- Generate the descriptors -->
  -        <xsl:if test="name() = 'antlib' or not(includeDescriptors[. = 'false'])">
  -            <xsl:variable name="patterns">
  -                <patternset>
  -                    <xsl:copy-of select="patterns/*"/>
  -                </patternset>
  -            </xsl:variable>
  +        <xsl:if test="not(includeDescriptors = 'false')">
  +            <xsl:variable name="patterns" select="patternset"/>
               <antlib-descriptor
                   destdir="${{build.conf}}/{id}"
                   libName="{id}"
  @@ -319,7 +351,7 @@
                       </fileset>
                   </xsl:for-each>
                   <classpath refid="xdoclet.class.path"/>
  -                <classpath refid="project.class.path"/>
  +                <classpath refid="compile.class.path"/>
                   <classpath path="${{java.class.path}}"/>
               </antlib-descriptor>
           </xsl:if>
  @@ -338,9 +370,8 @@
               compress="${{build.compress}}"
               manifest="src/conf/{id}.mf">
               <metainf dir="${{build.conf}}/{id}" />
  -            <patternset>
  -                <xsl:copy-of select="patterns/*"/>
  -            </patternset>
  +            <xsl:copy-of select="patternset"/>
  +            <xsl:copy-of select="metainf"/>
           </jar>
       </xsl:template>
   
  
  
  

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