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
Fixed in r1310041.
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.
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.
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?
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
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?
Thanks! That's pretty much what I came up with as well. New implementation in r1310614.
Minor tweaks in r1310721 and r1310722.
Looks good to me