Changeset 1456

Show
Ignore:
Timestamp:
03/24/08 01:20:14 (6 months ago)
Author:
mikey
Message:

enhancement #49: enable validation (sort of) for xml files copied into release
still todo: check task with release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/stubbles/build.xml

    r1397 r1456  
    1818  <typedef name="starDecorator" classname="StarDecorator" classpath="${stubbles.base.dir}/src/main/php/org/stubbles/phing/types" /> 
    1919 
    20   <target name="main" if="version" depends="check-style,test,test-integration,build"/> 
     20  <target name="main" if="version" depends="check-style,test,test-integration,test-initializers,build"/> 
    2121 
    2222  <target name="build" if="version" depends="versioncheck,copy-files,minify-js,build-archives,tar"/> 
     
    225225 
    226226  <target name="test-initializers"> 
    227     <!--initConfig configPath="${stubbles.base.dir}/config"/> 
     227    <initConfig configPath="${stubbles.base.dir}/config"/> 
    228228    <initClassLoader/> 
    229     <checkInitializers classFile="${stubbles.base.dir}/build/stubbles/initializers.ini"/--> 
     229    <phingcall target="test-preparation" /> 
     230    <checkInitializers classFile="${stubbles.base.dir}/build/stubbles/initializers.ini"/> 
    230231  </target> 
    231232 
  • trunk/build/stubbles/initializers.ini

    r1397 r1456  
    33events = "net::stubbles::events::stubEventsXJConfInitializer" 
    44interceptors = "net::stubbles::ipo::interceptors::stubInterceptorXJConfInitializer" 
    5 logging = "net::stubbles::util::log::stubLoggerXJConfFactory
     5logging = "net::stubbles::util::log::stubLoggerXJConfInitializer
    66memphis = "net::stubbles::websites::memphis::stubMemphisConfig" 
    77processors = "net::stubbles::websites::processors::stubProcessorResolverXJConfFactory" 
    8 rdbms = "net::stubbles::rdbms::stubDatabaseInitializer" 
     8rdbms = "net::stubbles::rdbms::stubDatabaseXJConfInitializer" 
    99variantmanager = "net::stubbles::websites::variantmanager::stubVariantXJConfFactory" 
  • trunk/src/main/php/org/stubbles/phing/tasks/stubCheckInitializersTask.php

    r1397 r1456  
    5252        $classes = parse_ini_file($this->classFile); 
    5353        foreach ($classes as $fqClassName) { 
     54            $this->log('Testing ' . $fqClassName); 
    5455            try { 
    5556                $class = new stubReflectionClass($fqClassName); 
     
    5859                $class->getMethod('init')->invoke($class->newInstance()); 
    5960            } catch (Exception $e) { 
    60                 throw new BuildException($e->getMessage()); 
     61                throw new BuildException(get_class($e) . ': ' . $e->getMessage()); 
    6162            } 
    6263        } 
    6364         
    64         $this->log('Executed all initializers successfully.', Project::MSG_INFO); 
     65        $this->log('Executed all initializers successfully.'); 
    6566    } 
    6667} 
  • trunk/src/main/php/org/stubbles/phing/tasks/stubInitClassLoaderTask.php

    r1380 r1456  
    3939         
    4040        if (stubConfig::useStar() == true) { 
    41             if (!@include_once stubConfig::getLibPath() . '/stubbles.php') { 
     41            if (!include_once stubConfig::getLibPath() . '/stubbles.php') { 
    4242                $this->log('Error loading Stubbles library from ' . stubConfig::getLibPath() . '/stubbles.php', Project::MSG_ERR); 
    4343                $this->log('Either stubConfig::getLibPath() is not correctly set, or stubbles.php does not exist.', Project::MSG_ERR); 
     
    4545            } 
    4646        } else { 
    47             if (!@include_once stubConfig::getLibPath() . '/starReader.php') { 
     47            if (file_exists(stubConfig::getSourcePath() . '/php/org/stubbles/star/StarClassRegistry.php') === true) { 
     48                require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarStreamWrapper.php'; 
     49                require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarException.php'; 
     50                require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarClassRegistry.php'; 
     51            } elseif (!include_once stubConfig::getLibPath() . '/starReader.php') { 
    4852                $this->log('Error loading StarReader from ' . stubConfig::getLibPath() . '/starReader.php', Project::MSG_ERR); 
    4953                $this->log('Either stubConfig::getLibPath() is not correctly set, or starReader.php does not exist.', Project::MSG_ERR); 
  • trunk/src/main/php/org/stubbles/phing/tasks/stubStarWriterTask.php

    r1238 r1456  
    1515 */ 
    1616require_once 'config/php/config.php'; 
    17 require stubConfig::getSourcePath() . '/php/org/stubbles/star/StarException.php'; 
    18 require stubConfig::getSourcePath() . '/php/org/stubbles/star/StarFile.php'; 
    19 require stubConfig::getSourcePath() . '/php/org/stubbles/star/StarWriter.php'; 
    20 require stubConfig::getSourcePath() . '/php/org/stubbles/star/StarArchive.php'; 
     17require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarException.php'; 
     18require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarFile.php'; 
     19require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarWriter.php'; 
     20require_once stubConfig::getSourcePath() . '/php/org/stubbles/star/StarArchive.php'; 
    2121/** 
    2222 * Task to create star files.