现在有 common模块和user模块,还有父模块,现在情况是user使用common中的一些方法,但是呢,user在打包发布的时候报错,发现找不到common模块的jar,但是方法中也在引用不报错,这时候怎么解决呢,需要在common模块的pom中加“configuration”

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

然后user在打包之前,需要将common模块 先clean,然后install打到本地仓库,再去打user就ok了。

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