Java 未知生命周期阶段“;“构建”;。必须在格式中指定有效的生命周期阶段或目标
团队 在我的pom文件上获取以下错误。未知生命周期阶段“构建”。必须在格式中指定有效的生命周期阶段或目标。我浏览了提供的URL,但仍然得到了错误。MVN版本3.2.1,Java版本:1.7.051如有任何帮助,将不胜感激 POM看起来像:Java 未知生命周期阶段“;“构建”;。必须在格式中指定有效的生命周期阶段或目标,java,maven,Java,Maven,团队 在我的pom文件上获取以下错误。未知生命周期阶段“构建”。必须在格式中指定有效的生命周期阶段或目标。我浏览了提供的URL,但仍然得到了错误。MVN版本3.2.1,Java版本:1.7.051如有任何帮助,将不胜感激 POM看起来像: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
<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.organization.dramer</groupId>
<artifactId>sTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>sTest</name>
<description>test automation framework created using Java, testNG,
selenium</description>
<properties>
<suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile>
<skipTests>false</skipTests>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.53.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>2.44.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>2.20</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile)</suiteXmlFile>
</suiteXmlFiles>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>
4.0.0
com.organization.dramer
斯特斯特
0.0.1-快照
斯特斯特
使用Java、testNG、,
硒
src/main/resources/testng.xml
假的
org.apache.maven.plugin-tools
maven插件注释
3.2
假如
org.testng
testng
6.8
测试
org.seleniumhq.selenium
selenium firefox驱动程序
2.53.0
org.seleniumhq.selenium
硒铬驱动器
2.44.0
org.seleniumhq.selenium
htmlunit驱动程序
2.20
net.sourceforge.jexcelapi
jxl
2.6.12
org.apache.maven.plugins
maven编译器插件
2.3.2
1.6
1.6
org.apache.maven.plugins
maven surefire插件
2.6
${suiteXmlFile)
真的
Maven没有构建
目标(Maven术语中的阶段),您可能需要的是编译
、测试
或安装
,具体取决于您想要实现的目标
请通读以了解更多有关Maven lifecycle如何工作以及每个步骤的功能。您正在运行什么命令?您的pom.xml
看起来像什么?mvn clean,那么mvn buildbuild
不是Maven的标准阶段。您是否打算使用mvn compile
(构建/编译项目)或mvn test
(编译并运行所有单元测试)?mvn compile抛出各种错误有关错误和可能的解决方案的详细信息,请阅读以下文章:[错误][帮助1]mvn测试工作正常,但使用cucumber标记定义失败