You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by bill_s <bs...@powercosts.com> on 2012/12/10 16:48:50 UTC

Trouble with link on my 'maven site' when child projects aren't subfolders of parent project

After publishing the maven site for my project, I'm having problems with the
relative links working correctly on the site menu under the section 'Parent
Project'.  Right now, it points to '../../index.html'.  However, the true
location of the parent site is '../parent/index.html'

I think the directory structure of our project has something to do with it,
but it isn't easy to change and I'm having trouble figuring out where I can
make adjustments to fix the site links instead of reorganizing all our
projects.

Instead of the obvious folder structure for parents and children like this:



Our folder structure looks like this:


Looking at the pom.xml for CHILD, we have the following defined for the
dependencies:

and this defined for the parent:


I run 'mvn clean' then 'mvn site' then 'mvn site:deploy' (not sure if all
those are necessary, but I'm a beginner and I've found it works).  When I
view the site and look at the webpage for CHILD, the 'Modules' links on the
menu of the site link correctly but the 'Parent Project' links do not point
to the correct location.  It seems they always just point up one level site
directory structure.

What is the best way to handle this so links to parent project will be
correct?  For example, instead of the parent of CHILD pointing to
../../index.html, I need it to point to ../parent/index.html.

I'm using maven-site-plugin:3.0.  I haven't set up any site descriptor files
yet, but I can do that if needed.  My distributionManagement site url is
defined only in the pom.xml file for 'parent'.

Thanks,
Bill



--
View this message in context: http://maven.40175.n5.nabble.com/Trouble-with-link-on-my-maven-site-when-child-projects-aren-t-subfolders-of-parent-project-tp5736877.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: Trouble with link on my 'maven site' when child projects aren't subfolders of parent project

Posted by Lukas Theussl <lt...@apache.org>.

bill_s wrote:
> After publishing the maven site for my project, I'm having problems with the
> relative links working correctly on the site menu under the section 'Parent
> Project'.  Right now, it points to '../../index.html'.  However, the true
> location of the parent site is '../parent/index.html'
> 
> I think the directory structure of our project has something to do with it,
> but it isn't easy to change and I'm having trouble figuring out where I can
> make adjustments to fix the site links instead of reorganizing all our
> projects.
> 
> Instead of the obvious folder structure for parents and children like this:
> 
> 
> 
> Our folder structure looks like this:
> 
> 
> Looking at the pom.xml for CHILD, we have the following defined for the
> dependencies:
> 
> and this defined for the parent:
> 
> 
> I run 'mvn clean' then 'mvn site' then 'mvn site:deploy' (not sure if all
> those are necessary, but I'm a beginner and I've found it works).  When I
> view the site and look at the webpage for CHILD, the 'Modules' links on the
> menu of the site link correctly but the 'Parent Project' links do not point
> to the correct location.  It seems they always just point up one level site
> directory structure.
> 
> What is the best way to handle this so links to parent project will be
> correct?  For example, instead of the parent of CHILD pointing to
> ../../index.html, I need it to point to ../parent/index.html.
> 
> I'm using maven-site-plugin:3.0.  I haven't set up any site descriptor files
> yet, but I can do that if needed.  My distributionManagement site url is
> defined only in the pom.xml file for 'parent'.

Solution: specify correct distributionManagement urls in all
sub-projects, see

http://maven.apache.org/plugins/maven-site-plugin/examples/multimodule.html#Staging_and_deploying

HTH,
-Lukas


> 
> Thanks,
> Bill
> 
> 
> 
> --
> View this message in context: http://maven.40175.n5.nabble.com/Trouble-with-link-on-my-maven-site-when-child-projects-aren-t-subfolders-of-parent-project-tp5736877.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
> 

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