Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 886
OskarStark Avatar asked Oct 26 '11 08:10

OskarStark


3 Answers

I didn't test it myself, but according a testcase I found via Google I guess, that there is a (not documented) attribute hidden

<target hidden="true" />
like image 148
KingCrunch Avatar answered Oct 20 '22 18:10

KingCrunch


Using the suggested target attribute hidden with them values true|false while hide them from phing -l since Phing version 2.4.3.

like image 2
raphaelstolt Avatar answered Oct 20 '22 18:10

raphaelstolt


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>
like image 1
Farside Avatar answered Oct 20 '22 19:10

Farside