Maven Parent Pom with custom site.xml and images
-
07-10-2022 - |
Pregunta
I'm currently struggling with the maven site plugin. I have a corporporate/ super pom (packaging type pom) which defines all dependency version and also configures the site plugin. In addition I placed some image resources under /src/site/resources/images which are referenced in a custom site.xml (for example ./images/logo.jpg).
Another module references this parent pom and when I call mvn site it seems that the site.xml is getting picked up. But unfortunately the links to the images do not work. When I had a look in the target/site folder the images were missing. I also tried to create an additional 'corporate' resource module where I put the site resources (also under /src/site/resources), and reference this module as a dependency in the maven-site-plugin like this:
<build><plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin.version}</version>
<dependencies>
<dependency>
<groupId>de.il</groupId>
<artifactId>build-tools</artifactId>
<version>${build-tools.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>attach-descriptor</id>
<goals>
<goal>attach-descriptor</goal>
</goals>
</execution>
</executions>
<configuration>
<reportPlugins>
<plugin>
....
But this does not seem to work either. It worked for other reporting modules like pmd with special configurations which were placed under /src/main/resources though...the site resources does not seemed to be picked up and published to the repository.
So the question is: How is it possible to attach images and stylesheets to a maven super pom? I'm using Maven 3 btw...
No hay solución correcta