Uploaded image for project: '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
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3
    • Component/s: Site renderer
    • Labels:
      None

      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
          rfscholte Robert Scholte added a comment -

          Looks good to me

          Show
          rfscholte Robert Scholte added a comment - Looks good to me
          Hide
          dennisl@apache.org Dennis Lundberg added a comment -

          Minor tweaks in r1310721 and r1310722.

          Show
          dennisl@apache.org Dennis Lundberg added a comment - Minor tweaks in r1310721 and r1310722 .
          Hide
          dennisl@apache.org Dennis Lundberg added a comment -

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

          Show
          dennisl@apache.org Dennis Lundberg added a comment - Thanks! That's pretty much what I came up with as well. New implementation in r1310614 .
          Hide
          rfscholte 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
          rfscholte 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
          rfscholte 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
          rfscholte 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
          dennisl@apache.org 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
          dennisl@apache.org 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
          dennisl@apache.org 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
          dennisl@apache.org 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
          rfscholte 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
          rfscholte 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
          dennisl@apache.org Dennis Lundberg added a comment -

          Fixed in r1310041.

          Show
          dennisl@apache.org Dennis Lundberg added a comment - Fixed in r1310041 .

            People

            • Assignee:
              dennisl@apache.org Dennis Lundberg
              Reporter:
              dennisl@apache.org Dennis Lundberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development