0
点赞
收藏
分享

微信扫一扫

maven打包异常:Unable to find main class

老牛走世界 2022-02-20 阅读 157
mavenjava

maven在对parent工程clean之后,进行install,Common工程报错Unable to find main class,因为Common工程是一些常用工具类,所以没有添加启动类。

在网上搜索到了解决方法:把父工程的pom文件中<build>去掉,子工程中哪个需要打包,就在其pom文件中添加<build>

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

相关推荐

0 条评论