Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
<project name="my-ant-project">

   <target name="my-target">
    <sitemesh srcdir="project/src"
              config="project/sitemesh.xml"
              destdir="project/build"
              includes="*/.html"
              excludes="decorators/*"/>
  </target>



</project>

The benefit to the above is that all configuration is externalized from the the build.xml file.

...

No Format
<project name="my-ant-project">


  <target name="my-target">

    <sitemesh destdir="site/documentation"
              config="config/sitemesh.xml">

      <sitemeshfileset dir="documentation">
        <include name="*/.html"/>
        <exclude name="private/*"/>
      </sitemeshfileset>

      <sitemeshfileset dir="presentation">
        <include name="*/.html"/>
      </sitemeshfileset>

    </sitemesh>
  </target>

</project>
Using the sitemesh task with the sitemeshfileset with an associated decorator

...

No Format
<project name="my-ant-project">

  <target name="generate-with-custom-decorator"
description="Generate static content that's internal to the company.">
my-target">
    <sitemesh destdir="site/documentation">
      <sitemeshfileset dir="documentation"
                       decorator="decorators/private.html">
        <include name="private/*.html"/>
      </sitemeshfileset>
    </sitemesh>
  </target>

</project>