Maven Doxia Sitetools
  1. Maven Doxia Sitetools
  2. DOXIASITETOOLS-71

Add the version of doxia-site-renderer that is used to the generated site

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: Site renderer
    • Labels:
      None
    • Number of attachments :
      1

      Description

      In a comment in the generated site documents we currently have this:

      Generated by Apache Maven Doxia $currentDate
      

      We should also add the version, like this:

      Generated by Apache Maven Doxia $doxiaVersion at $currentDate
      

        Issue Links

          Activity

          Hide
          Dennis Lundberg added a comment -

          Fixed in r1310041.

          Show
          Dennis Lundberg added a comment - Fixed in r1310041 .
          Hide
          Robert Scholte added a comment -

          Dennis,

          the solution in the description doesn't exactly match the fix. I'd prefer the $doxiaVersion so we can use it in custom skins as well.

          Show
          Robert Scholte added a comment - Dennis, the solution in the description doesn't exactly match the fix. I'd prefer the $doxiaVersion so we can use it in custom skins as well.
          Hide
          Dennis Lundberg added a comment -

          Robert,

          That would mean exposing $doxiaVersion as a variable to the Velocity template, right?. I'm not sure how to do that. Can you help? The current solution only filters in the version directly into the default Velocity template.

          Show
          Dennis Lundberg added a comment - Robert, That would mean exposing $doxiaVersion as a variable to the Velocity template, right?. I'm not sure how to do that. Can you help? The current solution only filters in the version directly into the default Velocity template.
          Hide
          Dennis Lundberg added a comment -

          Okay, I've looked a bit at the source now and here's what I think needs to be done. In DefaultSiteRenderer#createVelocityContext() we do

          context.put( "doxiaVersion", nnn );
          

          where we need to inject @project.version@ into nnn.

          What's the best way to do that? Should we directly filter that source file or should we add a filtered properties file that contains the version number?

          Show
          Dennis Lundberg added a comment - Okay, I've looked a bit at the source now and here's what I think needs to be done. In DefaultSiteRenderer#createVelocityContext() we do context.put( "doxiaVersion" , nnn ); where we need to inject @project.version@ into nnn . What's the best way to do that? Should we directly filter that source file or should we add a filtered properties file that contains the version number?
          Hide
          Robert Scholte added a comment - - edited

          Dennis,

          I don't like the idea of filtering a source file, so we should use a property-file instead.
          My guess would be to use the /META-INF/maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties

          Show
          Robert Scholte added a comment - - edited Dennis, I don't like the idea of filtering a source file, so we should use a property-file instead. My guess would be to use the /META-INF/maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties
          Hide
          Robert Scholte added a comment -

          This is the patch I had in mind. AFAIK the pom.properties is created by the archiver, so we can't create a junit-test for it, which means we should add an IT. But how to verify it here instead of verifying it with the plugin?

          Show
          Robert Scholte added a comment - This is the patch I had in mind. AFAIK the pom.properties is created by the archiver, so we can't create a junit-test for it, which means we should add an IT. But how to verify it here instead of verifying it with the plugin?
          Hide
          Dennis Lundberg added a comment -

          Thanks! That's pretty much what I came up with as well. New implementation in r1310614.

          Show
          Dennis Lundberg added a comment - Thanks! That's pretty much what I came up with as well. New implementation in r1310614 .
          Hide
          Dennis Lundberg added a comment -

          Minor tweaks in r1310721 and r1310722.

          Show
          Dennis Lundberg added a comment - Minor tweaks in r1310721 and r1310722 .
          Hide
          Robert Scholte added a comment -

          Looks good to me

          Show
          Robert Scholte added a comment - Looks good to me

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Dennis Lundberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: