0
点赞
收藏
分享

微信扫一扫

maven 项目依赖打包 提示 package com.。。。。。 does not exist

本来项目中有2个子工程,现在需要将子工程A的某些工程拆分出来,为了减少代码,直接新增工程C,在C工程引入A工程即可。

用ecilpse在本地调试没问题。

通过jenkins打包后出现问题,提示 :

package com.XXXXXXXXXXXXXXXXXX does not exist

 

最终找到下面解决方案

 

主要是子工程。

修改,被依赖工程:

主要增加

<configuration>  
<classifier>exec</classifier>
</configuration>

 

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中-->
</goals>
</execution>
</executions>
<configuration>
<classifier>exec</classifier>
</configuration>
</plugin>

 

打包会出来两个包。。其中带-exec的包是可执行包。

maven 项目依赖打包 提示 package com.。。。。。 does not exist_spring

 

举报

相关推荐

0 条评论