Configuring the Maven 2 plugin

Maven 2 users can easily add XSite as a dependency to their projects. Add the following repositories to the POM:

<repositories>
	<repository>
		<id>codehaus-repository</id>
		<name>Codehaus Repository</name>
		<url>http://repository.codehaus.org</url>
	</repository>
	<repository>
		<id>codehaus-snapshots-repository</id>
		<name>Codehaus Snapshots Repository</name>
		<url>http://snapshots.repository.codehaus.org</url>
	</repository>
</repositories>		
and add XSite plugin configuration:
  <plugins>
    <plugin>
        <groupId>org.codehaus.xsite</groupId>
        <artifactId>xsite-maven-plugin</artifactId>
        <configuration>
            <sourceDirectoryPath>${basedir}/src/sitel</sourceDirectoryPath>
            <sitemapPath>content/sitemap.xml</sitemapPath>
            <skinPath>templates/skin.html</skinPath>
            <resourcePaths>resources</resourcePaths>
            <localisations>it,fr,pt</localisations>
            <outputDirectoryPath>${basedir}/target/xsite</outputDirectoryPath>
        </configuration>
        <executions>
            <execution>
                <phase>install</phase>
                <goals>
                    <goal>run</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
</plugins>

Configuring the Ant task

Ant users can easily use XSite task:

<taskdef name="xsite" classname="org.codehaus.xsite.ant.XSiteTask"/>
<xsite sourceDirectoryPath="${basedir}/src/xsite" sitemapPath="content/sitemap.xml" 
		skinPath="templates/skin.html" resourcePaths="resources" localisations="it,fr,pt"
		outputDirectoryPath="${basedir}/target/xsite"/>