Can my ant task wait for JBoss to deploy
With a quick scan on the net and the forums I find that link http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg22511.html :
Use ant's task to hit the jmx-console. The URL should look like this:
http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.lang.St开发者_StackOverflowring&arg=${deploy.target}
but when i try to use it ant build faild saying "The reference to entity "name" must end with the ';' delimiter." Is there a way to deploy a package to the jboss and wait until deployment is finished. I am open to any solution even without Ant. Thanks in advance for your helps.
The error you quote indicates bad XML. You're embedding a URL in the Ant buildfile that contains ampersands:
http:// ... /jmx-console/ ... &name=jboss.system:service ...
In XML that &name
looks like an unterminated entity - the message says Ant thinks you should add a semicolon to terminate - &name;
- so you've confused it!
You could use the ampersand XML entity &
in place of the raw &
s:
<get url="http:// ... /jmx-console/ ... &name=jboss.system:service ..." ... />
Or maybe set the URL in CDATA for an Ant property, and then use that in the get task.
<property name="url"><![CDATA[http://raw_url_here]]></property>
<get src="${url}" ... />
精彩评论