Issue Details (XML | Word | Printable)

Key: MSITE-275
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Roman Kitko
Votes: 12
Watchers: 9
Operations

If you were logged in you would be able to see more operations.
Maven 2.x Site Plugin

site:stage for multimodule project creates wrong links

Created: 30/Nov/07 09:41 AM   Updated: 29/Jun/09 02:54 PM   Resolved: 27/Jan/09 12:50 PM
Component/s: multi module
Affects Version/s: 2.0-beta-6
Fix Version/s: 2.0

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive MSITE-275-UseCase2.zip (1 kB)
2. Zip Archive MSITE-275.zip (6 kB)

Environment: Debian testing,maven 2.0.8
Issue Links:
Duplicate
 
Related
 
Supercedes
 


 Description  « Hide

For multimodule project when I exec 'mvn site:stage -DstagingDirectory=MY_STAGING_DIR', created links in index.html are hardcoded with path to project dir :

<a href="../../mnt/data/projects/vpda/current/workspace/ws/../../../../../../localhost/home/vpda/site/org.vpda/0.02.01-SNAPSHOT">vpda-common</a>

When I exec mvn site", then index.html in target/site is correctly generated.

There is workaround : use site-deploy and specify some property that is resolved in pom.xml as your deploy site url :
mvn site-deploy -Dvpda.deployUrlSite=file:///home/rki/tmp/XXX

My site.xml :
<project name="vpda-site">
<bannerLeft>
<name>View providers driven applications</name>
<src>images/vpda.jpg</src>
<href>http://vpda.org/</href>
</bannerLeft>
<body>
<links>
<item name="Home" href="index.html" />
<item name="Maven 2" href="http://maven.apache.org/"/>
</links>

<menu name="VPDA" inherit="none">
<item name="Introduction" href="introduction.html"/>
<item name="Usage" href="usage.html"/>
<item name="Downloads" href="../${project.artifactId}-${project.version}.zip"/>
</menu>

<menu ref="modules"/>
<menu ref="reports"/>
<menu ref="parent"/>
</body>
</project>



John Allen added a comment - 28/Jan/08 06:08 PM

We also experience this, the new relative link processing done in beta-6 doesnt work with stage


Dennis Lundberg added a comment - 07/Jun/08 06:14 AM

I used the sample-project attached to MSITE-195 to try this.

Using the latest 2.0-beta-7-SNAPSHOT this issue no longer seems to be a problem.

Can someone else please confirm this?


Benjamin Bentmann added a comment - 11/Jun/08 11:09 AM - edited

Attached is a test project that has working inter-module links in the navibar but weird links for the right banner in the sub modules. To be explicit, both

mvn site:stage

and

mvn site:stage-deploy -DstagingSiteURL=file:/G:/foo

seem to produce bad links for the banner.

As suggested by the reporter, the demo project has a property named site.url that can be used in combination with site-deploy to mimic a regular site deployment on the local disk.


Jörg Hohwiller added a comment - 26/Jul/08 06:12 PM

I reported MSITE-276 which has been marked as a duplicate of this issue.
The bug still exists for 2.0-beta-7.
Could you please test site:stage for your next release!


Jörg Hohwiller added a comment - 20/Jan/09 03:38 PM

I have retested this with 2.0-beta-8-SNAPSHOT and it works.


Hugo Palma added a comment - 10/Mar/09 09:08 AM

I'm still getting this problem with both 2.0-beta-8-SNAPSHOT and 2.0-SNAPSHOT.
If i revert back to 2.0-beta-5 it works fine.


Dennis Lundberg added a comment - 10/Mar/09 11:17 AM

Hugo, if this is not working for you, then you need to supply us with a test project that shows that. This issue has been closed as fixed in 2.0 - so it should work in the current 2.0-SNAPSHOT.


Hugo Palma added a comment - 10/Mar/09 01:05 PM - edited

As it turns out, it doesn't even take a multi-module project.
This simple test case that i've attached also reproduces the problem.

Just run site:stage.


Dennis Lundberg added a comment - 11/Mar/09 11:19 AM

Hugo, I think you are hitting another issue. This issue is about the links from the parent project to the modules. So it takes a multi module project to reproduce it.

Perhaps you are referring to Benjamin's comment about the right banner?
If so, then please create a new issue for that or attach check out MSITE-273 and see if that is what you are experiencing.


Hugo Palma added a comment - 11/Mar/09 11:28 AM

My issue is not about the links from the parent project to the modules but about any links that should be generated from the href attribute on a site.xml file.
I'll create another issue as it has nothing to do with the banner link issue as well.

Thanks.


Jörg Hohwiller added a comment - 29/Jun/09 02:54 PM

I have seen that 2.0 has been released. However links are still totally wrong if site is staged. Has this ever been tested?
Should I reopen this one or what issue has Hugo Palma created, that might still be open? I would tend to reopen 276 since this describes the same problem I still have with 2.0.