propel-gen的“convert-conf”目标失败

时间:2008-12-11 08:21:18

标签: php orm propel phing

我正在尝试从OSX 10.5上的schema.xml文件生成我的模型,其中包含最新版本的PHP& Propel 1.3& Phing。所有的模型类实际上都是创建的,然后它就会死掉,就在最后一步。我已经尝试了

  

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

有什么想法吗?

2 个答案:

答案 0 :(得分:3)

我发现我有同样的问题要解决它我必须设置

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

build.properties档案中。

之后它完美运作。

答案 1 :(得分:1)

我不知道这是怎么发生的,但我的runtime-conf.xml文件中有一条坏线:

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

看看必须匹配的内容如何?我的没有。当我没有注意时,我必须按下一个键,不小心编辑了它。将它们匹配起来,现在构建正常。呼。