Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译bug maven插件问题 #222

Open
jilliss opened this issue Jul 13, 2022 · 2 comments
Open

编译bug maven插件问题 #222

jilliss opened this issue Jul 13, 2022 · 2 comments

Comments

@jilliss
Copy link

jilliss commented Jul 13, 2022

BUG描述

清晰的BUG描述,有助于判断问题,请按如下步骤

1.说明操作的背景,使用了哪个模块什么功能?

  • 由于 facade 模块继承了 cloud模块的 spring-boot-maven-plugin 插件
  • 又因为facade 模块没有main方法所以该模块编译失败

2.怎么输入或操作的得到了什么结果?

  • cd facade && mvn install 编译失败
    [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage (default) on project facade: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:2.1.4.RELEASE:repackage failed: Unable to find main class -> [Help 1]
    3.预期结果与实际有什么差异?

理论应该编译成功

截图

环境
win10+jdk8,IDEA2021.3

排除spring-boot-maven-plugin插件并使用maven-compiler-plugin插件即可编译成功
facadepom.xml 添加以下代码即可

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
@freestylefly
Copy link

感谢,mvn install的时候,facade确实有问题,不用spring-boot-maven-plugin插件,改用maven-compiler-plugin插件编译成功后,在根目录重新编译即可打包编译完成

@gaofrank
Copy link

gaofrank commented Aug 30, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants