maven-assembly-plugin and eclipse Workspace resolution

无人久伴 提交于 2019-12-12 05:49:06

问题


I have a project, which uses the maven-assembly-plugin to compile one JAR out of a number of projects.

I want to run the build with eclipse (Neon 4.6.3). When I run the build, I select the option Resolve Workspace Artifacts.

Resolving workspace artifacts seems to work fine for compiling the classes and testing. However, when it comes to executing the assembly into a JAR, maven does not use the projects from the eclipse workspace but only projects in the local maven repository.

Is there a way to make the maven-assembly-plugin also resolve the projects in the eclipse workspace?


回答1:


maven-assembly-plugin does resolve workspace artifacts.

I just had configuration issues in the workspace. Specifically, not ALL dependencies for the project were available in the workspace. After I had assured, that ALL dependencies can be resolved from the workspace, the maven-assembly-plugin collected the correct versions.

(You can check this by extending the Maven Dependencies under the project and assert that no *.jar dependencies are left to things which should be resolved from the eclipse projects).



来源:https://stackoverflow.com/questions/45992264/maven-assembly-plugin-and-eclipse-workspace-resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!