java - Is it possible to create a generic site.xml in a enterprise pom that is inherited by all projects? -
i have parent pom organization:
<project <groupid>org.myorg</groupid> <artifactid>oss-parent</artifactid> <packaging>pom</packaging> <version>6-snapshot</version> ... </project>
and in same project site.xml:
<project> <skin> <groupid>org.apache.maven.skins</groupid> <artifactid>maven-fluido-skin</artifactid> <version>1.5</version> </skin> <custom> <fluidoskin> <sidebarenabled>true</sidebarenabled> </fluidoskin> </custom> <body> <menu ref="reports" /> </body> </project>
if run mvn clean site
fluido theme.
now, in actual project somewhere else in org, inherits our enterprise pom, not part of module build it:
<project> <modelversion>4.0.0</modelversion> <parent> <groupid>org.myorg</groupid> <artifactid>oss-parent</artifactid> <version>6-snapshot</version> </parent> ... <artifactid>my-project</artifactid> ... </project>
but when run mvn clean site
under my-project
normal theme, not fluido theme. gives?
figured out. used work, default beahavior changed:
https://maven.apache.org/plugins/maven-site-plugin/attach-descriptor-mojo.html
this default execution has been removed built-in lifecycle of maven 3.x pom-projects. users use projects provide common site descriptor sub modules need explicitly define goal execution restore intended behavior.
to fix:
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-site-plugin</artifactid> <version>3.5.1</version> </plugin> </plugins> </pluginmanagement> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-site-plugin</artifactid> <configuration> <attach>true</attach> </configuration> </plugin> </plugins> </build>
edit
while make theme inherit, left sidebar blank! see followup question here: maven-site-plugin: <body> tag not being inherited