blob: 2c8dd1a05210d9014717f94b7ba1d51779893042 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<project name="samples">
<description>
Samples Targets
</description>
<target name="samples" depends="clover.off"
unless="internal.exclude.webapp.samples">
<mkdir dir="${build.samples}"/>
<cocoon.javac srcdir="${samples}"
destdir="${build.samples}"/>
<!-- copy sample files -->
<copy todir="${build.webapp.samples}" filtering="on">
<fileset dir="${webapp.samples}">
<exclude name="samples.xwelcome"/>
<exclude name="old_sitemap.xmap"/>
<exclude name="**/*.jpg"/>
<exclude name="**/*.gif"/>
<exclude name="**/*.png"/>
<exclude name="**/*.zip"/>
<exclude name="**/*.sxw"/>
<!-- filtering breaks UTF-8 files -->
<exclude name="i18n/**"/>
</fileset>
</copy>
<copy todir="${build.webapp.samples}" filtering="off">
<fileset dir="${webapp.samples}">
<include name="**/*.jpg"/>
<include name="**/*.gif"/>
<include name="**/*.png"/>
<include name="**/*.zip"/>
<include name="**/*.sxw"/>
<include name="i18n/**"/>
<include name="hello-world/style/**"/>
</fileset>
</copy>
<!-- copy gump.xml which is used to create block samples page -->
<copy file="${gump.descriptor}" todir="${build.webapp.samples}/blocks"/>
<!-- copy sample classes -->
<copy todir="${build.webapp.classes}" filtering="off">
<fileset dir="${build.samples}"/>
</copy>
<!-- patch the welcome page to tell we have samples to show -->
<xpatch file="${build.webapp}/welcome.xml"
srcdir="${webapp.samples}"
includes="**/*.xwelcome"/>
</target>
<target name="block-samples" unless="internal.exclude.webapp.samples">
<ant antfile="${build.temp}/blocks-build.xml"
inheritAll="true"
inheritRefs="false"
target="samples"/>
</target>
</project>