Maven и effective pom - ошибка "element reportplugins is not allowed here"

pom.xml
maven-surefire-plugin
maven
java
Теги: #<Tag:0x00007fedbc733d98> #<Tag:0x00007fedbc733c58> #<Tag:0x00007fedbc733b18> #<Tag:0x00007fedbc7339b0>

(Tatyana Durova) #1

В effective pom я получаю такую ошибку:

element reportplugins is not allowed here

И также в нем я вижу целую секцию с использованием maven-site-plugin, который я не использую в pom файле + когда получаю зависимости - тоже ничего такого в дереве зависимостей не вижу.

Зависимости получаю так:

mvn dependency:tree

И так тоже самое:

mvn dependency:tree -Dverbose

Вот так выглядит кусок в effective pom

 <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <executions>
          <execution>
            <id>default-site</id>
            <phase>site</phase>
            <goals>
              <goal>site</goal>
            </goals>
            <configuration>
              <outputDirectory>/home/xxx/repos/selenium-tests/xxx-tests/target/site</outputDirectory>
              <reportPlugins>
                <reportPlugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-project-info-reports-plugin</artifactId>
                </reportPlugin>
              </reportPlugins>
            </configuration>
          </execution>
          <execution>
            <id>default-deploy</id>
            <phase>site-deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
            <configuration>
              <outputDirectory>/home/xxx/repos/selenium-tests/xxx-tests/target/site</outputDirectory>
              <reportPlugins>
                <reportPlugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-project-info-reports-plugin</artifactId>
                </reportPlugin>
              </reportPlugins>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <outputDirectory>/home/xxx/repos/selenium-tests/xxx-tests/target/site</outputDirectory>
          <reportPlugins>
            <reportPlugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
            </reportPlugin>
          </reportPlugins>
        </configuration>
      </plugin>

Вроде проект компилируется, но все таки хочу понять почему и откуда это берется.

Мой POM файл

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.xxx</groupId>
  <artifactId>xxxTests</artifactId>
  <version>4.0.0</version>
  <packaging>jar</packaging>
  <properties>
    <jdk.source.version>1.8</jdk.source.version>
    <jdk.target.version>1.8</jdk.target.version>
  </properties>
  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>com.browserstack</groupId>
      <artifactId>browserstack-local-java</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>io.github.bonigarcia</groupId>
      <artifactId>webdrivermanager</artifactId>
      <version>1.7.1</version>
    </dependency>
    <dependency>
      <groupId>com.browserstack</groupId>
      <artifactId>automate-testassist</artifactId>
      <version>0.7.2-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.11</version>
    </dependency>
    <dependency>
      <groupId>javax.mail</groupId>
      <artifactId>mail</artifactId>
      <version>1.4.7</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>3.4.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.8.1</version>
    </dependency>
    <dependency>
      <groupId>com.dev9</groupId>
      <artifactId>webdriver-utils</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>com.codeborne</groupId>
      <artifactId>selenide</artifactId>
      <version>4.5.1</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.8.2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.8.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.8.7</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.22</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.22</version>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>${suitexml.file}</suiteXmlFile>
          </suiteXmlFiles>
          <systemPropertyVariables>
            <profileId>${profileId}</profileId>
            <config>${config}</config>
            <pjID>${pjID}</pjID>
            <scriptFile>${scriptFile}</scriptFile>
            <dataCollector>${dataCollector}</dataCollector>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.browserstack</groupId>
        <artifactId>automate-maven-plugin</artifactId>
        <version>0.7.2-SNAPSHOT</version>
        <configuration>
          <source>${jdk.source.version}</source>
          <target>${jdk.target.version}</target>
          <complianceLevel>${jdk.source.version}</complianceLevel>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test-compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <!-- profiles -->
  <profiles>
    <profile>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <id>local</id>
      <properties>
        <profileId>local</profileId>
        <suitexml.file>src/test/resources/testng.local.xml</suitexml.file>
        <dataCollector>s16</dataCollector>
        <scriptFile>mtrcs_333330</scriptFile>
        <pjID>333330</pjID>
        <environment></environment>
        <config>local.conf.json</config>
      </properties>
    </profile>
    <profile>
      <id>dev</id>
      <properties>
        <profileId>dev</profileId>
        <dataCollector>s16</dataCollector>
        <scriptFile>mtrcs_333331</scriptFile>
        <pjID>333331</pjID>
        <suitexml.file>src/test/resources/testng.xml</suitexml.file>
        <environment></environment>
        <config>parallel.conf.json</config>
      </properties>
    </profile>
    <profile>
      <id>staging</id>
      <properties>
        <profileId>staging</profileId>
        <activeByDefault>true</activeByDefault>
        <dataCollector>s16</dataCollector>
        <scriptFile>mtrcs_333330</scriptFile>
        <pjID>333330</pjID>
        <suitexml.file>src/test/resources/testng.xml</suitexml.file>
        <environment></environment>
        <config>parallel.conf.json</config>
      </properties>
    </profile>
    <profile>
      <id>live</id>
      <properties>
        <profileId>live</profileId>
        <dataCollector>s16</dataCollector>
        <scriptFile>mtrcs_333332</scriptFile>
        <pjID>333332</pjID>
        <suitexml.file>src/test/resources/testng.xml</suitexml.file>
        <environment></environment>
        <config>parallel.conf.json</config>
      </properties>
    </profile>
  </profiles>
</project>