0

Is there a possibility to separate the targets in the build.xml file which are listed by the following command?:

phing -l

Because currently I see all targets under the "Main targets" headline. I would like to have several groups. Like "Database", "PHP" etc. Is this possible? I have not found anything like this by the documentation and Google and of course the search function at Stackoverflow.

Thanks for your attention.

technergy
  • 259
  • 1
  • 12

1 Answers1

0

It's not possible for now. There is not attributes for Target for this purpose.

I will explain you my workaround:

I have a folder bin/targets (avoid to use bin/phing if you are using composer to handle phing dependencies) with several xml files:

bin/targets/
├── db
│   ├── default.xml
│   └── one_database.xml
├── geonames.xml
├── jmeter.xml
├── qcode.xml
├── skel.xml
├── symfony.xml
└── test.xml

Each one has several targets, and all of them are prefixed with the "namespace". In example, target with name db.one_database.deploy is in this file ./bin/targets/db/one_database.xml,

At the end of my build.xml file I have these instructions

<import file="bin/targets/skel.xml" optional="false" />
<import file="vendor/corretgecom/phing-base64/bin/phing/qgpl/corretgecom.qgpl.base64.xml" optional="false" />
<import file="bin/targets/symfony.xml" optional="false" />
<import file="bin/targets/test.xml" optional="false" />
<import file="bin/targets/qcode.xml" optional="false" />
<import file="bin/targets/jmeter.xml" optional="false" />
<import file="bin/targets/db/default.xml" optional="false" />
<import file="bin/targets/db/one_database.xml" optional="false" />

When you execute bin/phing -l targets are not in separated groups but namespaced and sorted by name :)

corretge
  • 1,751
  • 11
  • 24