简体   繁体   English

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

[英]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

I am trying to use Allure report in my Selenium TestNG project in Eclipse IDE.我正在尝试在我的 Selenium TestNG 项目中的 Eclipse Z581D6381F3F35E4F9ACZ27 中使用 Allure 报告。 But when I build my project in through command prompt using 'mvn clean test -X' I get above error.但是当我使用'mvn clean test -X'通过命令提示符构建我的项目时,我得到了上述错误。 This is all new for me.这对我来说是全新的。 Can someone help me to resolve this error?有人可以帮我解决这个错误吗?

在此处输入图像描述

在此处输入图像描述

please find below my pom.xml file请在我的 pom.xml 文件下面找到

<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>SeleniumEasyTestAutomation</groupId>
  <artifactId>SeleniumEasyTestAutomation</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>SeleniumEasyTestAutomation</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <aspectj.version>1.8.10</aspectj.version>
  </properties>
  
  <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <taget>1.8</taget>
            </configuration>
            
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.20</version>
            <configuration>
                <suiteXMLFiles>
                    <suiteXMLFile>/SeleniumEasyTestAutomation/testng.xml</suiteXMLFile>
                </suiteXMLFiles>
                <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                </argLine>
            </configuration>
            <dependencies>
                 <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>1.9.6</version>
                </dependency>
            </dependencies> 
        </plugin>
     </plugins>
  </build>

  <dependencies>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.5</version>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.3.0</version>
            
        </dependency>

        
        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.1.2</version>
        </dependency>


        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.1.2</version>
        </dependency>
        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
            <version>4.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-scratchpad</artifactId>
            <version>4.1.2</version>
        </dependency>
        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>ooxml-schemas</artifactId>
            <version>1.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>openxml4j</artifactId>
            <version>1.0-beta</version>
        </dependency>
        
        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.41.2</version>
        </dependency>

        
        
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.8.0</version>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        
        <dependency>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
            <version>1.72</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <version>3.141.59</version>
        </dependency>
        
        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
            <version>1.1.1</version>
        </dependency>

        
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>2.13.8</version>
        </dependency>


    </dependencies>

    
</project>

Following is my Java_HOME version以下是我的 Java_HOME 版本

在此处输入图像描述

Eclipse project Java Build Path Eclipse 项目 Java 构建路径

在此处输入图像描述

Can someone help me to resolve this issue?有人可以帮我解决这个问题吗? I tried going through previous posts like this and attempted a few things but it didnt work.我尝试过像这样的以前的帖子并尝试了一些事情,但没有奏效。 I do not know why the issue is coming and how to resolve this.我不知道为什么会出现这个问题以及如何解决这个问题。 please suggest.请建议。

I could successfully generate allure report after reinstalling maven and downloading allure binaries.重新安装 maven 并下载 allure 二进制文件后,我可以成功生成 allure 报告。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:编译Spring Cloud - org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile Spring Cloud DevOps - Maven: org.apache.maven.lifecycle.LifecycleExecutionException: 无法执行目标 org.apache.maven.plugins:maven-war-plugin:2.6:war - DevOps - Maven: org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war 无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile 无法使用 MAVEN 构建并出现错误 - 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.1:compile - Unable to Build using MAVEN with ERROR - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile Maven:未能执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.10.1compile: - Maven: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile 无法执行目标org.apache.maven.plugins:maven-compiler-plugin等 - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin AND more Intelij IDEA-无法执行目标org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile - Intelij IDEA - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile 无法执行目标org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile 无法执行目标org.apache.maven.plugins:maven-compiler-plugin - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin 无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM