Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-365

Links in child modules are wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-6
    • 2.0-beta-7
    • multi module
    • None
    • Windows XP

    Description

      Links in child modules, as specified in that child site's site.xml, point to the wrong location. Where they point wrong varies if you're deploying to a file:/// location or a scp:// location, but regardless they're still wrong.
      I've attached a zip file of the results of these steps, but here are the steps to re-create:

      mvn archetype:create -DgroupId=com.test -DartifactId=parent-site -DarchetypeArtifactId=maven-archetype-site-simple
      Change the <site><url> to file://c:/temp/website
      Add a <url> of file:///c/temp/website
      add <menu ref="modules" /><menu ref="reports" /> to site.xml
      Change the commented out line to read: <item name="Parent Xdoc Example" href="xdoc.html"/>
      create an empty file parent-site/src/site/apt/xdoc.apt

      mvn archetype:create -DgroupId=com.test -DartifactId=child-site -DarchetypeArtifactId=maven-archetype-site-simple
      Change the site URL to file:///c:/temp/website/child-site
      in parent-site/child-site/src/site/site.xml, uncomment the Xdoc Example and set the inherit="top" on the menu.
      add <item name="Foo Example" href="foo.html"/>
      create an empty file parent-site/child-site/src/site/apt/xdoc.apt
      create an empty file parent-site/child-site/src/site/apt/foo.apt
      mvn site site:deploy

      Navigate to the child website in a browser
      Notice: "Parent Xdoc Example" link in child website is wrong. It points to the child's xdoc file.
      Notice: the child's "Xdoc Example" and Foo Example don't point to their respective files. They point to the directory child-site.

      Further: Replacing the file:/// references with scp://server/path result in even further breakage of the same links. Now foo.html points to "../../foo.html" instead of "foo.html"

      Attachments

        1. parent-site.zip
          4 kB
          Stephen Cooper

        Activity

          People

            Unassigned Unassigned
            scooper4711 Stephen Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: