【问题标题】:propel-gen's "convert-conf" target failspropel-gen 的“convert-conf”目标失败
【发布时间】:2008-12-11 08:21:18
【问题描述】:

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

chmod -R 777 ./application/config

但这并没有帮助。我也试过了

propel-gen ./ 反向

propel-gen ./克里奥尔语

两者都产生了相同的错误。这个错误:

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

有什么想法吗?

【问题讨论】:

    标签: php orm propel phing


    【解决方案1】:

    我发现我遇到了同样的问题,我必须设置它来解决它

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

    build.properties 文件中。

    之后它就完美运行了。

    【讨论】:

      【解决方案2】:

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

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

      看看它怎么说那些必须匹配的东西?我的没有。我一定是在我不注意的时候按了一个键,不小心编辑了它。匹配这些,现在构建正常。唷。

      【讨论】:

        猜你喜欢
        • 2013-08-21
        • 2020-06-14
        • 2010-12-21
        • 2023-03-04
        • 1970-01-01
        • 2012-03-01
        • 1970-01-01
        • 1970-01-01
        • 2013-03-12
        相关资源
        最近更新 更多