To add or override a Phing target, you may create a custom build file. You must specify the location of your custom build file using the import
key to your project.yml file.
<project name="custom" default="build">
<!-- Add custom targets. -->
</project>
To override an existing target, just give it the same name as the default target provided by BLT. E.g.,
<project name="custom" default="build">
<patternset id="files.frontend">
<include name="**/*.js"/>
<!-- Ignore custom bootstrap_sass directory. -->
<exclude name="**/bootstrap_sass/**/*"/>
</patternset>
</project>
You can override the value of any Phing variable used by BLT by either:
-
Adding the variable to your project.yml file:
behat.tags: @mytags
-
Specifying the variable value in your
blt
command using Phing argument syntax-D[key]=[value]
, e.g.,blt tests:behat -Dbehat.tags='@mytags'
-
Using a custom build properties file rather than project.yml:
blt tests:behat -propertyfile mycustomfile.yml -propertyfileoverride