Search code examples
mavenmaven-site-plugin

maven-site-plugin skip skip report for some module


There is a project:

-parent
-parent-pom.xml
-moduleA
--a-pom.xml
-moduleB
--b-pom.xml

There is a plugin in parent-pom.xml.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.8.2</version>
                <configuration>
                    <outputEncoding>UTF-8</outputEncoding>
                </configuration>

            </plugin>       

I need to skip the report in moduleB. I added this to b-pom.xml

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.8.2</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>

Can I skip moduleB from report in parent-pom.xml?


Solution

  • You cannot skip moduleB in the report from the parent POM unless you are willing to touch the POM of moduleB.

    Otherwise this is impossible.