[英]Could not automatically start jboss via Cargo using Ant?
在Cargo開源項目的幫助下,我試圖從Ant腳本自動啟動JBoss。 我在下方顯示此錯誤。 非常感謝!
<taskdef resource="cargo.tasks">
<classpath>
<pathelement location="${cargo.core.jar}"/>
<pathelement location="${cargo.ant.jar}"/>
</classpath>
</taskdef>
cargo-core-uberjar-1.2.1.jar
cargo-ant-1.2.1.jar
<!-- Start JBoss -->
<target name="startJboss" depends="prepare">
<cargo id="mycontainerid" containerId="jboss51x" home="C:/opt/jboss/jboss-4.0.5.GA/bin" action="start" wait="false" />
</target>
Buildfile: D:\opt\trunk\build.xml
startJboss:
BUILD FAILED
D:\opt\trunk\build.xml:51: Could not create type cargo due to java.lang.NoClassDefFoundError: org/apache/commons/discovery/resource/ClassLoaders
Total time: 2 seconds
如果你使用JBoss 4.0.5.GA,你不應該使用containerId
的匹配值而不是jboss51x
嗎? (我有一段時間沒用過Cargo,所以我可能錯了)
Cargo-Ant支持頁面說明ANT任務可能還需要一些其他依賴項。 有關詳細信息,請參閱安裝頁面。 ; 當我進入安裝時 ,它告訴我你需要滿足Cargo的基本依賴項,包括Commons Discovery(你的錯誤消息告訴我,它缺少)和Commons Logging。 將這些JAR添加到taskdef
的類路徑中,然后再給它一個鏡頭。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.