Skip to main content

Ant Task to generate an XML Sitemap

·1 min

I use Ant for more than just Java projects, including building my own website. So I have written an Ant task to generate an XML Sitemap and released the first version.

Here is an example of using the task:

<target name="generate_sitemap" description="generates the sitemap">
    <taskdef classname="uk.co.arjones.ant.task.Sitemap" name="sitemap"></taskdef>
    <sitemap url="http://andrew-jones.com" gzip="yes" lastmod="now" destdir="${BUILD_DIR}">
        <fileset dir="${BUILD_DIR}">
            <include name="**.htm"></include>
            <include name="**.html"></include>
            <exclude name="google*"></exclude>
        </fileset>
    </sitemap>
</target>

Its pretty self-explanatory. For more information and to download it, go to the project page on GitHub.


Want great, practical advice on implementing data mesh, data products and data contracts?

In my weekly newsletter I share with you an original post and links to what's new and cool in the world of data mesh, data products, and data contracts.

I also include a little pun, because why not? 😅

    Newsletter

    (Don’t worry—I hate spam, too, and I’ll NEVER share your email address with anyone!)


    Andrew Jones
    Author
    Andrew Jones
    I build data platforms that reduce risk and drive revenue.