执行目标org.apache.maven.plugins:maven编译器plugin:3.8.0:testCompile时出错
我试图在一台新的笔记本电脑上安装Maven,但在运行执行目标org.apache.maven.plugins:maven编译器plugin:3.8.0:testCompile时出错,maven,Maven,我试图在一台新的笔记本电脑上安装Maven,但在运行mvn clean test进行测试时,我发现一个错误如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project test: Compilation failure -> [Help 1] 我已经浏览了其他帖子,并按照建议对我的.po
mvn clean test
进行测试时,我发现一个错误如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project test: Compilation failure -> [Help 1]
我已经浏览了其他帖子,并按照建议对我的.pom文件做了一些更改,但我仍然遇到同样的错误。不确定要提供哪些其他有用信息,因此请让我知道哪些其他信息有助于解决此问题。下面是我的.pom文件:
<?xml version="1.0" encoding="UTF-8"?>
<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>matt</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files\Java\jdk1.7.0_79\bin\javac</executable>
</configuration>
</plugin>
</plugins>
</build>
以下是mvn版本:
C:\Users\admin\IdeaProjects\test>java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
Maven home: C:\Automation\Maven\apache-maven-3.6.0\bin\..
Java version: 1.8.0_121, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Java\jre1.8.0_121
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"
您的pom文件没有问题。该错误明确表示编译错误。 因此,您可能遗漏了一些内容,或者源代码中有输入错误
因此,尝试向您的问题中添加更多信息或一些代码片段您的pom文件没有问题。该错误明确表示编译错误。 因此,您可能遗漏了一些内容,或者源代码中有输入错误
因此,尝试向您的问题中添加更多信息或一些代码片段尝试从C:\Users\User.m2\repository\com\google中删除“google”文件夹并尝试重建。这应该会对您有所帮助。尝试删除“google”从C:\Users\User.m2\repository\com\google中找到文件夹,并尝试重建。这应该会对您有所帮助。如回答中所述,请检查您发布的行前的输出,其中有一条关于编译错误的更具描述性的消息。某些编译错误。发布完整错误正如答案中已经提到的,请检查您发布的行之前的输出,有一条关于编译错误的更具描述性的消息。一些编译错误。后完全错误