[英]Could not automatically start jboss via Cargo using Ant?
Am kind of stuck in trying to start JBoss automatically from Ant script with the help of Cargo open source project. 在Cargo开源项目的帮助下,我试图从Ant脚本自动启动JBoss。 Am getting this error shown underneath. 我在下方显示此错误。 Many Thanks! 非常感谢!
<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
If you are using JBoss 4.0.5.GA, shouldn't you be using a matching value for containerId
instead of jboss51x
? 如果你使用JBoss 4.0.5.GA,你不应该使用containerId
的匹配值而不是jboss51x
吗? (I have not used Cargo in a while, so I may be wrong about this) (我有一段时间没用过Cargo,所以我可能错了)
The Cargo - Ant support page says Some additional dependencies might also be required for the ANT task. Cargo-Ant支持页面说明ANT任务可能还需要一些其他依赖项。 Please see the Installation page for details. 有关详细信息,请参阅安装页面。 ; ; when I go to the Installation , it tells me that you need to satisfy Cargo's base dependencies, which include Commons Discovery (which, your error message tells me, is missing) and Commons Logging. 当我进入安装时 ,它告诉我你需要满足Cargo的基本依赖项,包括Commons Discovery(你的错误消息告诉我,它缺少)和Commons Logging。 Add these JARs to the classpath for your taskdef
and give it another shot. 将这些JAR添加到taskdef
的类路径中,然后再给它一个镜头。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.