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

를 끄덕 : Plugin execution not covered by lifecycle configuration maven error를하지만 여기 내 pom.xml 파일입니다 그것은포함하여의 Xvfb가 플러그인, 나는이 시도 <execution> 오류

도움을 didnt한다. 오류 메시지가

<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> 

답변

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

이 구조가 자리에되면이 오류가 사라집니다 < 실행> 고개를 끄덕에 나타납니다.