苏哲哲哲 2022-04-03 14:08 采纳率: 0%
浏览 119
已结题

关于#Unknownlifecyclephase#的问题,如何解决?(语言-java|开发工具-github)

问题遇到的现象和发生背景

github action托管 用的windows-2019

 Unknown lifecycle phase ".mainClass=success". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
Error: Process completed with exit code 1.
问题相关代码,请勿粘贴截图
<?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>org.example</groupId>
    <artifactId>sendMail04</artifactId>
    <version>1.0-SNAPSHOT</version>


<properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
</properties>




    <dependencies>
<!--        <dependency>-->
<!--            <groupId>junit</groupId>-->
<!--            <artifactId>junit</artifactId>-->
<!--            <version>4.11</version>-->
<!--            <scope>test</scope>-->
<!--        </dependency>-->


        <!-- https://mvnrepository.com/artifact/javax.mail/mail -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
        </dependency>
        <!--    邮件需要-->
        <!-- https://mvnrepository.com/artifact/javax.activation/activation -->
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
        </dependency>


        <!--    浏览器需要-->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.13.0</version>
        </dependency>
        <!-- phantomjsdriver -->
        <dependency>
            <groupId>com.codeborne</groupId>
            <artifactId>phantomjsdriver</artifactId>
            <version>1.4.3</version>
        </dependency>


    </dependencies>
    
                  <build> 
<!--         <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins> -->
              
     <defaultGoal>compile</defaultGoal>
              
              
    <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.3</version>
                <configuration>
                    <groups>unit</groups>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                  <verbose>true</verbose>
                  <fork>true</fork>
                  <compilerVersion>1.5</compilerVersion>
                </configuration>
            </plugin>
             
        </plugins>
        <finalName>brandCtr</finalName>
    </build>


</project>

这是pro.xml代码 网上说得加

<defaultGoal>compile</defaultGoal> 

我加了也没用呀

运行结果及报错内容

错误如上

我的解答思路和尝试过的方法

尝试了加各种东西

我想要达到的结果

可以运行!

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 4月11日
    • 创建了问题 4月3日

    悬赏问题

    • ¥15 关于#开发语言#的问题:FDTD建模问题图中代码没有报错,但是模型却变透明了
    • ¥15 uniapp的h5项目写一个抽奖动画
    • ¥15 TeleScan不能修改bar
    • ¥100 请问我基于逐飞库写的这个有关于mp u6050传感器的函数,为什么输出的值是固定的?
    • ¥15 hadoop中启动hive报错如下怎么解决
    • ¥15 如何优化QWebEngineView 加载url的速度
    • ¥15 关于#hadoop#的问题,请各位专家解答!
    • ¥15 如何批量抓取网站信息
    • ¥15 Spring Boot离线人脸识别
    • ¥15 使用Ant Design Pro vue的时候,使用环境变量的时候,构建报错是什么原因