dtgsl60240 2012-12-20 00:11
浏览 34
已采纳

从项目目录加载自定义Phing任务

After reviewing the documentation for Phing on how to write custom tasks using PHP. I was wondering if it was possible to place the PHP source files in my project folder.

The documentation says that the task PHP files have to be placed in classes/phing/tasks/my and then they can be loaded with this command.

<taskdef name="myecho" classname="phing.tasks.my.MyEchoTask" />

It's going to be difficult to keep project specific tasks maintained under version control if the source files are outside my projects folder.

Is it possible to change the location of where they are loaded from?

  • 写回答

2条回答 默认 最新

  • duanrong6802 2012-12-20 00:31
    关注

    If you reference a custom task like this in your build file:

    <taskdef name="myecho" classname="my.tasks.MyEchoTask" />
    

    Phing will look in a directory called my/tasks under your current directory (I believe).

    For my own stuff, I have a directory called phing off of the top level of my source tree and I just place my tasks in that folder and use the classname phing.<MyTaskClassName>

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等