APT (Almost Plain Text) and Generation
A person who is interested in Maven 2 that generally comes face to face apt formats. Because as we know that , when we wanna prepare documentation about our java system , it serves maven site generation and maven site provides us to create javadoc,test and quality reports and whatever you wanna write except those features as well. At that point Apt is needed.
Iniatially u have to create a directory like that ;

In your workspace –> your project –>src ; that directory is created when you open new project. after that u have to create a site folder and inside both of red lines should be created(those are required). when u write apt , maven convert your plain text to html site in like that directory ;

if you need more information about writing apt , it ll be better to visit http://maven.apache.org/doxia/references/apt-format.html (it is enough in order to understand syntax of apt).
The last important thing is that generation of site.xml . Firstly u have to use that maven goals –> site:attach-descriptor , or u can attach it on your ownself .
An example of site.xml ;
<?xml version=”1.0″ encoding=”UTF-8″?>
<project name=”${project.name}”>
<bannerLeft>
<name>My database</name>
<src>db.gif</src>
<href>http://www.cemilearikan.com</href>
</bannerLeft>
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-classic-skin</artifactId>
<version>1.0</version>
</skin>
<body>
<menu name=”Common Framework”>
<item name=”Overview” href=”index.html” />
<item name=”News” href=”news.html” />
<item name=”Features” href=”features.html” />
<item name=”Installation” href=”installation.html” />
<item name=”Configuration” href=”configuration.html” />
<item name=”FAQ” href=”faq.html” />
</menu>
<menu name=”Architectural Information”>
<item name=”Developer Resources” >
<item name=”System Architecture” href=”development.html”/>
<item name=”User Guide” href=”guide.html”/>
</item>
</menu>
<menu ref=”reports” />
<breadcrumbs>
<item name=”Codehaus” href=”http://www.codehaus.org”/>
<item name=”Mojo” href=”http://mojo.codehaus.org”/>
</breadcrumbs>
</body>
</project>
As you see the html site’s names , firstly u ll write apts and ll give the names, for instance development.apt and after according to the your apt name you will write menu’s link and according to the given link maven ll generate htmls from apts.
That is it
Good luck
Related posts:
