2014-07-24 88 views
3

期间目前我有一个NetBeans RCP项目使用Maven构建的,但与下面的错误行的一个模块的建设过程中我的生成失败:Maven的传递依赖不运行

--- nbm-maven-plugin:3.13:manifest (default-manifest) @ FNApi --- 
NBM Plugin generates manifest 
Project uses classes from transitive module org.netbeans.api:org-openide-util:jar:RELEASE80 which will not be accessible at runtime. 
    To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter 
Project uses classes from transitive module org.netbeans.api:org-openide-util-lookup:jar:RELEASE80 which will not be accessible at runtime. 
    To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter 

你可以建议可以做什么关于它?我尝试使用dependencies > add添加org.netbeans.api:org-openide-util-lookup,但无法完成(看起来依赖已经存在)。

这是一个完整的堆栈跟踪弗朗Netbeans的:

--- nbm-maven-plugin:3.13:manifest (default-manifest) @ FNApi --- 
NBM Plugin generates manifest 
Project uses classes from transitive module org.netbeans.api:org-openide-util:jar:RELEASE80 which will not be accessible at runtime. 
    To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter 
Project uses classes from transitive module org.netbeans.api:org-openide-util-lookup:jar:RELEASE80 which will not be accessible at runtime. 
    To fix the problem, add this module as direct dependency. For OSGi bundles that are supposed to be wrapped in NetBeans modules, use the useOSGiDependencies=false parameter 
------------------------------------------------------------------------ 
Reactor Summary: 

FNSD-maven-parent ................................. SUCCESS [0.563s] 
FNSD-maven-branding ............................... SUCCESS [1.695s] 
FNSD-maven-app .................................... SUCCESS [14.645s] 
WidgetAPI ......................................... SUCCESS [2.468s] 
FNApi ............................................. FAILURE [1.304s] 
Browser ........................................... SKIPPED 
FlamingoIntegration ............................... SKIPPED 
FNCore ............................................ SKIPPED 
NetDesigner ....................................... SKIPPED 
DST ............................................... SKIPPED 
Production ........................................ SKIPPED 
------------------------------------------------------------------------ 
BUILD FAILURE 
------------------------------------------------------------------------ 
Total time: 21.553s 
Finished at: Thu Jul 24 11:33:20 CEST 2014 
Final Memory: 20M/247M 
------------------------------------------------------------------------ 
Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project FNApi: See above for failures in runtime NetBeans dependencies verification. -> [Help 1] 

To see the full stack trace of the errors, re-run Maven with the -e switch. 
Re-run Maven using the -X switch to enable full debug logging. 

任何帮助表示赞赏。我是Maven的新手。项目本身在构建之前看起来很好(没有错误)。

回答

4

好吧,我终于明白了。我会离开这里的雁,也许这将帮助别人的未来...

http://wiki.netbeans.org/Maven_NBM_comments

有不一致之间的Maven编译依赖关系树和 运行netbeans的依赖。

所以基本上,你必须manullay添加与org.netbeans.apipom.xml所有依赖条件,然后开始工作。引用的文章声称,这种不一致可能在Maven 3中得到解决,但可悲的是,事实并非如此。