Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.10
    • Labels:
      None
    • Number of attachments :
      4

      Description

      While it is possible to set an URL for an own theme using the new property maven.xdoc.theme.url, you cannot tell the xdoc plugin which local file you are using. The current approach enforces every project to have its own copy of the theme. This is extremly nasty in combination with multiproject.

      Proposal: Support a new property maven.xdoc.theme.file, that defines the local location of the theme file. This file is copied into the $

      {maven.docs.dest}

      /style directory.

      Please have a look at jakarta-commons, they suffer from this problem also: http://www.mail-archive.com/commons-dev%40jakarta.apache.org/index.html#35557

      1. MPXDOC-80.patch
        3 kB
        Lukas Theussl
      2. plugin.jelly.diff
        0.8 kB
        Jörg Schaible
      3. properties.xml.diff
        1 kB
        Jörg Schaible
      4. xdoc-theme.diff
        2 kB
        Jörg Schaible

        Activity

        Hide
        Jörg Schaible added a comment -

        Patch for plugin.jelly to support the new property.

        Show
        Jörg Schaible added a comment - Patch for plugin.jelly to support the new property.
        Hide
        Jörg Schaible added a comment -

        Patch to xdocs/propüerties.xml describing the new maven.xdoc.theme.* properties.

        BTW: Are the maven.ui.* properties still valid?

        Show
        Jörg Schaible added a comment - Patch to xdocs/propüerties.xml describing the new maven.xdoc.theme.* properties. BTW: Are the maven.ui.* properties still valid?
        Hide
        Jörg Schaible added a comment -

        xdoc-theme.diff

        Updated patch to support a global theme. Patch for plugin.jelly and xdoc/properties.xml.

        Show
        Jörg Schaible added a comment - xdoc-theme.diff Updated patch to support a global theme. Patch for plugin.jelly and xdoc/properties.xml.
        Hide
        Brett Porter added a comment -

        does this assume that you are using a custom site.jsl? There isn't any hook into the default site.jsl.

        Show
        Brett Porter added a comment - does this assume that you are using a custom site.jsl? There isn't any hook into the default site.jsl.
        Hide
        Jörg Schaible added a comment -

        No, not at all. This patch has nothing to do with a jsl file. It's just the location, where your theme (css file) is physically located, that you want to use in all your subprojects. Currently you have to have such a css in every "xdocs/stylesheets" folder. With the patch, the defined file is copied into each projects' $

        {maven.docs.dest}

        /style folder.

        Working example:
        maven.xdoc.theme=my-theme
        maven.xdoc.theme.file=$

        {maven.multiproject.basedir}

        /root/xdocs/stylesheets/maven-my-theme.css

        Show
        Jörg Schaible added a comment - No, not at all. This patch has nothing to do with a jsl file. It's just the location, where your theme (css file) is physically located, that you want to use in all your subprojects. Currently you have to have such a css in every "xdocs/stylesheets" folder. With the patch, the defined file is copied into each projects' $ {maven.docs.dest} /style folder. Working example: maven.xdoc.theme=my-theme maven.xdoc.theme.file=$ {maven.multiproject.basedir} /root/xdocs/stylesheets/maven-my-theme.css
        Hide
        Lukas Theussl added a comment -

        Hi Joerg,

        I had to adapt your patch quite a bit to the current Maven trunk. Can you test please if the attached patch still does what you want? Also, I couldn't get it to work with the $

        {maven.multiproject.basedir}

        property as you suggested. Instead the maven.xdoc.theme.file should be specified as relative to the current project's $

        {basedir}

        . Let me know if you are happy (or not) and I will commit it.

        Show
        Lukas Theussl added a comment - Hi Joerg, I had to adapt your patch quite a bit to the current Maven trunk. Can you test please if the attached patch still does what you want? Also, I couldn't get it to work with the $ {maven.multiproject.basedir} property as you suggested. Instead the maven.xdoc.theme.file should be specified as relative to the current project's $ {basedir} . Let me know if you are happy (or not) and I will commit it.
        Hide
        Jörg Schaible added a comment -

        Hi Lukas,

        thanks for working on it. Your patch basically does, what we need, allthough I would prefer to keep the base of file name instead of customCSS.css (a corporate identity thingy). Regarding maven.multiproject.basedir it depends, how it is defined. We always use something like "$

        {basedir}

        /..", so we have an absolute path here and the copy task works fine then.

        Regards,
        Jörg

        Show
        Jörg Schaible added a comment - Hi Lukas, thanks for working on it. Your patch basically does, what we need, allthough I would prefer to keep the base of file name instead of customCSS.css (a corporate identity thingy). Regarding maven.multiproject.basedir it depends, how it is defined. We always use something like "$ {basedir} /..", so we have an absolute path here and the copy task works fine then. Regards, Jörg
        Hide
        Lukas Theussl added a comment -

        Patch applied with slight modifications. Thanks!

        Show
        Lukas Theussl added a comment - Patch applied with slight modifications. Thanks!

          People

          • Assignee:
            Lukas Theussl
            Reporter:
            Jörg Schaible
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10 minutes
              10m
              Remaining:
              Remaining Estimate - 10 minutes
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified