ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test DefaultDeployerTestCase.java TestType1.java
Date Thu, 11 Apr 2002 12:58:59 GMT
donaldp     02/04/11 05:58:59

  Modified:    container/src/java/org/apache/myrmidon/components/configurer
                        DefaultConfigurer.java
               container/src/test/org/apache/myrmidon/components
                        AbstractComponentTest.java
               container/src/test/org/apache/myrmidon/components/configurer/test
                        DefaultConfigurerTestCase.java MyRole1.java
               container/src/test/org/apache/myrmidon/components/configurer/test/data
                        ConfigTestContent.java ConfigTestEmpty.java
                        ConfigTestIdResolve.java
                        ConfigTestMismatchedRefType.java
                        ConfigTestTypedAdderConversion.java
                        ConfigTestUnknownReference.java
               container/src/test/org/apache/myrmidon/components/deployer/test
                        DefaultDeployerTestCase.java TestType1.java
  Added:       container .cvsignore ant.properties.sample build.xml
                        project.properties
               container/src/conf MANIFEST.MF ant-descriptor.xml
               container/src/test/org/apache/myrmidon/components
                        TestDataType.java
  Log:
  Remove dependency on DataType and add in infrastructure to actually build container.
  
  Revision  Changes    Path
  1.1                  jakarta-ant-myrmidon/container/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  ant.properties
  build
  checkstyle.cache
  distributions
  dist
  aut-*
  *.el
  *.ipr
  
  
  
  1.1                  jakarta-ant-myrmidon/container/ant.properties.sample
  
  Index: ant.properties.sample
  ===================================================================
  # -----------------------------------------------------------------------------
  # Component ant.properties.sample
  #
  # This is an example "ant.properties" file, used to customize the building of
  # the component for your local environment.  It defines the location of all
  # external modules that this component depend on.  Copy this file to
  # "ant.properties" in the source directory, and customize it as needed.
  #
  # $Id: ant.properties.sample,v 1.1 2002/04/11 12:58:58 donaldp Exp $
  # -----------------------------------------------------------------------------
  
  # --------------------------------------------------
  #      COMPONENT-SPECIFIC REQUIRED LIBRARIES
  # --------------------------------------------------
  
  
  # ----- Compile Control Flags -----
  build.debug=on
  build.optimize=off
  build.deprecation=off
  #build.compiler=jikes
  
  # ----- Base Directory in which all the packages are stored -----
  base.path=${basedir}/../..
  
  # --------------------------------------------------
  #                REQUIRED LIBRARIES
  # --------------------------------------------------
  
  
  
  # --------------------------------------------------
  #                OPTIONAL LIBRARIES
  # --------------------------------------------------
  
  # ----- JUnit Unit Test Suite, version 3.7 or later. -----
  #  Not needed if junit.jar is in $ANT_HOME/lib
  junit.home=${base.path}/junit3.7
  junit.lib=${junit.home}
  junit.jar=${junit.lib}/junit.jar
  
  
  # ----- Checkstyle, version 2.1 or later -----
  # Uncomment the 'do.checkstyle' flag property to enable checkstyle
  # do.checkstyle=
  checkstyle.home=${base.path}/checkstyle-2.1
  checkstyle.lib=${checkstyle.home}
  checkstyle.jar=${checkstyle.lib}/checkstyle-all-2.1.jar
  
  
  
  1.1                  jakarta-ant-myrmidon/container/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <project name="Myrmidon Container" default="main" basedir=".">
  
      <!-- load per-project properties -->
      <property file="project.properties"/>
  
      <!--
        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"/>
  
      <!-- 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"/>
      <property name="junit.failonerror" 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.tests" value="${build.dir}/tests"/>
      <property name="build.reports" value="${build.dir}/reports"/>
  
      <!-- Set the properties for source directories -->
      <property name="src.dir" value="src"/>
      <property name="java.dir" value="${src.dir}/java"/>
      <property name="conf.dir" value="${src.dir}/conf"/>
      <property name="test.dir" value="${src.dir}/test"/>
  
      <!-- Set the properties for distribution directories -->
      <property name="dist.dir" value="dist"/>
      <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
  
      <!-- property to specify name of zip/jar files -->
      <property name="dist.name" value="${name}-${version}"/>
  
      <!-- property indicating directory where all distribution archives are placed -->
      <property name="dist.base" value="distributions"/>
  
      <!-- Classpath for product -->
      <path id="project.class.path">
          <pathelement path="${java.class.path}"/>
          <pathelement location="${build.classes}"/>
          <pathelement location="${junit.jar}"/>
          <pathelement location="${checkstyle.jar}"/>
          <pathelement location="../aut/build/lib/myrmidon-aut-1.0.jar"/>
          <pathelement location="../api/build/lib/myrmidon-api-1.0.jar"/>
          <fileset dir="../lib">
              <include name="*.jar"/>
          </fileset>
          <fileset dir="../lib/bin/lib">
              <include name="*.jar"/>
          </fileset>
      </path>
  
      <target name="main" depends="jar" description="Build the project"/>
      <target name="rebuild" depends="clean,main" description="Rebuild the project"/>
  
      <!-- Compiles the source code -->
      <target name="compile" description="Compiles the source code">
  
          <mkdir dir="${build.classes}"/>
  
          <!-- Compile all classes including the tests. -->
          <javac srcdir="${java.dir}"
              destdir="${build.classes}"
              debug="${build.debug}"
              optimize="${build.optimize}"
              deprecation="${build.deprecation}"
              target="1.2">
              <classpath refid="project.class.path" />
              <src path="${test.dir}"/>
              <include name="**/*.java"/>
          </javac>
  
          <!-- copy resources to same location as .class files -->
          <copy todir="${build.classes}">
              <fileset dir="${java.dir}">
                  <exclude name="**/*.java"/>
              </fileset>
          </copy>
  
          <copy todir="${build.classes}">
              <fileset dir="${test.dir}">
                  <exclude name="**/*.java"/>
              </fileset>
          </copy>
  
      </target>
  
      <!-- Copies and filters the manifest and license. Used by jar and dist -->
      <target name="prepare-conf">
          <mkdir dir="${build.conf}"/>
          <copy todir="${build.conf}" flatten="true">
              <fileset dir="../" includes="LICENSE.txt"/>
              <fileset dir="${conf.dir}">
                  <include name="MANIFEST.MF"/>
                  <include name="*.xml"/>
              </fileset>
              <filterset>
                  <filtersfile file="project.properties"/>
              </filterset>
          </copy>
  
      </target>
  
      <!-- Creates all the .jar file -->
      <target name="jar" depends="compile, prepare-conf" description="Generates the jar
files">
  
          <mkdir dir="${build.lib}"/>
  
          <jar jarfile="${build.lib}/${dist.name}.jar"
              basedir="${build.classes}"
              compress="${build.compress}"
              manifest="${build.conf}/MANIFEST.MF">
              <exclude name="**/test/**"/>
              <zipfileset dir="${build.conf}" prefix="META-INF/">
                  <include name="LICENSE.txt"/>
                  <include name="*.xml"/>
              </zipfileset>
          </jar>
      </target>
  
      <!-- Creates all the Javadocs -->
      <target name="javadocs" depends="compile" description="Generates the javadocs">
  
          <mkdir dir="${dist.javadocs}"/>
          <javadoc packagenames="org.apache.*"
              sourcepath="${java.dir}"
              destdir="${dist.javadocs}">
              <classpath refid="project.class.path" />
              <doclet name="com.sun.tools.doclets.standard.Standard">
                  <param name="-author"/>
                  <param name="-version"/>
                  <param name="-doctitle" value="${Name}"/>
                  <param name="-windowtitle" value="${Name} API"/>
                  <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>
  
      <target name="test" depends="compile" description="Perform the unit tests">
  
          <echo message="Performing Unit Tests" />
  
          <mkdir dir="${build.tests}"/>
  
          <property name="test.working.dir" location="${build.dir}/test"/>
  
          <!-- Prepare deployer tests -->
          <property name="test.deployer.dir"
              value="${test.working.dir}/org/apache/myrmidon/components/deployer/test"/>
          <mkdir dir="${test.deployer.dir}"/>
          <jar jarfile="${test.deployer.dir}/test.atl">
              <zipfileset dir="${test.deployer.dir}" prefix="META-INF" includes="*.xml"/>
          </jar>
  
          <!-- Prepare type factory tests -->
          <property name="test.type.dir"
              value="${test.working.dir}/org/apache/myrmidon/interfaces/type/test"/>
          <mkdir dir="${test.type.dir}"/>
          <jar jarfile="${test.type.dir}/types.jar">
              <fileset dir="${test.classes}" includes="org/apache/myrmidon/interfaces/type/test/MyType1.class"/>
          </jar>
  
          <!-- Prepare the class loader manager tests -->
          <property name="test.classloader.dir" value="${test.working.dir}/${test.classloader.pkg}/.."/>
          <property name="test.classloader.classes" value="${test.dir}/classloader"/>
          <mkdir dir="${test.classloader.dir}"/>
          <mkdir dir="${test.classloader.dir}/ext"/>
          <mkdir dir="${test.classloader.classes}"/>
          <javac srcdir="src/test"
              destdir="${test.classloader.classes}"
              debug="${debug}"
              deprecation="${deprecation}">
              <include name="${test.classloader.pkg}/**"/>
          </javac>
          <copy todir="${test.classloader.classes}">
              <fileset dir="src/test">
                  <include name="${test.classloader.pkg}/**"/>
                  <exclude name="**/*.java"/>
              </fileset>
          </copy>
          <jar jarfile="${test.classloader.dir}/common.jar">
              <fileset dir="${test.classloader.classes}">
                  <include name="**/shared/**"/>
              </fileset>
          </jar>
          <jar jarfile="${test.classloader.dir}/no-dependencies.jar">
              <fileset dir="${test.classloader.classes}">
                  <include name="**/shared/**"/>
                  <include name="**/unshared/**"/>
              </fileset>
          </jar>
          <jar jarfile="${test.classloader.dir}/one-dependency.jar"
               manifest="src/test/${test.classloader.pkg}/one-dependency.mf">
              <fileset dir="${test.classloader.classes}">
                  <include name="**/shared/**"/>
                  <include name="**/unshared/**"/>
              </fileset>
          </jar>
          <copy file="${test.classloader.dir}/one-dependency.jar"
                tofile="${test.classloader.dir}/one-dependency-2.jar"/>
          <jar jarfile="${test.classloader.dir}/ext/simple-extension.jar"
               manifest="src/test/${test.classloader.pkg}/simple-extension.mf" >
              <fileset dir="${test.classloader.classes}">
                  <include name="**/shared/**"/>
                  <include name="**/extn/**"/>
              </fileset>
          </jar>
          <jar jarfile="${test.classloader.dir}/ext/cycle-extension-1.jar"
               manifest="src/test/${test.classloader.pkg}/cycle-extension-1.mf" />
          <jar jarfile="${test.classloader.dir}/ext/cycle-extension-2.jar"
               manifest="src/test/${test.classloader.pkg}/cycle-extension-2.mf" />
  
          <!-- Prepare the project tests -->
          <antlib-descriptor libName="unittests"
              destdir="${gen.dir}">
              <classpath refid="project.class.path"/>
              <classpath refid="tools.class.path"/>
              <fileset dir="src/test">
                  <include name="org/apache/antlib/**"/>
                  <include name="org/apache/myrmidon/framework/**"/>
              </fileset>
          </antlib-descriptor>
          <copy file="${gen.dir}/unittests-ant-descriptor.xml"
              tofile="${test.classes}/META-INF/ant-descriptor.xml"/>
  
  
          <junit fork="true"
              haltonfailure="${junit.failonerror}"
              printsummary="yes"
              dir="${build.tests}">
              <classpath refid="project.class.path"/>
              <sysproperty key="test.basedir" value="${test.working.dir}"/>
  
              <formatter type="xml"/>    <!-- xml reports for junitreport -->
              <formatter type="plain"/>  <!-- text reports for humans     -->
  
              <batchtest todir="${build.tests}">
                  <fileset dir="${build.classes}">
                      <include name="**/test/*TestCase.class"/>
                      <exclude name="**/SmbFileSystemTestCase.class" unless="test.smb"/>
                      <exclude name="**/FtpFileSystemTestCase.class" unless="test.ftp"/>
                      <exclude name="**/Abstract*"/>
                  </fileset>
              </batchtest>
          </junit>
  
      </target>
  
      <target name="test-reports" depends="test" description="Generate Reports for the
unit tests">
  
          <mkdir dir="${build.reports}/junit"/>
  
          <junitreport todir="${build.reports}/junit">
              <fileset dir="${build.tests}">
                  <include name="TEST-*.xml"/>
              </fileset>
              <report format="frames" todir="${build.reports}/junit"/>
          </junitreport>
  
          <!-- Clean up the xml reports used by the junitreport task -->
          <!--
          <delete>
              <fileset dir="${build.tests}" includes="TEST-*.xml"/>
              <fileset dir="${build.tests}" includes="TESTS-*.xml"/>
          </delete>
          -->
  
      </target>
  
      <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  
          <!-- this invocation of checkstyle requires that checkstyle be downloaded and
setup -->
          <!-- thats why you are required to define do.checkstyle property to generate
the report -->
          <taskdef name="checkstyle"
              classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
              <classpath refid="project.class.path"/>
          </taskdef>
          <checkstyle
              lcurlyType="nl"
              lcurlyMethod="nl"
              lcurlyOther="nl"
              rcurly="ignore"
              allowProtected="false"
              allowPackage="false"
              allowNoAuthor="false"
              maxLineLen="100"
              maxMethodLen="100"
              maxConstructorLen="100"
              memberPattern="^m_[a-z][a-zA-Z0-9]*$"
              staticPattern="^c_[a-z][a-zA-Z0-9]*$"
              constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
              ignoreImportLen="true"
              allowTabs="false"
              javadocScope="protected"
              ignoreWhitespace="true"
              cacheFile="checkstyle.cache"
              failOnViolation="false"
              ignoreCastWhitespace="true">
              <fileset dir="${java.dir}">
                  <include name="**/*.java"/>
              </fileset>
              <formatter type="plain"/>
              <formatter type="xml" toFile="build/checkstyle-results.xml"/>
          </checkstyle>
      </target>
  
      <target name="checkstyle-report"
          depends="checkstyle"
          if="do.checkstyle"
          description="Generate Checkstyle Report">
  
          <mkdir dir="${build.reports}/checkstyle"/>
          <property name="checkstyle.pathhack" location="."/>
          <style style="../tools/etc/checkstyle-frames.xsl" in="build/checkstyle-results.xml"
              out="${build.reports}/checkstyle/delete-me.html">
              <param name="pathhack" expression="${checkstyle.pathhack}"/>
          </style>
  
      </target>
  
      <!-- Creates the distribution -->
      <target name="dist"
          depends="prepare-conf, jar, test-reports, checkstyle-report, javadocs"
          description="Generates the jar files">
  
          <mkdir dir="${dist.dir}"/>
          <copy file="${build.lib}/${dist.name}.jar" todir="${dist.dir}"/>
          <copy file="${build.conf}/LICENSE.txt" todir="${dist.dir}"/>
          <copy file="../KEYS" todir="${dist.dir}"/>
          <copy file="README.txt" todir="${dist.dir}"/>
  
          <mkdir dir="${dist.base}"/>
  
          <zip zipfile="${dist.base}/${dist.name}-bin.zip" compress="true">
              <zipfileset dir="${dist.dir}" prefix="${dist.name}"/>
          </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}/${dist.name}-bin.tar">
            <tarfileset dir="${dist.dir}"
                        prefix="${dist.name}"
                        username="avalon"
                        group="avalon"/>
          </tar>
  
          <gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
                src="${dist.name}-bin.tar"/>
          <bzip2 zipfile="${dist.base}/${dist.name}-bin.tar.gz"
                 src="${dist.name}-bin.tar"/>
  
          <delete file="${dist.base}/${dist.name}-bin.tar"/>
  
          <checksum fileext=".md5">
            <fileset dir="${dist.base}" />
          </checksum>
          -->
          <delete dir="${dist.dir}" />
  
      </target>
  
      <!-- Cleans up build and distribution directories -->
      <target name="clean" description="Cleans up the project">
          <delete file="checkstyle.cache"/>
          <delete dir="${build.dir}" />
          <delete dir="${dist.dir}" />
          <delete dir="test" /> <!-- unit testing output directory -->
          <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>
  
  </project>
  
  
  
  1.1                  jakarta-ant-myrmidon/container/project.properties
  
  Index: project.properties
  ===================================================================
  name=myrmidon-container
  Name=Myrmidon Container
  dir-name=container
  version=1.0
  year=2000-2002
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/conf/MANIFEST.MF
  
  Index: MANIFEST.MF
  ===================================================================
  Extension-Name: @name@
  Specification-Vendor: Apache Software Foundation
  Specification-Version: 1.0
  Implementation-Vendor: Apache Software Foundation
  Implementation-Version: @package-version@
  
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/conf/ant-descriptor.xml
  
  Index: ant-descriptor.xml
  ===================================================================
  <ant-lib version="1.0">
  
    <types>
  
          <project-builder
            name="ant2"
            classname="org.apache.myrmidon.components.builder.DefaultProjectBuilder" />
          <project-builder
            name="ati"
            classname="org.apache.myrmidon.components.builder.ATIProjectBuilder" />
          <project-builder
            name="ant-transform"
            classname="org.apache.myrmidon.components.builder.TransformingProjectBuilder"
