build.xml 84.9 KB
Newer Older
Nicolas Tachker's avatar
Nicolas Tachker committed
1
<project default="compile" basedir="." xmlns:m2="urn:maven-artifact-ant">
joram's avatar
joram committed
2 3 4

  <!-- Initializes the environment paths and properties -->
  <target name="init">
maistrfr's avatar
maistrfr committed
5
    <!-- Initializes the directory structure properties -->
joram's avatar
joram committed
6
    <property name="src.dir" location="."/>
7
    <property name="ship.dir" location="../../../ship"/>
fmaistre's avatar
fmaistre committed
8
    <property name="obj.dir" location="../../classes"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
9
    <property name="lib.dir" location="${ship.dir}/lib"/>
fmaistre's avatar
fmaistre committed
10
    <property name="run.dir" location="../../run"/>
11
    <property name="conf.dir" location="../../config"/>
12
    <property name="felix.dir" location="${ship.dir}/bin/"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
13
    <property name="bundle.dir" location="${ship.dir}/bundle" />
Andre Freyssinet's avatar
Andre Freyssinet committed
14

Nicolas Tachker's avatar
Nicolas Tachker committed
15
  	<!-- Project classpath needed for execution -->
joram's avatar
joram committed
16 17 18 19 20
    <path id="project.class.path">
      <pathelement path="${java.class.path}/"/>
      <fileset dir="${lib.dir}">
         <include name="*.jar"/>
      </fileset>
21 22 23
      <fileset dir="${bundle.dir}">
         <include name="*.jar"/>
      </fileset>
fmaistre's avatar
fmaistre committed
24
      <pathelement path="${obj.dir}/joram"/>
afreyssin's avatar
afreyssin committed
25
      <pathelement path="${run.dir}"/>
joram's avatar
joram committed
26 27
    </path>
    <property name="project.class.path" refid="project.class.path"/>
28 29 30
    
    <path id="felix.class.path">
      <pathelement path="${java.class.path}/"/>
31
      <fileset file="${felix.dir}/felix.jar"/>
32
      <pathelement path="${run.dir}"/>
33
    </path>
Nicolas Tachker's avatar
Nicolas Tachker committed
34
    <property name="felix.class.path" refid="felix.class.path"/>  	
joram's avatar
joram committed
35
  </target>
36 37 38 39 40 41

  <!-- Cleans run directory -->
  <target name="reset" depends="init"
          description="--> Cleans run directory">
    <delete quiet="true" dir="${run.dir}"/>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
42
	
maistrfr's avatar
maistrfr committed
43
  <!-- Cleans samples - deletes generated files -->
44
  <target name="clean" depends="init,reset"
fmaistre's avatar
fmaistre committed
45
          description="--> Deletes generated files">
joram's avatar
joram committed
46 47 48
    <delete quiet="true" dir="${obj.dir}"/>
  </target>

Andre Freyssinet's avatar
Andre Freyssinet committed
49
  <!-- Compiles (be careful, deprecation, nowarn and verbose properties are not defined -->
50
  <target name="compile" depends="init,clean"
joram's avatar
joram committed
51
    description="--> Compile all samples">
52
    <mkdir dir="${obj.dir}/joram"/>
joram's avatar
joram committed
53
    <javac srcdir="${src.dir}"
fmaistre's avatar
fmaistre committed
54
           destdir="${obj.dir}/joram"
Andre Freyssinet's avatar
Andre Freyssinet committed
55 56
           debug="true"
           optimize="false"
joram's avatar
joram committed
57 58
           deprecation="${deprecation}"
           nowarn="${nowarn}"
59 60
           verbose="${verbose}"
           includeantruntime="false">
joram's avatar
joram committed
61
      <classpath refid="project.class.path"/>
joram's avatar
joram committed
62
      <include name="**/*.java"/>
joram's avatar
joram committed
63 64
    </javac>
  </target>
65
	
66 67 68 69 70 71 72
  <!-- Initializes a centralized configuration -->
  <target name="server_init" depends="init">
    <mkdir dir="${run.dir}/server${sid}"/>
    <copy file="${conf.dir}/a3config.dtd" todir="${run.dir}/server${sid}"/>
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}/server${sid}"/>
    <copy file="${a3.conf}" tofile="${run.dir}/server${sid}/a3servers.xml"/>
    <copy file="${osgi.conf}" tofile="${run.dir}/server${sid}/config.properties"/>
73
    <!--copy file="${monit.conf}" tofile="${run.dir}/server${sid}/MonitoringConfig.xml"/-->
afreyssin's avatar
afreyssin committed
74 75 76
  	<!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/fileMonitoring.props"/ -->
    <!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/logMonitoring.props"/ -->
    <!-- copy file="${conf.dir}/fileMonitoring.props" tofile="${run.dir}/server${sid}/windowMonitoring.props"/ -->
afreyssin's avatar
afreyssin committed
77
  </target>
joram's avatar
joram committed
78 79

  <target name="simple_init" depends="init">
afreyssin's avatar
afreyssin committed
80
    <copy file="${conf.dir}/a3debug.cfg" todir="${run.dir}"/>
81
    <copy file="${conf.dir}/jndi.properties" todir="${run.dir}"/>
82 83
  </target>

84
  <target name="server" depends="server_init">
85 86
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
87
          dir="${run.dir}/server${sid}">
88
      <classpath path="${felix.class.path}"/>
afreyssin's avatar
afreyssin committed
89
      <!-- jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote.port=9191 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -DTransaction.SyncOnWrite=false"/ -->
90 91
      <!-- jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/ -->
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote -DTransaction.SyncOnWrite=false"/>
92
      <!-- jvmarg line="-server -Xmx1500m -Xincgc -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/ -->
93 94 95
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
    </java>
  </target>
96 97 98 99 100 101 102 103 104 105

  <target name="server_nofork" depends="server_init">
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="no"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
    </java>
  </target>
106 107 108
  
  <!-- Start a single server in NullTransaction mode -->
  <target name="single_server" depends="init"
fmaistre's avatar
fmaistre committed
109
          description="--> Starts a single server in non-persistent mode">
110 111
    <antcall target="server">
      <param name="sid" value="0"/>
112
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
113
      <param name="osgi.conf" value="${conf.dir}/config.properties"/>
114 115
    </antcall>
  </target>
116 117 118 119
	
  <!-- Start a single server with the shell commands -->
  <target name="shell_server" depends="init"
          description="--> Starts a single server with the shell commands">
afreyssin's avatar
afreyssin committed
120
    <antcall target="server">
121 122 123 124 125
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_shell.properties"/>     
    </antcall>
  </target>
126 127 128 129 130 131 132
  
  <!-- Start a single server with NGTransaction component -->
  <target name="ngt_server" depends="init"
          description="--> Starts a single server with NGTransaction component">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
133
      <param name="osgi.conf" value="${conf.dir}/config.properties"/>
134 135
    </antcall>
  </target>
136 137 138 139 140 141 142 143 144 145 146

  <!-- Start a single server with NGTransaction and JMS Healthcheck component -->
  <target name="jmscheck_server" depends="init"
          description="--> Starts a single server with NGTransaction and JMS Healthcheck component">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_jmscheck.properties"/>
    </antcall>
  </target>

147
	
148 149 150 151 152 153 154 155 156 157
  <!-- Start a single server with DerbyTransaction   -->
  <!-- Be careful: Needs the derby.jar bundle        -->
  <target name="derby_server" depends="init"
          description="--> Starts a single server in persistent mode with a Derby repository">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/derby_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_derby.properties"/>
    </antcall>
  </target>
158

159 160 161
  <!-- Start a single server with JDBCTransaction and Derby data store -->
  <!-- Be careful: Needs the derby.jar bundle        -->

162
  <target name="derbyxserver" depends="server_init">
163 164 165 166 167 168 169 170 171 172 173
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
	  <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.driver=org.apache.derby.jdbc.EmbeddedDriver"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.url=jdbc:derby:MyJoramDB;create=true"/>
      <jvmarg value="-Dorg.ow2.joram.dbtransaction.dbtable=MyTable"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbname=MyJoramDB"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.user=user1"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.password=pass1"/>
174 175 176
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_count=10"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_max_period=120000"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_min_delay=5000"/>
177 178 179 180
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbinit=CREATE TABLE MyTable (name VARCHAR(256), content BLOB(16M), PRIMARY KEY(name))"/>
    </java>
  </target>

181
  <target name="jdbc_derby_server" depends="init"
182
          description="--> Starts a single server in persistent mode with a Derby repository">
183
    <antcall target="derbyxserver">
184 185 186
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/jdbc_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_derby.properties"/>
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
    </antcall>
  </target>

  <target name="mysqlxserver" depends="server_init">
    <java classname="org.apache.felix.main.Main"
          failonerror="no" fork="yes"
          dir="${run.dir}/server${sid}">
      <classpath path="${felix.class.path}"/>
      <jvmarg line="-server -Xmx2G -Xdebug -Xnoagent -Djava.compiler=NONE -Dfelix.config.properties=file:config.properties -Dfr.dyade.aaa.agent.AgentServer.id=${sid} -Dcom.sun.management.jmxremote"/>
    <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.driver=com.mysql.jdbc.Driver"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.url=jdbc:mysql://192.168.1.133:3306/joramdb0?useUnicode=true&amp;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC"/>
      <jvmarg value="-Dorg.ow2.joram.dbtransaction.dbtable=MyTable"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbname=joramdb0"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.user=joram"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.password=Jor@m#516@"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.dbinit=CREATE TABLE MyTable (name VARCHAR(255), content LONGBLOB, PRIMARY KEY(name))"/>
      <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_count=0"/>
        <jvmarg value="-Dorg.ow2.joram.jdbc.transaction.connect_retry_delay=0"/>
    </java>
  </target>

  <target name="jdbc_mysql_server" depends="init"
          description="--> Starts a single server in persistent mode with a Derby repository">
    <antcall target="mysqlxserver">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/jdbc_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_mysql.properties"/>
214 215
    </antcall>
  </target>
216

afreyssin's avatar
afreyssin committed
217
  <!-- Start a single server in NullTransaction mode with all extension bundles -->
218
  <target name="extended_server" depends="init"
219
          description="--> Starts a single server in non-persistent mode">
220
    <antcall target="server">
221
      <param name="sid" value="0"/>
222 223
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_all.properties"/>    	
224 225
    </antcall>
  </target>
joram's avatar
joram committed
226

afreyssin's avatar
afreyssin committed
227 228 229 230 231 232 233 234 235 236
  <!-- Start a single server in NullTransaction mode with extension bundles needed for JASP-->
  <target name="stomp_server" depends="init"
          description="--> Starts a single server in non-persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_stomp.properties"/>    	
    </antcall>
  </target>

237 238 239 240 241 242 243 244 245
  <!-- Start a single server in NullTransaction mode with extension bundles needed for the WEB console -->
  <target name="console_server" depends="init"
          description="--> Starts a single server in non-persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/centralized_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_console.properties"/>    	
    </antcall>
  </target>
afreyssin's avatar
afreyssin committed
246 247 248 249 250 251 252 253 254 255
  
  <!-- Start a single AMQP server -->
  <target name="amqp_server" depends="init"
          description="--> Starts a single AMQP server in persistent mode">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/amqp_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_amqp.properties"/>
    </antcall>
  </target>
256

257 258 259
  <!-- Setup a distributed architecture with 3 servers -->
  <target name="server0" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 0)">
Nicolas Tachker's avatar
Nicolas Tachker committed
260 261
    <antcall target="server">
      <param name="sid" value="0"/>
262
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
263 264
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>   
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_0.xml"/>
265 266 267 268 269 270 271 272
    </antcall>
  </target>
	
  <target name="server1" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 1)">
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
273 274
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>   
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_1.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
275 276
    </antcall>
  </target>
277 278 279 280 281 282
	
  <target name="server2" depends="init"
          description="--> Starts a server for a distributed architecture (w/ id 2)">
    <antcall target="server">
      <param name="sid" value="2"/>
      <param name="a3.conf" value="${conf.dir}/distributed_a3servers.xml"/>
283 284
      <param name="osgi.conf" value="${conf.dir}/config_min.properties"/>  
    	<param name="monit.conf" value="${conf.dir}/MonitoringConfig_2.xml"/>
285 286 287 288 289 290 291 292 293 294 295
    </antcall>
  </target>
	
  <target name="servers"
          description="--> Starts 3 servers in a distributed configuration">
    <parallel>
      <antcall target="server0"/>
      <antcall target="server1"/>
      <antcall target="server2"/>
    </parallel>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
296

297 298 299 300 301 302
  <!-- Runs the Admin Mbean adapter for client JMX console -->
  <target name="admin_jmx" depends="simple_init"
    description="--> Starts an admin MBean adapter client">
    <java classname="org.objectweb.joram.client.jms.admin.JoramAdminConnect"
          failonerror="no" fork="yes"
          dir="${run.dir}">
303
      <jvmarg line="-Dcom.sun.management.jmxremote"/>
304 305 306
      <classpath path="${project.class.path}"/>
    </java>
  </target>
Nicolas Tachker's avatar
Nicolas Tachker committed
307

308
  <!-- **************************************************
309
       * Bridge tests based on real client configuration #1
310 311 312 313
       ************************************************** -->
  
  <!-- EF Bridge server -->
  <target name="efbridge_server" depends="simple_init"
314
          description="--> Starts the EF bridge server">
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/efbridge_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_bridge.properties"/>    	
    </antcall>
  </target>
	
  <!-- Setup the central server configuration -->
  <target name="efbridge_admin" depends="simple_init"
          description="--> Runs the EF bridge sample administration">
    <java classname="efbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Setup the bridge configuration -->
  <target name="efbridge_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for EF bridge sample">
    <copy file="${src.dir}/efbridge/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="./joramAdmin.xml"/>
    </java>
  </target>

  <!-- Runs the efbridge producer -->
  <target name="efbridge_producer" depends="init"
    description="--> Runs the EF bridge sample producer">
    <java classname="efbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge consumer -->
  <target name="efbridge_consumer" depends="init"
    description="--> Runs the EF bridge sample consumer">
    <java classname="efbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
361

362 363 364 365 366
  <!-- **************************************************
       * Bridge tests based on real client configuration #2
       ************************************************** -->
  
  <!-- SEIP Bridge server, /!\ the configuration file is inherited from efbridge -->
367
  <!-- Needs to run a ngt_server -->
