Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how do you build a maven site?

8 views
Skip to first unread message

e.d.pro...@gmail.com

unread,
Jan 17, 2023, 3:17:02 PM1/17/23
to
I execute the mvn site command and I'm getting:
[ERROR] Failed to execute goal org.apache.maven.plugins:3.20.0:pmd ... : An error has ocurred in PMD report generation. Failed to create context for skin: Skin does not contain template at META-INF/maven/site.vm
It appears it's somehow looking for the maven default skin but now needs to somehow look for the maven fluido skin. I'm not sure how to specify this or if it can be applied to the whole site phase or needs configured specifically in the pmd.

My surefire report looks good. My spotbugs report looks good. My jacoco report page looks like it's header is broken.
If I reverse the change I made today causing this pmd error, I have 3 separate reports for pmd in their own folders, one for java, one for js, one for jsp, but the main site index.html just has one PMD link that goes to another report which is also java and isn't the custom java one, so I'm trying to find the proper way to configure that.
I've been searching all day and haven't found how to properly configure the site with skins. All I found is something about a skin tag which appears to go inside a project tag in a site.xml file which I think is supposed to be in a src/site folder.

e.d.pro...@gmail.com

unread,
Jan 17, 2023, 3:50:42 PM1/17/23
to
The main site looks good. Changing the maven-site-plugin from 4.0.0-M3 to 4.0.0-M4 changed the whole look and feel and fixed some variable issues, was showing "Last Published: $dateValue", not shows a date.
Changing the doxia-site-renderer artifact from 2.0.0-M3 to 2.0.0-M4 is what breaks the maven-pmd-plugin looking for the old maven-default-skin.
I'm not sure how to set the pmd for the new skin or how to customize the site menu to have links to custom reports.

e.d.pro...@gmail.com

unread,
Jan 18, 2023, 8:46:46 AM1/18/23
to
I figured some things out. My pmd error was caused by my pom plugin tag having a nested dependency tag for some reason. I took that out, looks like it just works.
src/site/site.xml does work, does override all default site generation but there are some simple tags to include defaults.
To include all default menu items:
<body>
<menu ref="parent"/>
<menu ref="modules"/>
<menu ref="reports"/>
</body>
Then inserting custom menu tags and item tags can add menu items to point to the other reports which are not on the menu because they were generated from the plugins section instead of the reporting section.
0 new messages