Maven Parent Pom with custom site.xml and images

I am currently struggling with the maven site plugin. I have a corporation / super pom (type of packaging pom), which defines the entire version of the dependencies, and also configures the site plugin. In addition, I put some image resources in / src / site / resources / images that are referenced in a custom site.xml (e.g.. / Images / logo.jpg).

Another module refers to this parent pom, and when I call the mvn site, it seems that site.xml is getting. But, unfortunately, image links do not work. When I looked in the target / site folder, the images were missing. I also tried to create an additional “corporate” resource module, where I hosted the site resources (also under / src / site / resources) and referred to this module as a dependency in the maven-site-plugin as follows:

<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 that doesn't work either. It worked for other reporting modules, such as pmd, with special configurations that were placed in / src / main / resources, although ... site resources did not seem to be compiled and published to the repository.

So the question is: how can I attach images and style sheets to maven super pom? I am using Maven 3 btw ...

+3
source share

All Articles