[英]unable to add maven compiler and surefire plugin in the existing pom.xml
Being new to maven,im uanble to add below plugin dependency in pom.xml,can someone please help me作为 maven 的新手,我无法在 pom.xml 中添加以下插件依赖项,有人可以帮帮我吗
Need to add this需要添加这个
Exiting Pom.xml退出 Pom.xml
4.0.0 www.asr.com asr 0.0.1-SNAPSHOT 4.0.0 www.asr.com asr 0.0.1-SNAPSHOT
<dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.141.59</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.3.0</version> <scope>compile</scope> </dependency> </dependencies>
You have to add your plugins inside tag.您必须在标签内添加插件。
For example:例如:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
<configuration>
<useFile>false</useFile>
<excludes>
<exclude>**/integration/**</exclude>
</excludes>
<includes>
<include>**/*Test.java</include>
<include>**/*Spec.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.