368 369 370 371
  <target name="seipbridge_server" depends="simple_init"
          description="--> Starts the SEIP bridge server">
    <antcall target="server">
      <param name="sid" value="1"/>
372
      <param name="a3.conf" value="${conf.dir}/seipbridge_a3servers.xml"/>
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
      <param name="osgi.conf" value="${conf.dir}/config_bridge.properties"/>    	
    </antcall>
  </target>
	
  <!-- Setup the central server configuration -->
  <target name="seipbridge_admin" depends="simple_init"
          description="--> Runs the SEIP bridge sample administration">
    <java classname="seipbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge producer -->
  <target name="seipbridge_producer" depends="init"
    description="--> Runs the SEIP bridge sample producer">
    <java classname="seipbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the efbridge consumer -->
  <target name="seipbridge_consumer" depends="init"
    description="--> Runs the SEIP bridge sample consumer">
    <java classname="seipbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

405 406 407
  <!-- **************************************************
       * Rest samples
       ************************************************** -->
408
  
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442
  <!-- Start REST and a single server in NullTransaction mode -->
  <target name="rest_server" depends="init"
          description="--> Starts a single server with REST/JMS API">
    <antcall target="server">
      <param name="sid" value="0"/>
      <param name="a3.conf" value="${conf.dir}/ngt_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_rest.properties"/>
    </antcall>
  </target>

  <!-- Runs the rest producer -->
  <target name="rest.producer" depends="init"
    description="--> Runs the rest sample producer">
    <java classname="rest.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the rest consumer -->
  <target name="rest.consumer" depends="init"
    description="--> Runs the rest sample consumer">
    <java classname="rest.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
	
  <!-- Runs the Rest PERFS producer -->
  <target name="rest_perfs_prod_q" depends="simple_init"
    description="--> Starts the Rest PERFS producer">
    <java classname="rest.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
443
      <jvmarg line="-DNbClient=2 -DNbMsgPerRound=1000 -DRound=50 -DMsgSize=1000 -DMsgTransient=false -Dmps=1000" />
444
      <!-- jvmarg line="-DNbClient=1 -DNbMsgPerRound=100 -DRound=200 -DMsgSize=1000 -DMsgTransient=false -Dmps=120" / -->
445 446 447 448 449 450 451 452 453
    </java>
  </target>
	
  <!-- Runs the Rest PERFS consumer -->
  <target name="rest_perfs_cons_q" depends="simple_init"
    description="--> Starts the Rest PERFS consumer">
    <java classname="rest.PerfConsumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
454
      <jvmarg line="-DNbClient=5 -DNbMsgPerRound=1000 -DRound=20" />
455 456 457
    </java>
  </target>

458 459 460 461 462
  <!-- **************************************************
       * Rest bridge Sample
       ************************************************** -->

  <!-- Rest Bridge server -->
afreyssin's avatar
afreyssin committed
463 464 465 466 467 468 469 470
  <target name="restbridge_server" depends="simple_init"
          description="--> Starts the rest bridge server">
    <antcall target="server">
      <param name="sid" value="1"/>
      <param name="a3.conf" value="${conf.dir}/restbridge_a3servers.xml"/>
      <param name="osgi.conf" value="${conf.dir}/config_restbridge.properties"/>      
    </antcall>
  </target>
471
    
472
  <!-- Setup the bridge server configuration -->
afreyssin's avatar
afreyssin committed
473 474 475 476 477 478 479 480
  <target name="restbridge_admin" depends="simple_init"
          description="--> Runs the rest bridge sample administration">
    <java classname="restbridge.Admin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
481

afreyssin's avatar
afreyssin committed
482
  <!-- Setup the bridge configuration -->
483 484
  <target name="restbridge_adminxml" depends="simple_init"
          description="--> Runs XML administration script for rest bridge sample">
afreyssin's avatar
afreyssin committed
485 486 487 488 489 490 491
    <copy file="${src.dir}/restbridge/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="./joramAdmin.xml"/>
    </java>
492
  </target>
493

afreyssin's avatar
afreyssin committed
494 495 496 497 498 499
  <!-- Runs the rest bridge producer -->
  <target name="restbridge_producer" depends="init"
          description="--> Runs the rest bridge sample producer">
    <java classname="restbridge.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
500
      <jvmarg line="-Dqueue=queueDist"/>
afreyssin's avatar
afreyssin committed
501 502
    </java>
  </target>
503

