Using the SiteTool in a Mojo

...
import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Mojo;
...

/**
 * Your own mojo.
 */
@Mojo( name = "your-own" )
public class YourOwnMojo extends AbstractMojo
{
    ...

    /**
     * SiteTool.
     */
    @Component
    protected SiteTool siteTool;

    ...

    public someMethod()
    {
        List localesList = siteTool.getSiteLocales( locales );
        String relativePath = siteTool.getRelativePath( "C:/foo/child",
                                                        "C:/foo/master" );
        ...
    }

    ...
}

References

  1. SiteTool API