Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
包括Maven Pom.xml中的xvfb插件,nod<;执行>;错误_Maven_Headless_Xvfb - Fatal编程技术网

包括Maven Pom.xml中的xvfb插件,nod<;执行>;错误

包括Maven Pom.xml中的xvfb插件,nod<;执行>;错误,maven,headless,xvfb,Maven,Headless,Xvfb,我试过这个,但没用 这是我的pom.xml。错误消息出现在节点处 Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:selenium-maven-plugin:2.3:xvfb (execution: xvfb, phase: test-compile) 4.0.0 测试 功能测试 1.0-快照 罐子 功能测试 http://maven.apache.org UTF-8 target/sele

我试过这个,但没用

这是我的pom.xml。错误消息出现在节点处

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

4.0.0
测试
功能测试
1.0-快照
罐子
功能测试
http://maven.apache.org
UTF-8
target/selenium/display.properties
org.seleniumhq.selenium
selenium firefox驱动程序
2.32.0
org.seleniumhq.selenium
硒爪哇
2.32.0
org.testng
testng
6.8
测试
net.sf.opencsv
opencsv
2
org.apache.maven.surefire
万无一失
2.5
聚甲醛
org.apache.maven.plugins
maven surefire插件
2.5
**/*Test*.java
org.codehaus.mojo
selenium maven插件
2.3
xvfb
测试编译
xvfb
: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>
<!-- 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>