afreyssin's avatar
afreyssin committed
504 505 506 507 508 509
	<!-- Runs the rest bridge consumer -->
  <target name="restbridge_consumer" depends="init"
          description="--> Runs the rest bridge sample consumer">
    <java classname="restbridge.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556
      <jvmarg line="-Dqueue=queueAcq"/>
    </java>
  </target>
	
  <!-- Setup the bridge server configuration -->
  <target name="restbridge_perfs_admin" depends="simple_init"
          description="--> Runs the rest bridge sample administration">
    <java classname="restbridge.PerfAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- Runs the rest performance producer: send X messages on queue -->
  <target name="restbridge_perfs_prod_q1" depends="simple_init"
          description="-> Starts the Rest PERFS producer">
    <java classname="restbridge.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueDist1 -DNbMsgPerRound=10 -DRound=1000 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=70" />
    </java>
  </target>
    <target name="restbridge_perfs_prod_q2" depends="simple_init"
          description="-> Starts the Rest PERFS producer">
    <java classname="restbridge.PerfProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueDist2 -DNbMsgPerRound=10 -DRound=1000 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=70" />
    </java>
  </target>
	
  <!-- Runs the rest performance consumer on queue -->
  <target name="restbridge_perfs_cons_q1" depends="simple_init"
          description="-> Starts the Rest PERFS consumer">
    <java classname="restbridge.PerfConsumer" failonerror="no" fork="yes"
           dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueAcq1 -DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
    </java>
  </target>
  <target name="restbridge_perfs_cons_q2" depends="simple_init"
          description="-> Starts the Rest PERFS consumer">
    <java classname="restbridge.PerfConsumer" failonerror="no" fork="yes"
           dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-Dqueue=queueAcq2 -DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
afreyssin's avatar
afreyssin committed
557 558 559
    </java>
  </target>
 
560 561
	<!-- TODO (AF): cleans unused or duplicate targets below -->
	
562
  <!-- Runs the rest bridge receiver -->
afreyssin's avatar
afreyssin committed
563 564 565 566 567 568 569
  <target name="restbridge_receiver" depends="init"
          description="--> Runs the rest bridge sample receiver">
    <java classname="restbridge.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
570
  
afreyssin's avatar
afreyssin committed
571
  <!-- Runs the performance producer: send X messages on queue -->
572
      <target name="perfs_prod" depends="simple_init"
573 574 575 576 577 578 579 580 581
        description="--> Starts the PERFS producer">
        <java classname="perfs.Producer" failonerror="no" fork="yes"
              dir="${run.dir}">
          <classpath path="${project.class.path}"/>
          <jvmarg line="-DNbMsgPerRound=1000 -DRound=10 -DasyncSend=false -DTransacted=false -DMsgSize=10000 -DMsgTransient=false -Dmps=150000" />
          <arg line="queue"/>
        </java>
      </target>
  
582
  <!-- Runs the performance sample consumer on queue -->
afreyssin's avatar
afreyssin committed
583 584 585 586 587 588 589 590 591
  <target name="perfs_cons" depends="simple_init"
          description="--> Starts the PERFS consumer">
    <java classname="perfs.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <jvmarg line="-DNbMsgPerRound=1000 -DTransacted=false -DimplicitAck=false" />
      <arg line="queue"/>
    </java>
  </target>
592

afreyssin's avatar
afreyssin committed
593
  <!-- **************************************************
594
       * Classic Sample
afreyssin's avatar
afreyssin committed
595 596
       ************************************************** -->

597 598 599 600 601 602 603 604 605 606
  <!-- Setup the classic configuration -->
  <target name="test" depends="simple_init"
          description="--> ">
    <java classname="classic.test"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

afreyssin's avatar
afreyssin committed
607 608 609 610 611 612 613 614 615 616 617 618 619
  <!-- Runs the JoramAdmin class -->
  <target name="joram_admin" depends="simple_init"
          description="--> Runs the JoramAdmin with shutdown command">
    <java classname="classic.JoramAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg value="localhost"/>
      <arg value="6666"/>
      <arg value="shutdown"/>
    </java>
  </target>

620
  <!-- Setup the classic configuration -->
621 622
  <target name="classic_admin" depends="simple_init"
          description="--> Runs administration code for classic sample (centralized architecture)">
623 624 625 626
    <java classname="classic.ClassicAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
627
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y" / -->
628
    </java>
joram's avatar
joram committed
629 630
  </target>

631 632 633 634 635 636 637 638 639 640 641
  <!-- Monitor the classic configuration -->
  <target name="classic_monitor" depends="simple_init"
          description="--> Runs Monitoring code for classic sample (centralized architecture)">
    <java classname="classic.Monitor"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y" / -->
    </java>
  </target>

Nicolas Tachker's avatar
Nicolas Tachker committed
642
  <!-- Setup the classic configuration -->
643 644
  <target name="classic_adminxml" depends="simple_init"
          description="-->  Runs XML administration script for classic sample (centralized architecture)">
Nicolas Tachker's avatar
Nicolas Tachker committed
645
    <copy file="${src.dir}/classic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
646
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
Nicolas Tachker's avatar
Nicolas Tachker committed
647 648 649
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
650
      <arg line="./joramAdmin.xml"/>
Nicolas Tachker's avatar
Nicolas Tachker committed
651 652 653
    </java>
  </target>

