Netbeans:项目的主要工件通过maven-shade-plugin处理 [英] Netbeans: project's main artifact is processed through maven-shade-plugin

查看:295
本文介绍了Netbeans:项目的主要工件通过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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