|
View:
New views
14 Messages
—
Rating Filter:
Alert me
|
|
|
Continu exec task, while leaving antHi there, is it possible to start (in ant) something in a shell and let this running, while stopping ant. f.i:
<target name="emulateProjectIso" depends="license, testIsoExists" description="Emulate the project iso" unless="file.exists"> <echo level="warning" message="Not supported when booting from live cd"/> <exec executable="/bin/bash" failonerror="true"> <arg value="-c" /> <arg value="qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project-r*.iso"/> </exec> </target> So "ant emulateProjectIso" starts, thr program qemu eulates the cd.. qemu is still running, but ant has stopped.. |
|
|
RE: Continu exec task, while leaving antUse the "spawn" and "fork" attributes of <exec> task (see Ant User manual
for usage) -----Message d'origine----- De : jantje [mailto:janvanoppen@...] Envoyé : lundi 7 juillet 2008 20:45 À : user@... Objet : Continu exec task, while leaving ant Hi there, is it possible to start (in ant) something in a shell and let this running, while stopping ant. f.i: <target name="emulateProjectIso" depends="license, testIsoExists" description="Emulate the project iso" unless="file.exists"> <echo level="warning" message="Not supported when booting from live cd"/> <exec executable="/bin/bash" failonerror="true"> <arg value="-c" /> <arg value="qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project-r*.iso"/> </exec> </target> So "ant emulateProjectIso" starts, thr program qemu eulates the cd.. qemu is still running, but ant has stopped.. -- View this message in context: http://www.nabble.com/Continu-exec-task%2C-while-leaving-ant-tp18315876p1831 5876.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: Continu exec task, while leaving antThanks, but the <exec/> task does not have an fork attribute in the documentation. And when just implementing this, I get the next error:
BUILD FAILED /home/afstudeerwerk/project/build.xml:194: exec doesn't support the "fork" attribute
|
|
|
Re: Continu exec task, while leaving antjantje schrieb:
>> Hi there, is it possible to start (in ant) something in a shell and let >> this >> running, while stopping ant. f.i: with antcontrib <forget> ... you may kick off a new process, see = http://ant-contrib.sourceforge.net/tasks/tasks/forget.html Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Continu exec task, while leaving antThat's right sorry, I'm too much used to the <java> task, never realized
that <exec> had such problem ... <forget> form ant-contrib seems to do the trick indeed. *Olivier Gies* *Delivery Manager Customs & Tax Software Engineering Center Bull, Architect of an Open World ^TM Phone: +86 (10) 65978001 - Ext 555 * *www.bull.com <http://www.bull.com/>* *This e-mail contains material that is confidential for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.* -------- Original Message -------- Subject: Re: Continu exec task, while leaving ant From: jantje <janvanoppen@...> To: user@... Date: 07/07/2008 22:20 > Thanks, but the <exec/> task does not have an fork attribute in the > documentation. And when just implementing this, I get the next error: > > BUILD FAILED > /home/afstudeerwerk/project/build.xml:194: exec doesn't support the "fork" > attribute > > > > > > Olivier Gies wrote: >> Use the "spawn" and "fork" attributes of <exec> task (see Ant User manual >> for usage) >> >> -----Message d'origine----- >> De : jantje [mailto:janvanoppen@...] >> Envoyé : lundi 7 juillet 2008 20:45 >> À : user@... >> Objet : Continu exec task, while leaving ant >> >> >> Hi there, is it possible to start (in ant) something in a shell and let >> this >> running, while stopping ant. f.i: >> >> <target name="emulateProjectIso" depends="license, testIsoExists" >> description="Emulate the project iso" unless="file.exists"> >> <echo level="warning" message="Not supported when booting from live >> cd"/> >> <exec executable="/bin/bash" failonerror="true"> >> <arg value="-c" /> >> <arg value="qemu -no-kqemu -m 512 -cdrom >> ${basedir}/build/liveCd/iso/project-r*.iso"/> >> </exec> >> </target> >> >> So "ant emulateProjectIso" starts, thr program qemu eulates the cd.. qemu >> is >> still running, but ant has stopped.. >> -- >> View this message in context: >> http://www.nabble.com/Continu-exec-task%2C-while-leaving-ant-tp18315876p1831 >> 5876.html >> Sent from the Ant - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@... >> For additional commands, e-mail: user-help@... >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Continu exec task, while leaving antThanks.
But I have problems installing ant-contrib, from the website: grab the ant-contrib module from CVS There is no CVS, when clicking on it. Then I have found "ant-contrib-0.3.jar" this somewhere on the internet. I have placed this in /usr/local/apache-ant/lib/ And have added this to build.xml: <taskdef resource="net/sf/antcontrib/antlib.xml"/> So, no trying to use the forget task: <target name="emulateProjectIso" depends="license, testIsoExists" description="Emulate the project iso" unless="file.exists"> <forget> <exec executable="/bin/bash" failonerror="true"> <arg value="-c" /> <arg value="qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project-r*.iso;"/> </exec> </forget> </target> But got the error: /home/afstudeerwerk/project/build.xml:225: Problem: failed to create task or type For Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. It is hard to install this. Can someone help? Thanks..
|
|
|
RE: Continu exec task, while leaving ant-----Original Message----- From: jantje [mailto:janvanoppen@...] Sent: Thursday, July 10, 2008 12:06 AM To: user@... Subject: Re: Continu exec task, while leaving ant /* Thanks. But I have problems installing ant-contrib, from the website: grab the ant-contrib module from CVS There is no CVS, when clicking on it. Then I have found "ant-contrib-0.3.jar" this somewhere on the internet. I have placed this in /usr/local/apache-ant/lib/ [ ... ] */ Gotcha :-) Wrong version, 0.3 is rather old, but still mentioned on the ant contrib site. /* Copyright (c) 2002-2003 Ant-Contrib Project. All rights Reserved. */ no comment ;-) Grab version 1.0b2 or 1.0b3 from [1] and use the antlib.xml, like that = when antcontrib.jar in %ANT_HOME%/lib <!-- Import AntContrib --> <taskdef resource="net/sf/antcontrib/antlib.xml" /> or located elsewhere <!-- Import AntContrib --> <taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath path=path/to/elsewhere/antcontrib.jar"/> </taskdef> [1] = http://sourceforge.net/project/showfiles.php?group_id=36177 Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: Continu exec task, while leaving antThanks! The <forget/> -task works now.. f.i.
<forget> <echo message="test"/> </forget> However, when using it with the <exec/> -task, I get no error and it does nothing (Is there a way to solve it?) [PS: the echo message is also not displaying. Still I get the BUILD SUCCESFULL back]: <forget> <exec executable="/bin/bash" failonerror="true"> <arg value="-c" /> <arg value="qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project.iso;"/> </exec> <echo message="test"/> </forget>
|
|
|
RE: Continu exec task, while leaving ant-----Original Message----- From: jantje [mailto:janvanoppen@...] Sent: Thursday, July 10, 2008 8:06 PM To: user@... Subject: RE: Continu exec task, while leaving ant /* Thanks! The <forget/> -task works now.. f.i. <forget> <echo message="test"/> </forget> However, when using it with the <exec/> -task, I get no error and it does nothing (Is there a way to solve it?) [PS: the echo message is also not displaying. Still I get the BUILD SUCCESFULL back]: <forget> <exec executable="/bin/bash" failonerror="true"> <arg value="-c" /> <arg value="qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project.iso;"/> </exec> <echo message="test"/> </forget> */ currently on windows here, f.e. <!-- start Notepad and wait for user input ... --> <forget> <exec executable="notepad.exe"> <arg value="c:/notes.txt" /> </exec> </forget> works fine. try = <exec executable="bash" failonerror="true"> <arg value="-c qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project.iso" /> </exec> or ... <arg line="-c qemu -no-kqemu -m 512 -cdrom ${basedir}/build/liveCd/iso/project.iso" /> ... means put all on one line with arg value || arg line ... if that doesn't work either, it's most likely a problem with user rights Is the bash your login shell ? Did you try the exec a shell ? Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: Continu exec task, while leaving antThanks..
I have tryes all your options: nothing worked. And yes, bash is my login shell.. Other exec commands work, f.i. starting apache-tomcat.. And the line with "-c qemu..." does work, so no problem with rights I think.. Are we missing something?
|
|
|
RE: Continu exec task, while leaving ant-----Original Message----- From: jantje [mailto:janvanoppen@...] Sent: Friday, July 11, 2008 10:09 AM To: user@... Subject: RE: Continu exec task, while leaving ant /* Thanks.. I have tryes all your options: nothing worked. And yes, bash is my login shell.. Other exec commands work, f.i. starting apache-tomcat.. And the line with "-c qemu..." does work, so no problem with rights I think.. Are we missing something? */ Try to run the antscript with root account or maybe with <exec arg ... sudo> Did you try the apache-tomcat call within <exec> ? What about catching the output f.e. <exec executable="bash" failonerror="true" outputproperty="result" resultproperty="rc.ant"> <arg value="ant -diagnostics" /> </exec> or ... <arg value="du -hs /tmp" /> ... Use outputproperty and resultproperty with your call and tell us what comes back, we need the output and RC As you're already using antcontrib you may use the <shellscript> task, but under the hood it's nearly the same, means if your command doesn't work with <exec> it won't work with <shellscript> either. Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
RE: Continu exec task, while leaving antThanks for your reply,
I will try to answer your questions: <exec/> works with apache tomcat AND with qemu, I came to this conclusion after doing some tests.. They do not work, when they are in <forget/> from ant-contrib, so this does not work: <forget> <exec executable="bash" failonerror="true"> <arg value="-c" /> <arg value="apache-tomcat start;"/> </exec> </forget> RESULT: "BUILD SUCCESFUL", nothing else.. And this does work: <exec executable="bash" failonerror="true"> <arg value="-c" /> <arg value="apache-tomcat start;"/> </exec> While <forget/> works with f.i. <echo/> <forget> <echo>Test!</echo> </forget> Like you suggested: It does not work with <exec/> and also not with <shellscript/> (from ant-contrib) And here is the output you asked for: ------- Ant diagnostics report ------- Apache Ant version 1.7.0 compiled on June 17 2008 ------------------------------------------- Implementation Version ------------------------------------------- core tasks : 1.7.0 optional tasks : not available ------------------------------------------- ANT PROPERTIES ------------------------------------------- ant.version: Apache Ant version 1.7.0 compiled on June 17 2008 ant.java.version: 1.5 ant.core.lib: /usr/local/apache-ant/bootstrap/lib/ant.jar ant.home: /usr/local/apache-ant/bootstrap ------------------------------------------- ANT_HOME/lib jar listing ------------------------------------------- ant.home: /usr/local/apache-ant/bootstrap ant-testutil.jar (14907 bytes) xml-apis.jar (195119 bytes) ant-swing.jar (6678 bytes) ant-junit.jar (92549 bytes) ant-launcher.jar (9939 bytes) ant.jar (1135848 bytes) ant-trax.jar (6884 bytes) xercesImpl.jar (1212965 bytes) ant-nodeps.jar (427954 bytes) ant-jmf.jar (6596 bytes) ------------------------------------------- USER_HOME/.ant/lib jar listing ------------------------------------------- user.home: /home/afstudeerwerk No such directory. ------------------------------------------- Tasks availability ------------------------------------------- p4reopen : Not Available (the implementation class is not present) image : Not Available (the implementation class is not present) sshexec : Not Available (the implementation class is not present) wlrun : Not Available (the implementation class is not present) p4label : Not Available (the implementation class is not present) p4revert : Not Available (the implementation class is not present) p4submit : Not Available (the implementation class is not present) scp : Not Available (the implementation class is not present) p4change : Not Available (the implementation class is not present) p4delete : Not Available (the implementation class is not present) p4integrate : Not Available (the implementation class is not present) rexec : Not Available (the implementation class is not present) stlist : Not Available (the implementation class is not present) telnet : Not Available (the implementation class is not present) p4sync : Not Available (the implementation class is not present) p4edit : Not Available (the implementation class is not present) antlr : Not Available (the implementation class is not present) netrexxc : Not Available (the implementation class is not present) ftp : Not Available (the implementation class is not present) p4resolve : Not Available (the implementation class is not present) starteam : Not Available (the implementation class is not present) stylebook : Not Available (the implementation class is not present) stlabel : Not Available (the implementation class is not present) p4have : Not Available (the implementation class is not present) jdepend : Not Available (the implementation class is not present) stcheckin : Not Available (the implementation class is not present) stcheckout : Not Available (the implementation class is not present) p4labelsync : Not Available (the implementation class is not present) ejbc : Not Available (the implementation class is not present) p4fstat : Not Available (the implementation class is not present) wlstop : Not Available (the implementation class is not present) p4counter : Not Available (the implementation class is not present) p4add : Not Available (the implementation class is not present) ddcreator : Not Available (the implementation class is not present) A task being missing/unavailable should only matter if you are trying to use it ------------------------------------------- org.apache.env.Which diagnostics ------------------------------------------- Not available. Download it at http://xml.apache.org/commons/ ------------------------------------------- XML Parser information ------------------------------------------- XML Parser : org.apache.xerces.jaxp.SAXParserImpl XML Parser Location: /usr/local/apache-ant/bootstrap/lib/xercesImpl.jar Namespace-aware parser : org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser Namespace-aware parser Location: /usr/local/apache-ant/bootstrap/lib/xercesImpl.jar ------------------------------------------- System properties ------------------------------------------- java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition sun.boot.library.path : /usr/local/jdk1.5.0_15/jre/lib/i386 java.vm.version : 1.5.0_15-b04 ant.library.dir : /usr/local/apache-ant/bootstrap/lib java.vm.vendor : Sun Microsystems Inc. java.vendor.url : http://java.sun.com/ path.separator : : java.vm.name : Java HotSpot(TM) Client VM file.encoding.pkg : sun.io user.country : US sun.java.launcher : SUN_STANDARD sun.os.patch.level : unknown java.vm.specification.name : Java Virtual Machine Specification user.dir : /home/afstudeerwerk/project java.runtime.version : 1.5.0_15-b04 java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment java.endorsed.dirs : /usr/local/jdk1.5.0_15/jre/lib/endorsed os.arch : i386 java.io.tmpdir : /tmp line.separator : java.vm.specification.vendor : Sun Microsystems Inc. os.name : Linux ant.home : /usr/local/apache-ant/bootstrap sun.jnu.encoding : ISO-8859-1 java.library.path : /usr/local/jdk1.5.0_15/jre/lib/i386/client:/usr/local/jdk1.5.0_15/jre/lib/i386:/usr/local/jdk1.5.0_15/jre/../lib/i386 java.specification.name : Java Platform API Specification java.class.version : 49.0 sun.management.compiler : HotSpot Client Compiler os.version : 2.6.24.5-smp user.home : /home/afstudeerwerk user.timezone : java.awt.printerjob : sun.print.PSPrinterJob file.encoding : ISO-8859-1 java.specification.version : 1.5 user.name : afstudeerwerk java.class.path : /usr/local/apache-ant/bootstrap/lib/ant-launcher.jar:/usr/local/jar/junit.jar:/usr/local/jar/junit.jar:/usr/local/apache-ant/bootstrap/lib/ant-testutil.jar:/usr/local/apache-ant/bootstrap/lib/xml-apis.jar:/usr/local/apache-ant/bootstrap/lib/ant-swing.jar:/usr/local/apache-ant/bootstrap/lib/ant-junit.jar:/usr/local/apache-ant/bootstrap/lib/ant-launcher.jar:/usr/local/apache-ant/bootstrap/lib/ant.jar:/usr/local/apache-ant/bootstrap/lib/ant-trax.jar:/usr/local/apache-ant/bootstrap/lib/xercesImpl.jar:/usr/local/apache-ant/bootstrap/lib/ant-nodeps.jar:/usr/local/apache-ant/bootstrap/lib/ant-jmf.jar:/usr/local/jdk1.5.0_15/lib/tools.jar java.vm.specification.version : 1.0 sun.arch.data.model : 32 java.home : /usr/local/jdk1.5.0_15/jre java.specification.vendor : Sun Microsystems Inc. user.language : en java.vm.info : mixed mode, sharing java.version : 1.5.0_15 java.ext.dirs : /usr/local/jdk1.5.0_15/jre/lib/ext sun.boot.class.path : /usr/local/jdk1.5.0_15/jre/lib/rt.jar:/usr/local/jdk1.5.0_15/jre/lib/i18n.jar:/usr/local/jdk1.5.0_15/jre/lib/sunrsasign.jar:/usr/local/jdk1.5.0_15/jre/lib/jsse.jar:/usr/local/jdk1.5.0_15/jre/lib/jce.jar:/usr/local/jdk1.5.0_15/jre/lib/charsets.jar:/usr/local/jdk1.5.0_15/jre/classes java.vendor : Sun Microsystems Inc. file.separator : / java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi sun.cpu.endian : little sun.io.unicode.encoding : UnicodeLittle sun.cpu.isalist : ------------------------------------------- Temp dir ------------------------------------------- Temp dir is /tmp Temp dir is writeable Temp dir alignment with system clock is -121 ms ------------------------------------------- Locale information ------------------------------------------- Timezone Central European Time offset=7200000 ------------------------------------------- Proxy information ------------------------------------------- Java1.5+ proxy settings: Direct connection
|
|
|
Re: Continu exec task, while leaving antjantje schrieb:
> <exec/> works with apache tomcat AND with qemu, I came to this conclusion > after doing some tests.. They do not work, when they are in <forget/> from > ant-contrib, so this does not work: > <forget> > <exec executable="bash" failonerror="true"> > <arg value="-c" /> > <arg value="apache-tomcat start;"/> > </exec> > </forget> > RESULT: "BUILD SUCCESFUL", nothing else.. a small test here@home with ant 1.7.0 / jdk 1.6.0_06 on OpenSuse 10.3 shows the same result for me testscript #!/bin/bash echo "$1 + $2 => `expr $1 + $2`" <exec executable="bash"> <arg line="/shellscripts/test 2 5 >/shellscripts/test_out" /> </exec> works fine, but not when put into <forget> ... </forget> Maybe it's a bug specific for use with ant 1.7.0 ?! No further ideas right now, sorry. Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: Continu exec task, while leaving antOK, thanks.. :-)
|
| Free Forum Powered by Nabble | Forum Help |