How to hide some phing targets from xml
Asked Answered
A

3

10

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!

Am answered 26/10, 2011 at 8:23 Comment(0)
T
8

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" />
Tomekatomes answered 26/10, 2011 at 10:25 Comment(2)
hi, it doesn't work for me. BUILD FAILED Error reading project file [wrapped: /srv/htdocs/trunk/applications/fe/etc/build.xml:21:113: Unexpected attribute 'hidden'] Total time: 0.0630 secondsAm
phing 2.5 could solve this problem i thnk. your attribute is written here: phing.info/trac/browser/branches/2.5/test/etc/components/Target/…Am
B
2

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

Bougie answered 3/11, 2011 at 11:20 Comment(0)
W
1

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>
Wakefield answered 29/4, 2016 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.