/>
          <project-builder
            name="xml"
            classname="org.apache.myrmidon.components.builder.ConvertingProjectBuilder" />
          <project-builder
            name="ant"
            classname="org.apache.myrmidon.components.builder.ConvertingProjectBuilder" />
          <project-builder
            name="default"
            classname="org.apache.myrmidon.components.builder.ConvertingProjectBuilder" />
          <configurer
            name="default"
            classname="org.apache.myrmidon.components.configurer.DefaultConfigurer" />
          <configurer
            name="classic"
            classname="org.apache.myrmidon.components.configurer.ClassicConfigurer" />
          <property-resolver
            name="classic"
            classname="org.apache.myrmidon.components.property.ClassicPropertyResolver" />
          <property-resolver
            name="default"
            classname="org.apache.myrmidon.components.property.DefaultPropertyResolver" />
  
    </types>
  
  </ant-lib>
  
  
  
  1.47      +2 -10     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- DefaultConfigurer.java	4 Apr 2002 11:36:20 -0000	1.46
  +++ DefaultConfigurer.java	11 Apr 2002 12:58:58 -0000	1.47
  @@ -22,7 +22,6 @@
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.myrmidon.api.TaskContext;
  -import org.apache.myrmidon.framework.DataType;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.role.RoleInfo;
   import org.apache.myrmidon.interfaces.role.RoleManager;
  @@ -33,7 +32,7 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.46 $ $Date: 2002/04/04 11:36:20 $
  + * @version $Revision: 1.47 $ $Date: 2002/04/11 12:58:58 $
    * @ant.type type="configurer" name="default"
    */
   public class DefaultConfigurer
  @@ -614,14 +613,7 @@
                   return factory.create( name );
               }
           }
  -
  -        // Use the generic 'data-type' role.
  -        final TypeFactory factory = m_typeManager.getFactory( DataType.ROLE );
  -        if( !factory.canCreate( name ) )
  -        {
  -            throw new NoSuchPropertyException();
  -        }
  -        return factory.create( name );
  +        throw new NoSuchPropertyException();
       }
   
       /**
  
  
  
  1.23      +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java
  
  Index: AbstractComponentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/AbstractComponentTest.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- AbstractComponentTest.java	9 Apr 2002 07:21:12 -0000	1.22
  +++ AbstractComponentTest.java	11 Apr 2002 12:58:58 -0000	1.23
  @@ -33,7 +33,7 @@
   import org.apache.myrmidon.components.property.DefaultPropertyResolver;
   import org.apache.myrmidon.components.role.DefaultRoleManager;
   import org.apache.myrmidon.components.type.DefaultTypeManager;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.interfaces.classloader.ClassLoaderManager;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.converter.ConverterRegistry;
  @@ -164,7 +164,7 @@
               // Register some standard roles
               // Add some core roles
               final RoleManager roleManager = (RoleManager)getServiceManager().lookup( RoleManager.ROLE
);
  -            roleManager.addRole( new RoleInfo( DataType.ROLE, DATA_TYPE_ROLE, DataType.class
) );
  +            roleManager.addRole( new RoleInfo( TestDataType.ROLE, DATA_TYPE_ROLE, TestDataType.class
) );
               roleManager.addRole( new RoleInfo( Converter.ROLE, CONVERTER_ROLE, Converter.class
) );
               roleManager.addRole( new RoleInfo( ServiceFactory.ROLE, SERVICE_FACTORY_ROLE,
ServiceFactory.class ) );
           }
  
  
  
  1.1                  jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/TestDataType.java
  
  Index: TestDataType.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.myrmidon.components;
  
  /**
   * Base class for those classes that can appear inside the build file
   * as stand alone data types.
   *
   * @author <a href="mailto:peter@apache.org">Peter Donald</a>
   * @ant:role shorthand="data-type"
   */
  public interface TestDataType
  {
      String ROLE = TestDataType.class.getName();
  }
  
  
  
  1.7       +4 -4      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java
  
  Index: DefaultConfigurerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/DefaultConfigurerTestCase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultConfigurerTestCase.java	7 Apr 2002 02:11:29 -0000	1.6
  +++ DefaultConfigurerTestCase.java	11 Apr 2002 12:58:58 -0000	1.7
  @@ -42,7 +42,7 @@
   import org.apache.myrmidon.components.configurer.test.data.ConfigTestTypedConfigAdder;
   import org.apache.myrmidon.components.configurer.test.data.ConfigTestUnknownReference;
   import org.apache.myrmidon.components.workspace.DefaultTaskContext;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.interfaces.configurer.Configurer;
   import org.apache.myrmidon.interfaces.role.RoleInfo;
   
  @@ -554,7 +554,7 @@
           // Register incompatible types with the same name, as data-type and myrole1.
           registerRole( new RoleInfo( "myrole1", "myrole1", MyRole1.class ) );
           registerType( "myrole1", "my-type1", MyType1.class );
  -        registerType( DataType.ROLE, "my-type1", StringBuffer.class );
  +        registerType( TestDataType.ROLE, "my-type1", StringBuffer.class );
   
           final ConfigTestTypedAdderRole test = new ConfigTestTypedAdderRole();
   
  @@ -579,7 +579,7 @@
           child.setAttribute( "prop", "some value" );
           config.addChild( child );
   
  -        registerType( DataType.ROLE, "some-type", ConfigTestTypedAdderConversion.class
);
  +        registerType( TestDataType.ROLE, "some-type", ConfigTestTypedAdderConversion.class
);
           registerConverter( ObjectToMyRole1Converter.class, Object.class, MyRole1.class
);
   
           final ConfigTestTypedAdderConversion test = new ConfigTestTypedAdderConversion();
  @@ -836,7 +836,7 @@
   
           registerConverter( ObjectToMyRole1Converter.class, String.class, MyRole1.class
);
           registerConverter( StringToIntegerConverter.class, String.class, Integer.class
);
  -        registerType( DataType.ROLE, "my-type1", MyType1.class );
  +        registerType( TestDataType.ROLE, "my-type1", MyType1.class );
   
           final ConfigTestIgnoreStringMethods test = new ConfigTestIgnoreStringMethods();
   
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/MyRole1.java
  
  Index: MyRole1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/MyRole1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MyRole1.java	17 Mar 2002 08:07:08 -0000	1.1
  +++ MyRole1.java	11 Apr 2002 12:58:58 -0000	1.2
  @@ -7,16 +7,16 @@
    */
   package org.apache.myrmidon.components.configurer.test;
   
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   
   /**
    * A basic interface to test configurer.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/17 08:07:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/11 12:58:58 $
    */
   public interface MyRole1
  -    extends DataType
  +    extends TestDataType
   {
       String ROLE = MyRole1.class.getName();
   }
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestContent.java
  
  Index: ConfigTestContent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestContent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigTestContent.java	17 Mar 2002 08:07:08 -0000	1.1
  +++ ConfigTestContent.java	11 Apr 2002 12:58:58 -0000	1.2
  @@ -9,7 +9,7 @@
   
   import java.util.ArrayList;
   import java.util.List;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.components.configurer.test.DefaultConfigurerTestCase;
   
   /**
  @@ -18,7 +18,7 @@
    * @author Adam Murdoch
    */
   public class ConfigTestContent
  -    implements DataType
  +    implements TestDataType
   {
       private String m_content;
   
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestEmpty.java
  
  Index: ConfigTestEmpty.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestEmpty.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConfigTestEmpty.java	19 Mar 2002 11:19:24 -0000	1.2
  +++ ConfigTestEmpty.java	11 Apr 2002 12:58:58 -0000	1.3
  @@ -7,7 +7,7 @@
    */
   package org.apache.myrmidon.components.configurer.test.data;
   
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   
   /**
    * An empty class.
  @@ -15,6 +15,6 @@
    * @author Adam Murdoch
    */
   public class ConfigTestEmpty
  -    implements DataType
  +    implements TestDataType
   {
   }
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestIdResolve.java
  
  Index: ConfigTestIdResolve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestIdResolve.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigTestIdResolve.java	17 Mar 2002 08:07:08 -0000	1.1
  +++ ConfigTestIdResolve.java	11 Apr 2002 12:58:58 -0000	1.2
  @@ -9,7 +9,7 @@
   
   import java.util.ArrayList;
   import java.util.List;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.components.configurer.test.DefaultConfigurerTestCase;
   
   /**
  @@ -18,7 +18,7 @@
    * @author Adam Murdoch
    */
   public class ConfigTestIdResolve
  -    implements DataType
  +    implements TestDataType
   {
       private String m_someProp;
   
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestMismatchedRefType.java
  
  Index: ConfigTestMismatchedRefType.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestMismatchedRefType.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigTestMismatchedRefType.java	17 Mar 2002 08:07:08 -0000	1.1
  +++ ConfigTestMismatchedRefType.java	11 Apr 2002 12:58:58 -0000	1.2
  @@ -9,7 +9,7 @@
   
   import java.util.ArrayList;
   import java.util.List;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.components.configurer.test.DefaultConfigurerTestCase;
   
   /**
  @@ -18,7 +18,7 @@
    * @author Adam Murdoch
    */
   public class ConfigTestMismatchedRefType
  -    implements DataType
  +    implements TestDataType
   {
       public void setSomeProp( final String value )
       {
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestTypedAdderConversion.java
  
  Index: ConfigTestTypedAdderConversion.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestTypedAdderConversion.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConfigTestTypedAdderConversion.java	17 Mar 2002 08:07:08 -0000	1.1
  +++ ConfigTestTypedAdderConversion.java	11 Apr 2002 12:58:58 -0000	1.2
  @@ -9,16 +9,16 @@
   
   import java.util.ArrayList;
   import org.apache.myrmidon.components.configurer.test.MyRole1;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   
   /**
    * Simple class to test typed adder.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/03/17 08:07:08 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/11 12:58:58 $
    */
   public class ConfigTestTypedAdderConversion
  -    implements DataType
  +    implements TestDataType
   {
       private ArrayList m_roles = new ArrayList();
       private String m_prop;
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestUnknownReference.java
  
  Index: ConfigTestUnknownReference.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/configurer/test/data/ConfigTestUnknownReference.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConfigTestUnknownReference.java	19 Mar 2002 11:19:24 -0000	1.2
  +++ ConfigTestUnknownReference.java	11 Apr 2002 12:58:58 -0000	1.3
  @@ -7,7 +7,7 @@
    */
   package org.apache.myrmidon.components.configurer.test.data;
   
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   
   /**
    * A simple test class with string properties.
  @@ -15,7 +15,7 @@
    * @author Adam Murdoch
    */
   public class ConfigTestUnknownReference
  -    implements DataType
  +    implements TestDataType
   {
       public void setSomeProp( final String value )
       {
  
  
  
  1.3       +4 -4      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/DefaultDeployerTestCase.java
  
  Index: DefaultDeployerTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/DefaultDeployerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultDeployerTestCase.java	21 Mar 2002 10:29:15 -0000	1.2
  +++ DefaultDeployerTestCase.java	11 Apr 2002 12:58:59 -0000	1.3
  @@ -12,7 +12,7 @@
   import org.apache.aut.converter.ConverterException;
   import org.apache.myrmidon.components.AbstractComponentTest;
   import org.apache.myrmidon.components.deployer.DefaultDeployer;
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.interfaces.deployer.ConverterDefinition;
   import org.apache.myrmidon.interfaces.deployer.Deployer;
   import org.apache.myrmidon.interfaces.deployer.TypeDefinition;
  @@ -89,7 +89,7 @@
           typeDeployer.deployType( typeDef );
   
           // Check the type has been registered
  -        final TypeFactory typeFactory = getTypeManager().getFactory( DataType.ROLE );
  +        final TypeFactory typeFactory = getTypeManager().getFactory( TestDataType.ROLE
);
           final Object result = typeFactory.create( typeName );
           assertTrue( result instanceof TestType1 );
       }
  @@ -145,7 +145,7 @@
       private void assertTypesNotRegistered() throws Exception
       {
           // Check the data-type
  -        TypeFactory typeFactory = getTypeManager().getFactory( DataType.ROLE );
  +        TypeFactory typeFactory = getTypeManager().getFactory( TestDataType.ROLE );
           try
           {
               typeFactory.create( TEST_TYPE1_NAME );
  @@ -187,7 +187,7 @@
       private void assertTypesRegistered() throws Exception
       {
           // Check the data-type
  -        TypeFactory typeFactory = getTypeManager().getFactory( DataType.ROLE );
  +        TypeFactory typeFactory = getTypeManager().getFactory( TestDataType.ROLE );
           Object object = typeFactory.create( TEST_TYPE1_NAME );
           assertTrue( object instanceof TestType1 );
   
  
  
  
  1.2       +2 -2      jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/TestType1.java
  
  Index: TestType1.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/deployer/test/TestType1.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestType1.java	17 Mar 2002 08:07:09 -0000	1.1
  +++ TestType1.java	11 Apr 2002 12:58:59 -0000	1.2
  @@ -7,7 +7,7 @@
    */
   package org.apache.myrmidon.components.deployer.test;
   
  -import org.apache.myrmidon.framework.DataType;
  +import org.apache.myrmidon.components.TestDataType;
   import org.apache.myrmidon.components.deployer.test.TestRole1;
   
   /**
  @@ -16,6 +16,6 @@
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
    */
   public class TestType1
  -    implements DataType, TestRole1
  +    implements TestDataType, TestRole1
   {
   }
  
  
  

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