我在尝试构建基于 Maven 的 open-ide 应用程序时收到此消息:
Some tokens required by included modules are not provided by included modules. The application will fail starting up. The missing tokens are:
org.netbeans.modules.java.source.queries.spi.QueriesController ref: [org.netbeans.modules.java.source.queries]
org.netbeans.api.editor.guards.Java ref: [org.netbeans.modules.form]
org.netbeans.modules.editor.actions ref: [org.netbeans.modules.editor.lib2]
我试过Googling第一行看看我是否能在那里找到答案,但我得到的只是 source code错误发生的地方。任何人都可以清楚地解释此错误和/或告诉我如何修复它吗?
注意:它没有指定是我的哪个模块导致的,但它在“app”项目上正在死亡。
最佳答案
token 是一种 netbeans 依赖项,无法通过 Maven 依赖项来表达。通常,API 模块需要这种方式的实现,而实现模块具有常规编译依赖性。对于模块系统默认值,请参阅http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-vers
通常,您必须查看模块 jar 的 list 才能找到哪个模块提供哪个 token 。
设置基于 Maven 的应用程序的最简单方法是在您的 nbm-application 打包项目中包含足够的集群依赖项。 (org.netbeans.cluster 组 ID)。然后,如果您不需要某些功能,请慢慢开始排除模块,看看它是否不会破坏任何内容。
默认情况下,nbm-application 项目依赖于“platform”集群,您显然还需要“ide”和“java”
关于java - 如何修复丢失 token 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20695059/