更新:添加了 Git 子模組說明。
我過去曾談到提供對真正模組化應用的支援,我很高興地宣佈,您現在可以訪問 SpringSource Slices 的早期原型程式碼了。
構建和安裝
您可以從我們的 Git 倉庫訪問原始碼
git clone git://git.springsource.org/slices/slices.git
git submodule init
git submodule update
要構建 Slices 的打包版本,只需從 build-slices 目錄執行 ant clean jar package
cd slices/build-slices
ant clean jar package
這將在 target/artifacts 中生成一個 zip 檔案,其中包含 Slices 子系統,然後可以將其安裝到 dm Server 2.0 上
安裝 Slices 非常簡單,只需將新的子系統新增到 dm Server,然後更新 dmServer 的配置檔案以啟動新的子系統即可。Slices 應該適用於任何最近的 dm Server 2.0 快照版本。我這裡使用的是 2.0.0.CI-R326-B274,我已經下載並解壓到了我的桌面
unzip target/artifacts/springsource-slices-BUILD-20090622083953.zip -d ~/Desktop/springsource-dm-server-2.0.0.CI-R326-B274
接下來,必須更新 dm Server 的 kernel.properties 配置以包含新的 slices 子系統。開啟您的 dm Server 安裝目錄下的 config/kernel.properties 檔案,編輯 Profile Configuration 部分以列出 slices 子系統並給配置檔案一個合適的名稱(我稱之為 slices)
#######################
# Profile Configuration
#######################
profile.name=slices…