The Artima Developer Community
Sponsored Link

Java Buzz Forum
Some tips for customising Maven built websites

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic    
Flat View: This topic has 0 replies on 1 page
Nick Lothian

Posts: 397
Nickname: nicklothia
Registered: Jun, 2003

Nick Lothian is Java Developer & Team Leader
Some tips for customising Maven built websites Posted: Jun 26, 2003 4:18 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Nick Lothian.
Original Post: Some tips for customising Maven built websites
Feed Title: BadMagicNumber
Feed URL: http://feeds.feedburner.com/Badmagicnumber
Feed Description: Java, Development and Me
Latest Java Buzz Posts
Latest Java Buzz Posts by Nick Lothian
Latest Posts From BadMagicNumber

Advertisement

Struggling to work out how to customise your Maven built website? Here's a few thing I've figured out. All this is actually documented on the Maven site, but I found it a little hard to find.

The first thing I wanted to do was include some custom pages on my site. To do this, you need to create an "xdocs" directory in the root of your project, and put the files you want to end up on your site in there. Anything except .xml files will be copied to the target/docs directory, which allows you to use images or plain HTML files. If you want your pages to be generated in the same style as the rest of the Maven generated pages, you need to use a format called xdocs. The xdocs format is (somewhat) documented on the Jakarta site (ie, there is an example file). In my experience so far, it is basically a cut down, xmlised version of html.

Now you can run maven site:generate and your new page will be generated. However, it will not show up on the menu yet. To do that you will need to create a file called navigation.xml in your xdocs directory. The format for this file is documented on the Maven site. I needed to leave out the encoding from the example for it to work for me, however.

navigation.xml also controls what Maven calls the "navigation bar". This is the bar across the top of the page, that typically has a link to the Maven site at the top right side. To modify that, create a "links" section inside the body of navigation.xml.

Here's an example navigation.xml:



<?xml version="1.0"?>
<project name="${project}">
	<title>Classifier4J</title>
	<body>
		<links>
			<item name="Sourceforge"  href="http://sourceforge.net/" />
			<item name="Blog"  href="http://www.mackmo.com/nick/blog/"/>
		</links>
		<menu>
			<item name="Home" href="index.html" >
				<item name="Usage" href="usage.html" />
				<item name="Applications" href="applications.html" />
				<item name="Download" href="download.html" />
			</item>
		</menu>
		<!-- footer will be placed above the (c) -->
		<footer>
			<a href="http://sourceforge.net/projects/classifier4j">
			<img src="http://sourceforge.net/sflogo.php?group_id=72748"
			border="0" alt="sf logo"/>
			</a>
		</footer>
	</body>
</project>


Now I'm trying to figure out how to customise the Checkstyle plug-in settings...

Some links I found useful:

Read: Some tips for customising Maven built websites

Topic: ctl+shift+v in IDEA Previous Topic    

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use