654 655 656 657
  <!-- Runs the classic consumer client for queue -->
  <target name="consumer_queue" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.Consumer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
658
          dir="${run.dir}">
joram's avatar
joram committed
659
      <classpath path="${project.class.path}"/>
660
    	<arg line="queue"/>
joram's avatar
joram committed
661 662 663
    </java>
  </target>

664 665 666 667
  <!-- Runs the classic producer client for queue -->
  <target name="producer_queue" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.Producer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
668
          dir="${run.dir}">
joram's avatar
joram committed
669
      <classpath path="${project.class.path}"/>
670
    	<arg line="queue"/>
joram's avatar
joram committed
671 672 673
    </java>
  </target>

674 675 676 677
  <!-- Runs the classic consumer client for topic -->
  <target name="consumer_topic" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.Consumer" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
678
          dir="${run.dir}">
joram's avatar
joram committed
679
      <classpath path="${project.class.path}"/>
680
    	<arg line="topic"/>
joram's avatar
joram committed
681 682 683
    </java>
  </target>

684 685 686 687
  <!-- Runs the classic producer client for topic -->
  <target name="producer_topic" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.Producer" failonerror="no" fork="yes"
688 689
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
690
    	<arg line="topic"/>
691 692
    </java>
  </target>
afreyssin's avatar
afreyssin committed
693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732
	
  <!-- Runs the JMS2 consumer client for queue -->
  <target name="jms2_consumer_queue" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="jms2.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="queue"/>
    </java>
  </target>

  <!-- Runs the JMS2 producer client for queue -->
  <target name="jms2_producer_queue" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="jms2.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="queue"/>
    </java>
  </target>

  <!-- Runs the JMS2 consumer client for topic -->
  <target name="jms2_consumer_topic" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="jms2.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="topic"/>
    </java>
  </target>

  <!-- Runs the JMS2 producer client for topic -->
  <target name="jms2_producer_topic" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="jms2.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
      <arg line="topic"/>
    </java>
  </target>
733

734 735 736 737
  <!-- Runs the classic browser client -->
  <target name="browser" depends="simple_init"
    description="--> Starts a Browser client">
    <java classname="classic.Browser" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
738
          dir="${run.dir}">
joram's avatar
joram committed
739 740 741 742
      <classpath path="${project.class.path}"/>
    </java>
  </target>

743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762
  <!-- Runs the classic consumer client for queue -->
  <target name="aconsumer" depends="simple_init"
    description="--> Starts a Consumer client">
    <java classname="classic.AConsumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    	<arg line="queue"/>
    </java>
  </target>

  <!-- Runs the classic producer client for queue -->
  <target name="aproducer" depends="simple_init"
    description="--> Starts a Producer client">
    <java classname="classic.AProducer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    	<arg line="queue"/>
    </java>
  </target>

763 764 765 766 767
  <!-- Starts a STOMP client for testing the bridge -->
  <!-- Be careful, it needs the JASP bundle -->
  <target name="stomp" depends="simple_init"
    description="--> Starts a STOMP client for testing the bridge">
    <java classname="stomp.StompTest" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
768 769 770 771 772
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

773 774 775 776 777 778
  <!-- Code using old JMS 1.0 API - PTP and P/S domains -->

  <!-- Runs the classic sender client -->
  <target name="sender" depends="simple_init"
    description="--> Starts a Sender client">
    <java classname="classic.Sender" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
779 780 781 782 783
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

784 785 786 787
  <!-- Runs the classic receiver client -->
  <target name="receiver" depends="simple_init"
    description="--> Starts a Receiver client">
    <java classname="classic.Receiver" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
788
          dir="${run.dir}">
789 790 791 792
      <classpath path="${project.class.path}"/>
    </java>
  </target>

793 794 795 796
  <!-- Runs the classic subscriber client -->
  <target name="subscriber" depends="simple_init"
    description="--> Starts a subscriber client">
    <java classname="classic.Subscriber" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
797
          dir="${run.dir}">
798
      <classpath path="${project.class.path}"/>
afreyssin's avatar
afreyssin committed
799 800
    </java>
  </target>
801 802 803 804 805 806 807 808 809
	
  <!-- Runs the classic subscriber client -->
  <target name="waiting_subscriber" depends="simple_init"
    description="--> Starts a subscriber client, waiting for instruction to read a new message">
    <java classname="classic.WaitingSubscriber" failonerror="no" fork="no"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>
afreyssin's avatar
afreyssin committed
810

811 812 813 814
  <!-- Runs the classic durable subscriber client -->
  <target name="durable" depends="simple_init"
    description="--> Starts a durable subscriber client">
    <java classname="classic.Durable" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
815 816 817 818 819
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

820 821 822
  <!-- Runs the classic publisher client -->
  <target name="publisher" depends="simple_init"
    description="--> Starts a Publisher client">
afreyssin's avatar
afreyssin committed
823 824 825
    <java classname="classic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
826 827 828
    </java>
  </target>

