Удаленка для jenkins+selenide+selenoid+allure+docker спецов на 2-3 часа в день. 100% remote! Присоединиться к проекту

Ошибка Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin при запуске тестов с Maven

maven-surefire-plugin
maven
Теги: #<Tag:0x00007fedbc612ef0> #<Tag:0x00007fedbc612bd0>

(Татьяна Иванова) #1

Проблема заключается в невозможности запуска тестов командой
mvn clean test -Dsuite=tests.xml -DtestConfFile=config/stand.properties -Dtestng.threadCount=3

Я пыталась пробовать на разных версиях maven (включая последнюю - 3.5), самого плагина maven-surefire-plugin (2.20 сейчас), заново создавала репозиторий локальный (интернета на компьютере нет). Проверили контрольные суммы плагинов, Maven не ругался на них. Обновили все плагины до последних версий, ничего не поменялось.

Ничего не получилось.

Код 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>*</groupId>
	<artifactId>*</artifactId>
	<version>1.0</version>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<suite>testng.xml</suite>
		<sonar.sources>src/test/java</sonar.sources>
		<sonar.host.url>http://localhost:9000</sonar.host.url>
		<sonar.tests />
	</properties>

	<repositories>
		<repository>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>bintray-epam-reportportal</id>
			<name>bintray</name>
			<url>http://dl.bintray.com/epam/reportportal</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>com.epam.reportportal</groupId>
			<artifactId>agent-java-testng</artifactId>
			<version>2.7.0</version>
		</dependency>
		<dependency>
			<groupId>com.epam.reportportal</groupId>
			<artifactId>logger-java-logback</artifactId>
			<version>2.6.0</version>
		</dependency>
		<dependency>
			<groupId>com.epam.reportportal</groupId>
			<artifactId>logger-java-log4j</artifactId>
			<version>2.6.1</version>
		</dependency>
		<dependency>
			<groupId>com.codeborne</groupId>
			<artifactId>selenide</artifactId>
			<version>4.5.1</version>
			<exclusions>
				<exclusion>
					<groupId>org.seleniumhq.selenium</groupId>
					<artifactId>htmlunit-driver</artifactId>
				</exclusion>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-support</artifactId>
			<version>3.5.2</version>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.5</version>
		</dependency>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>6.11</version>
		</dependency>
		<dependency>
			<groupId>org.uncommons</groupId>
			<artifactId>reportng</artifactId>
			<version>1.1.4</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.sqlserver</groupId>
			<artifactId>mssql-jdbc</artifactId>
			<version>6.2.0.jre8</version>
		</dependency>
		<dependency>
			<groupId>com.google.inject</groupId>
			<artifactId>guice</artifactId>
			<version>4.1.0</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
		<dependency>
			<groupId>ru.yandex.qatools.ashot</groupId>
			<artifactId>ashot</artifactId>
			<version>1.5.4</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.2</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<configuration>
					<argLine>-Dfile.encoding=UTF-8</argLine>
					<skip>false</skip>
					<suiteXmlFiles>
						<suiteXmlFile>${suite}</suiteXmlFile>
					</suiteXmlFiles>
					<properties>
						<property>
							<name>listener</name>
							<value>com.epam.reportportal.testng.ReportPortalTestNGListener,
								org.uncommons.reportng.HTMLReporter</value>
						</property>
					</properties>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>```

Логи Maven:

[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building UFOTests 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.testng:testng:jar:5.14.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.testng:testng:jar:5.14.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] — maven-resources-plugin:3.0.2:resources (default-resources) @ UFOTests —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\bamboo_agent\xml-data\build-dir\81723408-81821779\src\main\resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ UFOTests —
[INFO] No sources to compile
[INFO]
[INFO] — maven-resources-plugin:3.0.2:testResources (default-testResources) @ UFOTests —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 236 resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ UFOTests —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.20:test (default-test) @ UFOTests —
[WARNING] Error injecting: org.apache.maven.plugin.surefire.SurefirePlugin
java.lang.TypeNotPresentException: Type org.apache.maven.plugin.surefire.SurefirePlugin not present
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:147)
at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:519)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.NoClassDefFoundError: org/apache/maven/plugin/surefire/SurefireReportParameters
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromImport(ClassRealm.java:380)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:38)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromImport(ClassRealm.java:380)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:38)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:139)
… 41 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.plugin.surefire.SurefireReportParameters
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
… 66 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.464 s
[INFO] Finished at: 2017-08-24T15:13:16+03:00
[INFO] Final Memory: 17M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project UFOTests:
Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test failed:
Unable to load the mojo ‘test’ in the plugin ‘org.apache.maven.plugins:maven-surefire-plugin:2.20’.
A required class is missing: org/apache/maven/plugin/surefire/SurefireReportParameters

[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-surefire-plugin:2.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.20/maven-surefire-plugin-2.20.jar
[ERROR] urls[1] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/surefire/maven-surefire-common/2.20/maven-surefire-common-2.20.jar
[ERROR] urls[2] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/surefire/surefire-booter/2.20/surefire-booter-2.20.jar
[ERROR] urls[3] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
[ERROR] urls[4] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/junit/junit/4.12/junit-4.12.jar
[ERROR] urls[5] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] urls[6] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[7] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[8] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[9] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[10] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/reporting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[ERROR] urls[11] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[12] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[13] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar
[ERROR] urls[14] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/surefire/surefire-api/2.20/surefire-api-2.20.jar
[ERROR] urls[15] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/surefire/surefire-logger-api/2.20/surefire-logger-api-2.20.jar
[ERROR] urls[16] = file:/C:/Users/ufo_bamboo_agent/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.3/maven-plugin-annotations-3.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.apache.maven.plugin.surefire.SurefireReportParameters
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException



ОС Windows, Java 8, Maven 3.5, к сожалению, проблема воспроизводится у заказчика, не воспроизводится у меня, деталей об окружении не знаю.

(Сергей Кузьмин) #2

open the jar
c:\users%YOU%.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.20\maven-surefire-plugin-2.20.jar

in javaclassviewer

you will see it is indeed not there!

itwas there with downlevel - e.g.
c:\users%YOU%.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.9\maven-surefire-plugin-2.9.jar

используйте не такие новые версии –

вот pom из моего проекта

<?xml version="1.0"?>
<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.jprotractor</groupId>
  <artifactId>jprotractor</artifactId>
  <version>1.2-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>jProtractor is a port of Angular Protractor functionality to Java.</description>
  <url>https://github.com/caarlos0/jprotractor</url>
  <developers>
    <developer>
      <name>Carlos Alexandro Becker</name>
      <email>caarlos0@gmail.com</email>
      <organization/>
      <organizationUrl>https://github.com/caarlos0</organizationUrl>
    </developer>
    <developer>
      <name>Serguei Kouzmine</name>
      <email>kouzmine_serguei@yahoo.com</email>
      <organization/>
      <organizationUrl>https://github.com/sergueik</organizationUrl>
    </developer>
  </developers>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <commons-exec.version>1.3</commons-exec.version>
    <commons-io.version>2.5</commons-io.version>
    <commons-lang.version>2.6</commons-lang.version>
    <commons-collections4.version>4.0</commons-collections4.version>
    <java.version>1.8</java.version>
    <junit.version>4.12</junit.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
    <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
    <phantomjsdriver.version>1.4.2</phantomjsdriver.version>
    <!-- http://stackoverflow.com/questions/39310090/selenium-upgrade-error -->
    <selenium.version>3.2.0</selenium.version>
    <selenium-firefox-driver.version>3.2.0</selenium-firefox-driver.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>${commons-lang.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-exec</artifactId>
      <version>${commons-exec.version}</version>
    </dependency>
    <dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-collections4</artifactId>
    <version>${commons-collections4.version}</version>
</dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-matchers</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>${selenium.version}</version>
    </dependency>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-firefox-driver</artifactId>
      <version>${selenium-firefox-driver.version}</version>
    </dependency>
    <dependency>
      <groupId>com.codeborne</groupId>
      <artifactId>phantomjsdriver</artifactId>
      <version>${phantomjsdriver.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-driver</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <goals>
          <goal>compile</goal>
        </goals>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <encoding>utf-8</encoding>
          <compilerArgument>-Xlint:all</compilerArgument>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
          <!--
          <compilerArgument>-verbose</compilerArgument>
          -->
        </configuration>
      </plugin>
      <plugin>
        <!-- Separates the unit tests from the integration tests. -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
        <configuration>
          <!-- Skip the default running of this plug-in (or everything is run twice...see below) -->
          <skip>true</skip>
          <!-- Show 100% of the lines from the stack trace (doesn't work) -->
          <trimStackTrace>false</trimStackTrace>
        </configuration>
        <executions>
          <execution>
            <id>unit-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <!-- Never skip running the tests when the test phase is invoked -->
              <skip>false</skip>
              <includes>
                <!-- Include unit tests within integration-test phase. -->
                <include>**/*Test.java</include>
              </includes>
              <excludes>
                <!-- Exclude integration tests within (unit) test phase. -->
                <exclude>**/*IntegrationTest.java</exclude>
              </excludes>
            </configuration>
          </execution>
          <execution>
            <id>integration-tests</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <!-- Never skip running the tests when the integration-test phase is invoked -->
              <skip>false</skip>
              <includes>
                <!-- Include integration tests within integration-test phase. -->
                <include>**/*IntegrationTest.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


(Татьяна Иванова) #3

Спасибо за ответ. В общем, выпилила из проекта ReportPortal и его библиотеки, все заработало. Не в плагине, выходит, было дело. Он в Интернет обращаться должен был, Интернета там нет. Локально RP развернут не был.