2008-12-11 42 views
3

我試圖從OSX 10.5上的schema.xml文件生成我的模型與最新版本的PHP & Propel 1.3 & Phing。所有的模型類實際上都被創建了,然後它就死了,就在最後一步。我已經試過propel-gen的「convert-conf」目標失敗

chmod -R 777 ./application/config

但這並沒有幫助。我也曾嘗試都

propel-gen ./ reverse

propel-gen ./ creole

都產生了同樣的錯誤。此錯誤:

propel > convert-conf: 
[echo] Output file: models-conf.php 
[echo] XMLFile: /application/config/runtime-conf.xml 
Execution of target "convert-conf" failed for the following reason: pear/data/propel_generator/build-propel.xml:514:20: No valid xmlConfFile specified. 
[phingcall] /pear/data/propel_generator/build-propel.xml:514:20: No valid xmlConfFile specified. 

Execution of target "main" failed for the following reason: 
pear/data/propel_generator/build-propel.xml:94:18: Execution of the target buildfile failed. Aborting. 
[phing] pear/data/propel_generator/build-propel.xml:94:18: Execution of the target buildfile failed. Aborting. 

BUILD FINISHED 

這裏是我的build.properties文件:

propel.project = models 
propel.database = mysql 
propel.database.encoding = utf8 
propel.database.url = mysql:host=localhost;dbname={$myDBName} 
propel.database.user = {$myDBuser} 
propel.database.password = {$myDBpass} 
propel.output.dir = /application 
propel.php.dir  = ${propel.output.dir}/ 
propel.sql.dir  = ${propel.output.dir}/models/sql 
propel.schema.dir = ${propel.output.dir}/config 
propel.conf.dir = ${propel.output.dir}/config 
propel.phpconf.dir = ${propel.output.dir}/config 
propel.addGenericAccessors = true 

任何想法?

回答

1

我不知道這是怎麼發生的,但我運行時conf.xml中的文件有它不好的線路:

<datasource id="models"> <!-- this ID must match <database name=""> in schema.xml --> 

看看它是怎麼說的那些東西必須比賽?我沒有。當我沒有注意到時,我一定會碰到一把鑰匙,不小心編輯它。將它們匹配起來,現在構建就會很順利。唷。

3

我發現我不得不解決它同樣的問題,我必須設置

propel.runtime.conf.file=runtime-config.xml 

build.properties文件。

之後它完美地工作。