Changeset 1744
- Timestamp:
- 07/28/08 10:41:40 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/main/php/org/stubbles/phing/tasks/stubInitConfigTask.php
r1641 r1744 21 21 { 22 22 /** 23 * Target folder of the generated proxy files23 * path where config file can be found 24 24 * 25 * @var string25 * @var string 26 26 */ 27 27 protected $configPath; 28 /** 29 * config file to use 30 * 31 * @var string 32 */ 33 protected $configFile = 'php/config.php'; 28 34 29 35 /** 30 * set the config path36 * sets the config path 31 37 * 32 38 * @param string $configPath … … 35 41 { 36 42 $this->configPath = realpath($configPath); 43 } 44 45 /** 46 * sets the config file 47 * 48 * @param string $configFile 49 */ 50 public function setConfigFile($configFile) 51 { 52 $this->configFile = $configFile; 37 53 } 38 54 … … 50 66 public function main() 51 67 { 52 @include_once $this->configPath . '/php/config.php';68 @include_once $this->configPath . DIRECTORY_SEPARATOR . $this->configFile; 53 69 if (!class_exists('stubConfig', false)) { 54 $this->log('Error loading Stubbles configuration from ' . $this->configPath . '/php/config.php', Project::MSG_ERR);55 throw new BuildException('Error loading Stubbles configuration from ' . $this->configPath . '/php/config.php');70 $this->log('Error loading Stubbles configuration from ' . $this->configPath . DIRECTORY_SEPARATOR . $this->configFile, Project::MSG_ERR); 71 throw new BuildException('Error loading Stubbles configuration from ' . $this->configPath . DIRECTORY_SEPARATOR . $this->configFile); 56 72 } 57 73 } framework/trunk/src/main/resources/phing/build-stubbles.xml
r1705 r1744 172 172 <isset property="first.project"/> 173 173 <then> 174 <stubInitConfig configPath="${stubbles.projects.path}/${first.project}/config"/> 174 <if> 175 <isset property="config.file"/> 176 <then> 177 <stubInitConfig configPath="${stubbles.projects.path}/${first.project}/config" 178 configFile="${config.file}"/> 179 </then> 180 <else> 181 <stubInitConfig configPath="${stubbles.projects.path}/${first.project}/config"/> 182 </else> 183 </if> 175 184 <stubInitClassLoader/> 176 185 <foreach list="${projects}" param="stubbles.project" target="generate-client-project"/>
