【问题标题】:Maven build Failure ( Unable to find a single main class from the following candidates [Application, pfc.app.Application] )Maven 构建失败(无法从以下候选 [Application, pfc.app.Application] 中找到单个主类)
【发布时间】:2018-11-26 16:33:06
【问题描述】:

我在我的项目中工作,一切都很好,然后当我尝试使用 mvn repack -e 重新构建时,它会构建失败,这是错误:

Build failure

这是我的 pom.xml 文件:

<?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>pfc.app</groupId>
    <artifactId>gs-spring-boot</artifactId>
    <version>0.1.0</version>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.2.RELEASE</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

    <properties>
        <java.version>1.8</java.version>
    </properties>


    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project> 

真的需要一些帮助..

【问题讨论】:

标签: maven spring-boot


【解决方案1】:

我不明白是什么问题,我只是删除了目标目录,然后重新运行打包,它成功了!感谢您的帮助。

【讨论】:

    猜你喜欢
    • 2017-08-08
    • 1970-01-01
    • 1970-01-01
    • 2017-07-30
    • 2011-01-14
    • 2018-11-21
    • 1970-01-01
    • 2022-11-01
    • 2021-05-30
    相关资源
    最近更新 更多