Netbeans:项目的主要工件通过maven-shade-plugin处理 [英] Netbeans: project's main artifact is processed through maven-shade-plugin
问题描述
我正在使用 maven-shade-plugin
构建我的项目,Netbeans 8.0正在抱怨以下警告:
I am building my project with maven-shade-plugin
and Netbeans 8.0 is complaining with the following warning:
项目的主要工件通过maven-shade-plugin处理
当最终的工件jar包含类时没有源于当前项目,NetBeans内部编译器无法使用项目源进行编译。然后,在重新编译项目时,项目源代码中所做的更改仅出现在依赖项目中。也适用于重构等功能,无法在依赖项目中找到用法。
When the final artifact jar contains classes not originating in current project, NetBeans internal compiler cannot use the sources of the project for compilation. Then changes done in project's source code only appears in depending projects when project is recompiled. Also applies to features like Refactoring which will not be able to find usages in depending projects.
我该如何解决这个问题?什么可以打破?
How can I fix this? What can it break?
推荐答案
我按照 Apache的Maven文档
我添加了以下内容在阴影插件部分中我的pom。
I added the following to my pom in the shade plugin section.
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>launcher</shadedClassifierName> <!-- Can be any name that makes sense -->
</configuration>
我现在有2个工件,但它可以满足我的需求。
I now have 2 artifacts but it works for my needs.
这篇关于Netbeans:项目的主要工件通过maven-shade-plugin处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!