Maven 3 JavaDoc Plugin Conflicts with TestNG Groups

I have the following:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>${maven-javadoc-plugin.version}</version>
    <executions>
        <execution>
            <id>javadoc-jar</id>
            <phase>package</phase>
            <goals>
                <goal>jar</goal>
            </goals>
        </execution>
    </executions>
</plugin>

What works great when packaging or installing:

mvn install or mvn package, however, as soon as I try to tell TestNG Group to run the tests:

mvn install -Dgroups=somegroup

he did not perform the following error after completing the test:

[ERROR] Failed to complete the target org.apache.maven.plugins: maven-javadoc-plugin: 2.9.1: jar (javadoc-jar) according to the ibd.database.api project: cannot parse the configuration mojo org.apache.maven.plugins : maven-javadoc-plugin: 2.9.1: jar for parameter #: Cannot find default installer in class org.apache.maven.plugin.javadoc.options.Group

Thanks for any information or recommendations regarding this.

+4
1

, surefire javadoc -Dgroups, javadoc " ".

, , pom.xml:

<properties>
    <surefire.groups></surefire.groups>
</properties>

surefire:

<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    ...
    <configuration>
         <groups>${surefire.groups}</groups>
    </configuration>
</plugin>

, surefire.groups:

mvn install -Dsurefire.groups=somegroup
+4

Source: https://habr.com/ru/post/1546207/


All Articles