probleme avec la task exec
Bonjour,
je dois redémarrer un serveur glassfish à l'aide de ant. J'ai donc créé une target pour exécuter une ligne de commande (qui marche très bien dans un terminal)
Citation:
<target name="start.domain" description="starts application server domain">
<echo message="Starting all domain for ${glassfish.home}"/>
<exec executable="${asadmin}" failonerror="true" dir="${glassfish.home}">
<arg line="start-domain"/>
<arg line=" --echo=${echo}"/>
<arg line=" ${glassfish.domain.name}"/>
</exec>
<echo message="Starting ${glassfish.domain.name} domain"/>
</target>
Mon problème est qu'après l'exécution de la commande, le programme ne me rend pas la main (le dernier echo de la target ne passe même pas). J'ai le résultat suivant dans le terminal:
Citation:
start.domain:
[echo] Starting all domain for Z:\SERVERs\glassfish
[exec] Starting Domain domain1, please wait.
[exec] Log redirected to Z:\SERVERs\glassfish\domains\domain1\logs\server.log.
[exec] Redirecting output to Z:/SERVERs/glassfish/domains/domain1/logs/server.log
[exec] Domain domain1 is ready to receive client requests. Additional services are being started in background.
[exec] Domain [domain1] is running [Sun Java System Application Server 9.1_02 (build b04-fcs)] with its configuration and logs at: [Z:\SERVERs\glassfish\domains].
[exec] Admin Console is available at [
http://localhost:4848].
[exec] Use the same port [4848] for "asadmin" commands.
[exec] User web applications are available at these URLs:
[exec] [
http://localhost:8080 https://localhost:8181 ].
[exec] Following web-contexts are available:
[exec] [/web1 /__wstx-services ].
[exec] Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[exec] [service:jmx:rmi:///jndi/rmi://****:8686/jmxrmi] for domain management purposes.
[exec] Domain listens on at least following ports for connections:
[exec] [8080 8181 4848 3700 3820 3920 8686 ].
[exec] Domain does not support application server clusters and other standalone instances.
J'ai validé que le serveur est bien démarré avec un navigateur, par contre le reste du script ant ne s'execute pas. J'ai essayé un timeout sur la task exec mais rien a faire, ça marche po.
Auriez vous une idée pour que le script ant continue son exécution?? je suis à cours d'idée... Merci