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/tools/xsl build.xsl
Date Tue, 23 Apr 2002 06:27:08 GMT
adammurdoch    02/04/22 23:27:08

  Modified:    .        build.xml
               aut      project.xml
               container project.xml
               framework/src/test/org/apache/myrmidon
                        AbstractProjectTest.java
               tools/xsl build.xsl
  Log:
  - Don't generate antlib descriptors for the unit tests that don't need it.
  
  Revision  Changes    Path
  1.11      +2 -2      jakarta-ant-myrmidon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml	22 Apr 2002 06:52:30 -0000	1.10
  +++ build.xml	23 Apr 2002 06:27:07 -0000	1.11
  @@ -47,9 +47,9 @@
                  processor="trax" />
       </target>
   
  -    <target name="jar" description="Builds the jars for all projects">
  +    <target name="jars" description="Builds the jars for all projects">
           <antcall target="for-all-projects">
  -            <param name="target" value="jar"/>
  +            <param name="target" value="jars"/>
           </antcall>
       </target>
       <target name="clean" description="Cleans all projects">
  
  
  
  1.6       +1 -0      jakarta-ant-myrmidon/aut/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/project.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- project.xml	22 Apr 2002 06:52:31 -0000	1.5
  +++ project.xml	23 Apr 2002 06:27:07 -0000	1.6
  @@ -53,6 +53,7 @@
   
       <unitTest>
           <sourceDirectory>src/test</sourceDirectory>
  +        <includeDescriptors>false</includeDescriptors>
   
           <!-- Patterns for including/excluding unit tests -->
           <unitTestPatterns>
  
  
  
  1.7       +1 -0      jakarta-ant-myrmidon/container/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/project.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- project.xml	22 Apr 2002 06:52:31 -0000	1.6
  +++ project.xml	23 Apr 2002 06:27:07 -0000	1.7
  @@ -49,6 +49,7 @@
   
       <unitTest>
           <sourceDirectory>src/test</sourceDirectory>
  +        <includeDescriptors>false</includeDescriptors>
   
           <classpath>
               <path location="../aut/build/test/classes"/>
  
  
  
  1.3       +2 -11     jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/AbstractProjectTest.java
  
  Index: AbstractProjectTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/test/org/apache/myrmidon/AbstractProjectTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractProjectTest.java	18 Apr 2002 12:53:16 -0000	1.2
  +++ AbstractProjectTest.java	23 Apr 2002 06:27:07 -0000	1.3
  @@ -11,13 +11,12 @@
   import org.apache.aut.AbstractAutTestCase;
   import org.apache.myrmidon.interfaces.EmbeddedAnt;
   import org.apache.myrmidon.listeners.ProjectListener;
  -import org.apache.avalon.framework.ExceptionUtil;
   
   /**
    * A base class for test cases which need to execute projects.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/18 12:53:16 $
  + * @version $Revision: 1.3 $ $Date: 2002/04/23 06:27:07 $
    */
   public class AbstractProjectTest
       extends AbstractAutTestCase
  @@ -88,6 +87,7 @@
               embeddor.setHomeDirectory( distDir );
               embeddor.enableLogging( getLogger() );
               embeddor.setSharedClassLoader( getClass().getClassLoader() );
  +            embeddor.setContainerClassLoader( getClass().getClassLoader() );
               embeddor.setProjectFile( projectFile.getAbsolutePath() );
               embeddor.setProjectListener( null );
   
  @@ -102,15 +102,6 @@
   
               // Now execute the target
               embeddor.executeTargets( new String[] { targetName } );
  -        }
  -        catch( Exception exc )
  -        {
  -            getLogger().info( "Project failed with unexpected exception" );
  -            for( Throwable t = exc; t != null; t = ExceptionUtil.getCause( t, true ) )
  -            {
  -                getLogger().info( "exception", t );
  -            }
  -            throw exc;
           }
           finally
           {
  
  
  
  1.4       +18 -14    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.xsl	22 Apr 2002 07:42:38 -0000	1.3
  +++ build.xsl	23 Apr 2002 06:27:07 -0000	1.4
  @@ -213,19 +213,23 @@
                       <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>
  +                        <xsl:if test="not(unitTest/includeDescriptors = 'false')">
  +                            <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>
  +                        </xsl:if>
  +
  +                        <echo>fork = ${junit.fork}</echo>
   
                           <junit fork="${{junit.fork}}"
                               haltonfailure="${{junit.failonerror}}"
  @@ -419,7 +423,7 @@
               basedir="${{build.classes}}"
               compress="${{build.compress}}"
               manifest="${{build.dir}}/conf/{id}/manifest.mf">
  -            <metainf dir="${{build.conf}}/{id}" />
  +            <metainf dir="${{build.conf}}/{id}" excludes="manifest.mf"/>
               <xsl:copy-of select="patternset"/>
               <xsl:copy-of select="fileset"/>
               <xsl:copy-of select="metainf"/>
  
  
  

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