
Untitled
By: a guest on
May 28th, 2012 | syntax:
None | size: 1.38 KB | hits: 13 | expires: Never
Exclude files with Ant
<project name="MyProject" default="build" basedir=".">
<property name="buildDir" value="${basedir}/build"/>
<property name="componente" value="${basedir}/trunk/componente"/>
<property name="backend" value="${componente}/backend"/>
<property name="frontend" value="${componente}/frontend"/>
<target name="build" depends="cleanup, pro, free" />
<!-- Clean up the build directory output -->
<target name="cleanup">
<echo>Clean up build directory</echo>
<delete includeemptydirs="true">
<fileset dir="${buildDir}" includes="**/*"/>
</delete>
</target>
<!-- Create the pro package (no file exclusion) -->
<target name="pro">
<echo>Build pro version</echo>
<zip destfile="${buildDir}/pro.zip" basedir="${componente}" />
</target>
<!-- Create the free package (file exclusion) -->
<target name="free">
<echo>Build free version</echo>
</target>
<zip destfile="${buildDir}/free.zip"
basedir="${componente}"
excludes="**/features/pro/**, **/other/**"/>
<fileset dir="${files.directory}" casesensitive="yes">
<include name="**/*free.php"/>
<exclude name="**/*pro.php"/>
</fileset>
<target name="free">
<zip destfile="${buildDir}/pro.zip">
<fileset dir="${componente}">
<not>
<containsregexp expression="@category[ t]+ProPackage"/>
</not>
</fileset>
</zip>
</target>