Maven 2.x and 3.x Site Plugin

site:stage for multimodule project creates wrong links

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: 2.0
  • Component/s: multi module
  • Labels:
    None
  • Environment:
    Debian testing,maven 2.0.8
  • Number of attachments :
    2

Description

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>

Issue Links

Activity

Hide
John Allen added a comment -

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

Show
John Allen added a comment - We also experience this, the new relative link processing done in beta-6 doesnt work with stage
Hide
Dennis Lundberg added a comment -

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?

Show
Dennis Lundberg added a comment - 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?
Hide
Benjamin Bentmann added a comment - - 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.

Show
Benjamin Bentmann added a comment - - 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.
Hide
Jörg Hohwiller added a comment -

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!

Show
Jörg Hohwiller added a comment - 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!
Hide
Jörg Hohwiller added a comment -

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

Show
Jörg Hohwiller added a comment - I have retested this with 2.0-beta-8-SNAPSHOT and it works.
Hide
Hugo Palma added a comment -

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.

Show
Hugo Palma added a comment - 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.
Hide
Dennis Lundberg added a comment -

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.

Show
Dennis Lundberg added a comment - 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.
Hide
Hugo Palma added a comment - - 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.

Show
Hugo Palma added a comment - - 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.
Hide
Dennis Lundberg added a comment -

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.

Show
Dennis Lundberg added a comment - 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.
Hide
Hugo Palma added a comment -

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.

Show
Hugo Palma added a comment - 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.
Hide
Jörg Hohwiller added a comment -

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.

Show
Jörg Hohwiller added a comment - 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.

People

Vote (12)
Watch (9)

Dates

  • Created:
    Updated:
    Resolved: