libary.xml
<project name="buildlibrary" default="hello">
<target name="hello" hidden="yes">
<echo message="Hello World!"/>
</target>
</project>
build.xml
<project name="A Project" default="hello">
<import file="library.xml"/>
<target name="hello" depends="buildlibrary.hello"/>
</project>
Targets from the imported file are prefixed with the name from that file.
Documentation: https://www.phing.info/phing/guide/en/output/chunkhtml/ImportTask.html