You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ginni <gi...@aero.org> on 2010/11/02 20:08:11 UTC

Maven Site Customization

I have tried setting up site.xml in a parent pom project, with the following:

<?xml version="1.0" encoding="ISO-8859-1"?>

<site>

  <project name="iCAMS">
  
    <bannerLeft>
      <name>iCAMS</name>
      <src>images/AER_logo_k.jpg</src>
      <href>http://aerosource.aero.org/icams</href>
    </bannerLeft>
  
    <bannerRight>
      <src>http://maven.apache.org/images/maven-small.gif</src>
    </bannerRight>
    
  	<publishDate position="right"/>
  	
  	<version position="right"/>
  	
  	<poweredBy>
  		<logo name="Aerospace Application Development Department" 
  		href="https://aerosource.aero.org/add"
  		img="images/AER_logo_k.jpg"/>
  	</poweredBy>
  	
  
  <body>
    <menu name="iCAMS Project" inherit="top">
    	<item name="Overview" href="index.html"/>
    </menu>
    <menu ref="reports"/>
    <links>
   	  <item name="Aerosource Project" href="http://aerosource/icams"/>
      <item name="Inside Aerospace" href="http://info.aero.org/"/>
      <item name="Aerospace Corporation" href="http://www.aero.org/"/>
    </links>
  </body>
</site>

However, when I run mvn site-deploy and access the site, the graphics I
mention are not shown. I do see my index.html as the Overview page, but if I
navigate to any link in the navigation panel, I can no longer return to
Overview (it is not included in the panel). None of my links are included
either.

This looks like a wonderfully powerful way to document our project
(multi-module with a grandparent POM project, a parent POM project (with
modules) and modules under that.  But, I have yet to make this basic part
work.  Is there any better documentation of this customization, or working
example to follow?

Thanks!

Ginni
-- 
View this message in context: http://maven.40175.n5.nabble.com/Maven-Site-Customization-tp3247261p3247261.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-11-03 14:22, ginni wrote:
> 
> So it is not possible to include external links in the Site?

Yes of course it is, but the external site won't have the skin that you
use for your project and they will not get the navigation of your project.

> Yes, my graphic is in src/site/resources/images within the project.
> 
> Why would I see the Overview page only the first time I load the Site and
> not be able to navigate back to it?
> 
> Thanks for replying!
> 
> Ginni


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by ginni <gi...@aero.org>.
Hi,

Yes, I do have the <relativePath> in each pom parent declaration.  And, I
have read the FAQs.

Here's what I am getting when I run site:stage at the topmost parent pom
project: 
  http://maven.40175.n5.nabble.com/file/n3249031/dirs.gif 

In 'site' I see index.html.  When I open it, I see the index.apt I created. 
There are none of the links I put into site.xml in it, nor the graphic
header I listed in there.  But the overview page is there.  The navigation
allows me to drill into the common module and from common, I can drill into
the other modules. Once I do so, I cannot return back up to a parent project
via the leftmost navigation; there are no links to do so.

I presumed by including links in site.xml they would just be included (like
reference sites) in the navigation. It that not the case? I was not
expecting the project style to be applied to the external sites.

Thanks again,
Ginni
-- 
View this message in context: http://maven.40175.n5.nabble.com/Maven-Site-Customization-tp3247261p3249031.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-11-03 17:02, ginni wrote:
> 
> Also, I added site.xml to each of the pom projects that are 'modules' of the
> parent.  The structure is like this:
> 
> http://maven.40175.n5.nabble.com/file/n3248665/project-structure.gif 
> 
> where aero is the parent pom. common is also a parent pom with aero as its
> parent. Its modules are all those under common. The other projects (e.g.,
> justification) are pom projects with common as the parent and the sub
> projects (e.g., justification-data) as modules.
> 
> I added site.xml to each of the pom projects to describe them and included
> ref="parent", ref="modules" and ref="reports" in each one.  However, when I
> look at the common project, I see no link to the aero parent.
> Again, my images do not show up, though my index.apt files are being used. 
> Does some information in the pom.xml overwrite what is specified in
> site.xml?

Have you set the <relativePath> element in the parent declaration of
your POMs? The site generation uses those to try to determine the
relative path between parent and child sites.

Oh, have you read the FAQ? In particular:

http://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_dont_the_links_between_parent_and_child_modules_work_when_I_run_mvn_site


> 
> Additionally, there is no link to javadocs.  How do I set all of this up
> correctly?

I would suggest that you pick up one of the books on Maven to get the
complete picture. Some of them are available as free downloads:

http://maven.apache.org/articles.html

> 
> Thanks!


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by ginni <gi...@aero.org>.
Also, I added site.xml to each of the pom projects that are 'modules' of the
parent.  The structure is like this:

http://maven.40175.n5.nabble.com/file/n3248665/project-structure.gif 

where aero is the parent pom. common is also a parent pom with aero as its
parent. Its modules are all those under common. The other projects (e.g.,
justification) are pom projects with common as the parent and the sub
projects (e.g., justification-data) as modules.

I added site.xml to each of the pom projects to describe them and included
ref="parent", ref="modules" and ref="reports" in each one.  However, when I
look at the common project, I see no link to the aero parent.
Again, my images do not show up, though my index.apt files are being used. 
Does some information in the pom.xml overwrite what is specified in
site.xml?

Additionally, there is no link to javadocs.  How do I set all of this up
correctly?

Thanks!
-- 
View this message in context: http://maven.40175.n5.nabble.com/Maven-Site-Customization-tp3247261p3248665.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by ginni <gi...@aero.org>.
So it is not possible to include external links in the Site?

Yes, my graphic is in src/site/resources/images within the project.

Why would I see the Overview page only the first time I load the Site and
not be able to navigate back to it?

Thanks for replying!

Ginni
-- 
View this message in context: http://maven.40175.n5.nabble.com/Maven-Site-Customization-tp3247261p3248405.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Site Customization

Posted by Dennis Lundberg <de...@apache.org>.
On 2010-11-02 20:08, ginni wrote:
> 
> I have tried setting up site.xml in a parent pom project, with the following:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <site>
> 
>   <project name="iCAMS">
>   
>     <bannerLeft>
>       <name>iCAMS</name>
>       <src>images/AER_logo_k.jpg</src>
>       <href>http://aerosource.aero.org/icams</href>
>     </bannerLeft>
>   
>     <bannerRight>
>       <src>http://maven.apache.org/images/maven-small.gif</src>
>     </bannerRight>
>     
>   	<publishDate position="right"/>
>   	
>   	<version position="right"/>
>   	
>   	<poweredBy>
>   		<logo name="Aerospace Application Development Department" 
>   		href="https://aerosource.aero.org/add"
>   		img="images/AER_logo_k.jpg"/>
>   	</poweredBy>
>   	
>   
>   <body>
>     <menu name="iCAMS Project" inherit="top">
>     	<item name="Overview" href="index.html"/>
>     </menu>
>     <menu ref="reports"/>
>     <links>
>    	  <item name="Aerosource Project" href="http://aerosource/icams"/>
>       <item name="Inside Aerospace" href="http://info.aero.org/"/>
>       <item name="Aerospace Corporation" href="http://www.aero.org/"/>
>     </links>
>   </body>
> </site>
> 
> However, when I run mvn site-deploy and access the site, the graphics I
> mention are not shown.

Have you included the images in the src/site/resources folder of the
project you are building? Note that such resources are not inherited.

> I do see my index.html as the Overview page, but if I
> navigate to any link in the navigation panel, I can no longer return to
> Overview (it is not included in the panel). None of my links are included
> either.

That is to be expected, as the link you have in your site.xml are
"external" links, i.e. full URLs.

> This looks like a wonderfully powerful way to document our project
> (multi-module with a grandparent POM project, a parent POM project (with
> modules) and modules under that.  But, I have yet to make this basic part
> work.  Is there any better documentation of this customization, or working
> example to follow?

The Site Plugin has docs at

http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html

> 
> Thanks!
> 
> Ginni


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org