如何在maven项目中包含预定义的netbeans平台模块集



我正在研究由几个模块组成的maven netbeans平台项目。我需要依赖于一些模块(说java。源代码模块),但是当我尝试运行应用程序时,它报告说没有安装所需的模块。事件,尽管我依赖于java。在my pom.xml中声明的源代码

我想,我必须以某种方式告诉maven,在加载我的模块之前,在最终组装的应用程序中安装(并打开)这些模块。

我怎么能做这样的事?

更新:

当我尝试从maven工件创建完整的netbeans应用程序项目并将Java源API作为依赖项添加到pom.xml中时…当我运行应用程序时,出现以下消息窗口:

Warning - could not install some modules: Editor Library 2 - None of the modules providing the capability org.netbeans.modules.editor.actions could be installed. Editor Indentation for Projects - The module named org.netbeans.modules.editor.settings.storage/1 was needed and not found. Editor Indentation for Projects - The module named org.netbeans.modules.options.editor/1 was needed and not found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ActionsFactory could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.OpenProjectsTrampoline could be found. Project UI API - No module providing the capability org.netbeans.modules.project.uiapi.ProjectChooserFactory could be found. Editor Error Stripe Impl - The module named org.netbeans.modules.editor.errorstripe.api/1 was needed and not found. Java Source - The module named org.netbeans.libs.javacimpl/1 was needed and not found. Java Source - The module named org.netbeans.modules.editor.indent.project/0-1 was needed and not found. Java Source - The module named org.netbeans.modules.java.preprocessorbridge was needed and not found. Java Source - The module named org.netbeans.modules.options.editor/1 was needed and not found. Java Source - The module named org.netbeans.modules.parsing.api/1 was needed and not found. Editor Settings - No module providing the capability org.netbeans.api.editor.settings.implementation could be found. Diff - The module named org.netbeans.modules.options.editor/1 was needed and not found. 11 further modules could not be installed due to the above problems.

错误信息"Module dependency has friend dependency[…]]但未列为好友"意味着您需要指定org. beans.modules.options.editor的实现版本。您可以通过编辑src/main/nbm/module.xml来包含以下条目(我在这里没有使用实际需要的值)来实现这一点。确保找出为id和explicitValue输入哪些值以满足依赖项(您可以在下面链接的文章中找到解释/说明):

<dependencies>
   <dependency>
        <id>org.netbeans.modules:org-netbeans-modules-editor</id>
        <type>impl</type>
        <explicitValue>org.netbeans.modules.editor/1 = 201107282000</explicitValue>
    </dependency>
</dependencies>

我很确定下面的文章将解释一些问题,并帮助您找到id和explicitValue所需的值(语言是英语,作者是我):

http://blog.macrominds.de/2011/08/open-favorites-per-default-in-netbeans-rich-client-platform-maven-standalone-application/

我的应用程序目前有一些相关的问题,所以我可能会在一段时间内返回一个更具体的解决方案。

最简单的方法是抓住它抱怨的类,说"org.netbeans.modules.editor.actions",然后转到Add Dependencies并将其插入Query字段。从这里,您应该能够告诉您需要包含哪个模块

相关内容

  • 没有找到相关文章

最新更新