문제

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:selenium-maven-plugin:2.3:xvfb (execution: xvfb, phase: test-compile)

I tried this: Plugin execution not covered by lifecycle configuration maven error but it didnt help

Here is my pom.xml. The error message appears at < execution > nod

<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>
<!-- asd -->
  <groupId>com.pragmaticqa.tests</groupId>
  <artifactId>functionalTests</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>functionalTests</name>
  <url>http://maven.apache.org</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <displayProps>target/selenium/display.properties</displayProps>
  </properties>
  <dependencies>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>2.32.0</version>
    </dependency>  
        <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>2.32.0</version>
    </dependency>  
    <dependency>
          <groupId>org.testng</groupId>
          <artifactId>testng</artifactId>
          <version>6.8</version>
          <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>net.sf.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>2.0</version>
    </dependency>
    <dependency>
  <groupId>org.apache.maven.surefire</groupId>
  <artifactId>surefire</artifactId>
  <version>2.5</version>
  <type>pom</type>
</dependency>
  </dependencies>
  <build>
  <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.5</version>
        <configuration>
               <includes>
                  <include>**/*Test*.java</include>
               </includes>
        </configuration>
     </plugin>
    <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>selenium-maven-plugin</artifactId>
            <version>2.3</version>
           <!-- execution code would go here if needed -->
            <executions>
                <execution>
                    <id>xvfb</id>
                    <phase>test-compile</phase>
                    <goals>
                        <goal>xvfb</goal>
                    </goals>
                    <configuration>
                       <!-- <displayPropertiesFile>${displayProps}</displayPropertiesFile> --> 
                       <!--  try removing the plugin declaration, try 0 or :0 -->
                       <display>:0</display>
                    </configuration>
                </execution> 
            </executions>  
        </plugin>
   </plugins>
   </build>
</project>
도움이 되었습니까?

해결책

<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....
        </plugins>
    </pluginManagement>
</build>

Once this structure is in place, the error goes away.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top