简体   繁体   中英

How to hide some phing targets from xml

i have about 25 phing targets, when i list them in the console.

But 5 of them are just needed by other targets and i will never trigger them alone.

is there a possibility to hide them?

For example:

There are the targets: cms.cc cc-config cc-content cc-service

The all pop up in my list, but "cc"-target is the only one i will trigger.

Thank you!

我没有自己测试,但根据我通过Google发现的测试用例,我猜测, hidden了一个(未记录的)属性

<target hidden="true" />

使用建议的目标属性hidden与他们重视true|false而从隐藏phing -l因为Phing版本2.4.3。

There's attribute hidden for targets. It was documented starting from version 2.4.13 .

It's well described in the section H.2 Targets and subsection H.2.2 Attributes :

hidden | Boolean | Whether or not to include this target in the list of targets generated by phing -l | Default: False | Required: No

Currently available arguments are well documented as well in A.2 Command Line Arguments section:

-l -list

List all available targets in buildfile (excluding targets that have their hidden attribute set to true )

Example of usage is next:

<target name="project-target" description="meaningful description" hidden="true">
    ...
</target>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM