2014-07-24 131 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中得到解決,但可悲的是,事實並非如此。