A task to send a message to an XMPP (Jabber) user. Requires the use of Jive Software's smack API library. to connect to an XMPP server.
Attribute | Description | Required |
host | Host of the XMPP server to connect. | yes |
port | Port number of the XMPP server to connect. | No. |
secure | whether or not to make an SSL connection to the XMPP server. | No. default is false. |
from | Buddy name of the sender. This is a user name to be used to connect to the XMPP server. The user must exist (as we will see below) | attribute |
password | password of jabber "from" user. | attribute |
to | user to send message. | At least one of these, or the equivalent elements. |
tolist | Comma-separated list of users to send messages. | |
message | Message to send to user/buddies. | This or a
<message> element. |
Adds a user element. It takes no attributes.
Specifies the message to include in the IM.
. . . <taskdef name="jabber" classname="com.tfftech.ant.taskdefs.im.jabber.JabberTask" /> <target name="main"> <jabber host="somejabberserver.com" from="buildmaster" to="otherimname" password="pass"> <message>The nightly build has completed</message> </jabber> . . .
Sends an IM from buildmaster to otherimname@jabberserver.com, authenticating with the password pass. The IM sent is "The nightly build has completed".
. . . <taskdef name="jabber" classname="com.tfftech.ant.taskdefs.im.jabber.JabberTask" /> <target name="main"> <jabber host="somejabberserver.net" from="buildmaster" password="passwd" tolist="user1@somekindabuildplace.org,user2,user3"> <message>The nightly build has completed</message> </jabber> . . .
Sends an IM from builduser to multiple users user1@somekindabuildplace.org,user2@somejabberserver.net and user3@somejabberserver.net, authenticating on somejabberserver.net's XMPP server with the password pass. The IM sent is "The nightly build has completed".
The following is equivalent to the above (Example 2):
. . . <taskdef name="somejabberserver.org" classname="com.tfftech.ant.taskdefs.im.jabber.JabberTask" /> <target name="main"> <jabber host="whoknowswher-e.net" from="buildmaster" password="pass"> <to>user1@somekindabuildplace.org</to> <to>user2</to> <to>user3</to> <message>The nightly build has completed</message> </jabber> . . .
Copyright © 2003 Thought For Food Tech, LLC. All rights reserved.