To run jagant in connected mode, specify these options for the jag_connect command:
user The user name used to connect. The default is jagadmin.
password The password used to connect. The default is no password.
logfile The log file for the connection attempt. The default is System.out.
For example, this sample project defines a connect task to connect to the machine “myhost” at port 9000, logging in as “jagadmin,” and runs the jag_list command over the connection:
<?xml version="1.0"?> <!DOCTYPE project [ <!ENTITY jagtasks SYSTEM "file:./jagtasks.xml"> ]> <project name="local_sample" default="list_packages" basedir="."> <!-- include Jaguar task definitions --> &jagtasks; <!-- connect --> <target name="connect"> <jag_connect host="myhost" port="9000" user="jagadmin" password="" /> </target> <!-- list packages in the server --> <target name="list_packages" depends="connect"> <jag_list type="Package" /> </target> <!-- list the properties of package CtsSecurity --> <target name="CtsSecurity_props" depends="connect"> <jag_props entity="Package:CtsSecurity" /> </target> </project>
Copyright © 2005. Sybase Inc. All rights reserved. |