OSGi與Maven、Eclipse PlugIn的區別

來源:互聯網
上載者:User

標籤:style   http   io   ar   os   使用   sp   strong   檔案   

osgi 的架構的 apache felix   equinox 

osgi的bundle 的概念maven 的  module  的   Eclipse 的 PlugIn  的區別。。。。

OSGi與Maven

Maven也具有模組化系統的特徵;但是它只是一個編譯時間工具,而不是運行時架構。Maven並不是OSGi的競爭者,而是OSGi的一個補充。

通過在pom.xml中指定所依賴jar包的名稱、版本號碼,Maven就能在編譯時間自動下載正確的jar檔案,並部署到classpath中。

然而Maven並沒有解決JAR檔案的缺點:

    同樣使用全域的classpath;

    同樣不能做到包層級的資訊隱藏;

而且pom.xml的格式與OSGi格式並不相容。所以,如果用Maven編譯OSGi系統,通常需要定義兩遍metadata:

   在pom.xml中定義Maven的metadata
    在MANIFEST.MF中定義OSGi的metadata


OSGi與Eclipse PlugIn


Eclipse平台是基於Equinox的,而Equinox就是OSGi的實現之一。
而在Eclipse3.0之前,卻使用的是另一套模組系統;Eclipse PlugIn是指包含plugin.xml的檔案夾;plugin.xml中定義的metadata和OSGi的MANIFEST.MF非常類似:包含plugin的name、vendor、version、匯出包、required plugin。
關鍵的區別在於:Eclipse PlugIn定義的依賴並不是包層級,而是整個plugin。
Eclipse Plugin的最大缺陷是,不能動彈地安裝、更新、卸載。


來自:http://www.myexception.cn/operating-system/1405867.html

OSGi與Maven、Eclipse PlugIn的區別

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.