John Ellinwood
John Ellinwood

Reputation: 14531

Property Replacement in Maven Site Content

I'm generating maven site content using the site plugin. I want to have a little table that shows my maven group id, artifact id, parent info, etc on the module. I don't see a plugin for it, so I was going to use the APT format and create a content page with a table for it. The documentation says I can use property replacement in the site descriptor via ${project.name} etc. This fails when i use it in both the descriptor and in my index.apt file. Has anybody seen this done or know how to do it?

Upvotes: 0

Views: 154

Answers (2)

khmarbaise
khmarbaise

Reputation: 97487

If you want to create pages which use placeholder like ${project.version} etc. you need to use index.apt.vm (velocity files) wher the replacement works. But for the information you have asked the solution which has been described (project-summary.html) is the right way cause it's automatically generated.

Upvotes: 0

Bellini
Bellini

Reputation: 352

The mvn site command generates a Project Summary page which has this information on it. Does that work for you?

For example, when I execute mvn site, get an output here target/site/project-summary.html where the page has a section like so:

Build Information

Field       Value
GroupId     com.a.b
ArtifactId  myapp
Version     1.01.13-SNAPSHOT
Type        jar

Upvotes: 0

Related Questions