🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# Chapter 5 Project components This goal of this chapter is to make you familiar with the basic components of a buildfile. After reading this chapter, you should be able to read and understand the basic structure of any buildfile even if you don't know exactly what the individual pieces do. For supplemental reference information, you should see [Appendix聽B](apb.html "Appendix B. Core tasks"), [Appendix聽D](apd.html "Appendix D. Core Types") and [Appendix聽H](aph.html "Appendix H. Project Components"). 5.1 Projects In the structure of a Phing buildfile, there must be exactly one `Project` defined; the `<project> `tag is the root element of the buildfile, meaning that everything else in the buildfile is contained within the `<project` > element. ``` <?xml version="1.0"?> <project name="test" description="Simple test build file" default="main" > <!-- Everything else here --> <project> ``` The listing above shows a sample `<project>` tag that has all attributes available for Projects. The `name` and `description` attributes are fairly self-explanatory; the `default` attribute specifies the default `Target` to execute if no target is specified ([Section聽H.2](aphs02.html "H.2 Targets") are described below). For a complete reference, see [Appendix聽H](aph.html "Appendix H. Project Components").