829 830 831
  <!-- **************************************************
       * Distributed Sample
       ************************************************** -->
afreyssin's avatar
afreyssin committed
832

833 834 835 836
	<!-- Runs the archi administration -->
  <target name="archi_admin" depends="simple_init"
    description="--> Runs the distributed architecture administration">
    <java classname="archi.ArchiAdmin" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
837
          dir="${run.dir}">
joram's avatar
joram committed
838
      <classpath path="${project.class.path}"/>
839
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
joram's avatar
joram committed
840 841 842
    </java>
  </target>

843 844 845 846 847
  <!-- Runs the archi sender client -->
  <target name="archi_sender" depends="simple_init"
    description="--> Runs the distributed architecture Sender client">
    <java classname="archi.Sender" failonerror="no" fork="yes"
          dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
848 849 850 851
      <classpath path="${project.class.path}"/>
    </java>
  </target>

852 853 854 855 856
  <!-- Runs the archi receiver client -->
  <target name="archi_receiver" depends="simple_init"
    description="--> Runs the distributed architecture Receiver client">
    <java classname="archi.Receiver" failonerror="no" fork="yes"
          dir="${run.dir}">
Nicolas Tachker's avatar
Nicolas Tachker committed
857 858 859 860
      <classpath path="${project.class.path}"/>
    </java>
  </target>

861 862 863 864
  <!-- Runs the archi durable subscriber client -->
  <target name="archi_sub" depends="simple_init"
    description="--> Runs the distributed architecture Subscriber client">
    <java classname="archi.DSubscriber" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
865 866 867 868 869
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

870 871 872 873
  <!-- Runs the archi publisher client -->
  <target name="archi_pub" depends="simple_init"
    description="--> Runs the distributed architecture Publisher client">
    <java classname="archi.Publisher" failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
874 875 876 877 878
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

afreyssin's avatar
afreyssin committed
879 880
  <!-- **************************************************
       * Mail queue and topic Samples
881
       * This sample needs joram-mom-extensions-mail bundle in server
afreyssin's avatar
afreyssin committed
882 883
       ************************************************** -->

884 885
  <!-- Setup the configuration for Mail samples-->
  <target name="mail_admin" depends="simple_init"
afreyssin's avatar
afreyssin committed
886 887 888 889 890 891 892 893 894 895
          description="--> Runs administration stuff for incoming mail">
    <copy file="${src.dir}/mail/smtp.properties" todir="${run.dir}"/>
    <copy file="${src.dir}/mail/pop.properties" todir="${run.dir}"/>
    <java classname="mail.MailAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

896 897
  <!-- Runs the consumer client for mail sample, get mail through a queue -->
  <target name="mail_consumer" depends="simple_init"
afreyssin's avatar
afreyssin committed
898 899 900 901 902 903 904
    description="--> Starts a Consumer client for mail samples">
    <java classname="mail.Consumer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

905 906
  <!-- Runs the producer client for mail samples, send mail through a topic -->
  <target name="mail_producer" depends="simple_init"
afreyssin's avatar
afreyssin committed
907 908 909 910 911 912 913 914
    description="--> Starts a Producer client for mail samples">
    <java classname="mail.Producer" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

  <!-- **************************************************
915
       * Chat Sample
afreyssin's avatar
afreyssin committed
916 917
       ************************************************** -->

918
  <!-- Setup the chat administration -->
919
  <target name="chat_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
920
          description="--> Runs chat administration">
921 922 923
    <java classname="chat.ChatAdmin"
      failonerror="no" fork="yes"
      dir="${run.dir}">
afreyssin's avatar
afreyssin committed
924
      <classpath path="${project.class.path}"/> 
925
    </java>
joram's avatar
joram committed
926 927 928
  </target>

  <!-- Runs a chat client -->
929
  <target name="chat1" depends="simple_init"
fmaistre's avatar
fmaistre committed
930
    description="--> Runs chat client as user1">
931
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
932 933 934 935 936 937
      <classpath path="${project.class.path}"/>
      <arg line="user1"/>
    </java>
  </target>

  <!-- Runs an other chat client -->
938
  <target name="chat2" depends="simple_init"
fmaistre's avatar
fmaistre committed
939
    description="--> Runs chat client as user2">
940
    <java classname="chat.SimpleChat" failonerror="no" fork="yes">
joram's avatar
joram committed
941 942 943 944 945
      <classpath path="${project.class.path}"/>
      <arg line="user2"/>
    </java>
  </target>

946 947 948
  <!-- **************************************************
       * DotCom Sample
       ************************************************** -->
joram's avatar
joram committed
949
  
950
  <!-- Setup the dotcom administration -->
951
  <target name="dotcom_admin" depends="simple_init"
fmaistre's avatar
fmaistre committed
952
          description="--> Runs dotcom administration">
afreyssin's avatar
afreyssin committed
953
      <java classname="dotcom.DotcomAdmin" 
