Documentation with Doxia + Ant

I would like to use Doxia to create some documentation, but call it using Ant (and no, Maven is not an option). I searched for some pointers, but after a few google searches nothing came up.

Has anyone already used Doxia in Ant environment and how did it happen?

+3
source share
1 answer

I don't know any Ant Doxia task, it would be easier to use Maven or call the Mvn Ant task from your Ant build to call Doxia ...

If this is really not possible, it should be easy enough to build an Ant custom task to invoke Doxia.

, :

Maven Plexus, Doxia Plexus .
Plexus, .

, SiteTools . Ant, , Ant.

public class DoxiaPlexusTest
{
    public static void main( String[] args )
        throws Exception {
        // create a new container
        PlexusContainer container = new DefaultPlexusContainer();

        SiteTool siteTool = container.lookup( SiteTool.class );

        try {
            new DoxiaPlexusTest().letsDoDoxia(siteTool);
        finally {
            // stop the components and container
            container.dispose();
        }
    }

    public void letsDoDoxia(SiteTool siteTool) {
        List localesList = siteTool.getAvailableLocales( locales );
        String relativePath = siteTool.getRelativePath( "C:/foo/child",
                            "C:/foo/master" );
        ...
    }
}
+3

Source: https://habr.com/ru/post/1719749/


All Articles