joram's avatar
joram committed
954 955 956 957 958 959 960
          failonerror="no" fork="yes"
          dir="${run.dir}">
        <classpath path="${project.class.path}"/>
      </java>
  </target>

  <!-- Runs the dotcom servers -->
961
  <target name="webServers" depends="simple_init"
fmaistre's avatar
fmaistre committed
962
    description="--> Runs all dotcom servers">
joram's avatar
joram committed
963
    <parallel>
afreyssin's avatar
afreyssin committed
964 965
      <java classname="dotcom.BillingServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
966 967
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
968 969
      <java classname="dotcom.InventoryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
970 971
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
972 973
      <java classname="dotcom.CustomerServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
974 975
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
976 977
      <java classname="dotcom.ControlServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
978 979
        <classpath path="${project.class.path}"/>
      </java>
afreyssin's avatar
afreyssin committed
980 981
      <java classname="dotcom.DeliveryServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
982 983 984 985 986 987
        <classpath path="${project.class.path}"/>
      </java>
    </parallel>
  </target>

  <!-- Runs the dotcom client -->
988
  <target name="webClient" depends="simple_init"
fmaistre's avatar
fmaistre committed
989
    description="--> Runs dotcom client">
afreyssin's avatar
afreyssin committed
990 991
    <java classname="dotcom.WebServer" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
992 993 994
      <classpath path="${project.class.path}"/>
    </java>
  </target>
995 996 997 998
	
  <!-- **************************************************
       * Cluster Sample (Topic)
       ************************************************** -->
joram's avatar
joram committed
999

1000
  <!-- Runs the cluster topic administration -->
1001
  <target name="topic_cluster_admin" depends="simple_init"
1002
    description="--> Runs the cluster topic administration">
afreyssin's avatar
afreyssin committed
1003 1004
    <java classname="cluster.topic.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
joram's avatar
joram committed
1005 1006 1007 1008
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1009 1010
  <target name="topic_cluster_adminxml" depends="simple_init"
    description="--> Runs the cluster topic administration XML script">
Nicolas Tachker's avatar
Nicolas Tachker committed
1011
    <copy file="${src.dir}/cluster/topic/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1012 1013
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
Nicolas Tachker's avatar
Nicolas Tachker committed
1014 1015
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1016
      <arg line="./joramAdmin.xml"/>
1017
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
Nicolas Tachker's avatar
Nicolas Tachker committed
1018 1019 1020
    </java>
  </target>

1021
  <!-- Runs a cluster topic subscriber -->
1022
  <target name="topic_cluster_subscriber" depends="simple_init"
1023 1024 1025
    description="--> Runs a cluster topic subscriber">
    <input message="server=" addProperty="sid" validargs="-,0,1,2" defaultvalue=""/>
    <java classname="cluster.topic.Subscriber" failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
1026
          dir="${run.dir}">
joram's avatar
joram committed
1027
      <classpath path="${project.class.path}"/>
1028
      <arg value="${sid}"/>
joram's avatar
joram committed
1029 1030 1031
    </java>
  </target>

1032
  <!-- Runs a cluster topic publisher -->
1033
  <target name="topic_cluster_publisher" depends="simple_init"
1034 1035
    description="--> Runs a cluster topic publisher">
    <input message="server=" addProperty="sid" validargs="-,0,1,2" defaultvalue=""/>
afreyssin's avatar
afreyssin committed
1036 1037 1038
    <java classname="cluster.topic.Publisher" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1039
      <arg value="${sid}"/>
afreyssin's avatar
afreyssin committed
1040 1041 1042
    </java>
  </target>

1043 1044 1045 1046
  <!-- **************************************************
       * Cluster Sample (Queue)
       ************************************************** -->

1047
  <!-- Runs the cluster queue administration -->
1048
  <target name="queue_cluster_admin" depends="simple_init"
1049
    description="--> Runs the cluster queue administration">
afreyssin's avatar
afreyssin committed
1050 1051 1052 1053 1054 1055
    <java classname="cluster.queue.ClusterAdmin" failonerror="no" fork="yes"
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
    </java>
  </target>

1056
  <target name="queue_cluster_adminxml" depends="simple_init"
1057
    description="--> Runs the cluster queue administration xml">
Nicolas Tachker's avatar
Nicolas Tachker committed
1058
    <copy file="${src.dir}/cluster/queue/joramAdmin.xml" overwrite="true" todir="${run.dir}"/>
1059 1060
    <java classname="org.objectweb.joram.client.jms.admin.AdminModule"
          failonerror="no" fork="yes"
afreyssin's avatar
afreyssin committed
1061 1062
          dir="${run.dir}">
      <classpath path="${project.class.path}"/>
1063 1064
      <arg line="./joramAdmin.xml"/>
      <!-- jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y"/ -->
afreyssin's avatar
afreyssin committed
1065 1066 1067
    </java>
  </target>

1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119