You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by gags_78 <ma...@gmail.com> on 2010/01/21 18:55:53 UTC

maven-antrun-plugin exec task. Windows. Can't leave process running in the background.

Hi folks,

         I'm trying to introduce automated integration testing for our
application. I successfully integrated the cargo plugin to get our product
deployed and started within a fresh jboss installation as part of
pre-integration-test phase. Alas in order for our integration tests to work
we need to connect to an external 3rd party service that itself needs to be
running before the jboss server tries to boot. 

The following is the pom snippet I was hoping to use to perform this task. 


<artifactId>maven-antrun-plugin</artifactId>
<executions>
       <execution>
              <phase>process-test-resources</phase>
              	<goals>
	           <goal>run</goal>
              	</goals>
              	<configuration>
              <tasks>
                    <exec executable="startExternalService.cmd"/>
              </tasks>
              </configuration>								
       </execution>
</executions>


Alas the maven process seems to hang until the external process is exited
while I need it to continue running in the background to allow my jboss
server to come up.
I had orginally encountered the same problem with the Jboss server as
obviously you need to kick it off and then once it's up you would run the
tests. Again the mvn process would just hang there. then I stumbled across
cargo and they've a very handy element called <wait>false</wait> that can be
introduced to the cargo plugin's configuration element and it prevents maven
from blocking on the jboss server. This allows you to kick off other
executions but only within the same phase it seems. 

I think this problem may be associated solely with windows as I believe
though I haven't tested it that the ampersand '&' in linux will instruct the
process to run in the background allowing the maven process to continue. 

Basically if anyone has managed to leave a process running on a windows
machine detached from the maven process and continue with the build I'd love
the heads up on how to. 

Thanks,
Mark.
-- 
View this message in context: http://old.nabble.com/maven-antrun-plugin-exec-task.-Windows.-Can%27t-leave-process-running-in-the-background.-tp27261952p27261952.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-antrun-plugin exec task. Windows. Can't leave process running in the background.

Posted by gags_78 <ma...@gmail.com>.
It is a container for legendariness!! Top man!!


Siegfried Goeschl wrote:
> 
> Hi Mark,
> 
> no idea what a ledgebox is but is is probably not very offending ... ;-)
> 
> Cheers,
> 
> Siegfried Goeschl
> 
> gags_78 wrote:
>> Hi Siegfried,
>>
>>           You sir, are what we commonly refer to in Ireland as a
>> Legend!!! A
>> total ledgebox!! I cannot thank you enough. That has made my day and
>> works a
>> charm. I thank you kindly.
>>
>> Regards,
>> Mark.
>>
>>
>>
>> Siegfried Goeschl wrote:
>>   
>>> Hi Mark,
>>>
>>> have you tried the "spawn"attribute of the Ant <exec> task?
>>>
>>> Cheers,
>>>
>>> Siegfried Goeschl
>>>
>>> gags_78 wrote:
>>>     
>>>> Hi folks,
>>>>
>>>>          I'm trying to introduce automated integration testing for our
>>>> application. I successfully integrated the cargo plugin to get our
>>>> product
>>>> deployed and started within a fresh jboss installation as part of
>>>> pre-integration-test phase. Alas in order for our integration tests to
>>>> work
>>>> we need to connect to an external 3rd party service that itself needs
>>>> to
>>>> be
>>>> running before the jboss server tries to boot. 
>>>>
>>>> The following is the pom snippet I was hoping to use to perform this
>>>> task. 
>>>>
>>>>
>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>> <executions>
>>>>        <execution>
>>>>               <phase>process-test-resources</phase>
>>>>               	<goals>
>>>> 	           <goal>run</goal>
>>>>               	</goals>
>>>>               	<configuration>
>>>>               <tasks>
>>>>                     <exec executable="startExternalService.cmd"/>
>>>>               </tasks>
>>>>               </configuration>								
>>>>        </execution>
>>>> </executions>
>>>>
>>>>
>>>> Alas the maven process seems to hang until the external process is
>>>> exited
>>>> while I need it to continue running in the background to allow my jboss
>>>> server to come up.
>>>> I had orginally encountered the same problem with the Jboss server as
>>>> obviously you need to kick it off and then once it's up you would run
>>>> the
>>>> tests. Again the mvn process would just hang there. then I stumbled
>>>> across
>>>> cargo and they've a very handy element called <wait>false</wait> that
>>>> can
>>>> be
>>>> introduced to the cargo plugin's configuration element and it prevents
>>>> maven
>>>> from blocking on the jboss server. This allows you to kick off other
>>>> executions but only within the same phase it seems. 
>>>>
>>>> I think this problem may be associated solely with windows as I believe
>>>> though I haven't tested it that the ampersand '&' in linux will
>>>> instruct
>>>> the
>>>> process to run in the background allowing the maven process to
>>>> continue. 
>>>>
>>>> Basically if anyone has managed to leave a process running on a windows
>>>> machine detached from the maven process and continue with the build I'd
>>>> love
>>>> the heads up on how to. 
>>>>
>>>> Thanks,
>>>> Mark.
>>>>   
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>     
>>
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/maven-antrun-plugin-exec-task.-Windows.-Can%27t-leave-process-running-in-the-background.-tp27261952p27273649.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-antrun-plugin exec task. Windows. Can't leave process running in the background.

Posted by Siegfried Goeschl <si...@it20one.at>.
Hi Mark,

no idea what a ledgebox is but is is probably not very offending ... ;-)

Cheers,

Siegfried Goeschl

gags_78 wrote:
> Hi Siegfried,
>
>           You sir, are what we commonly refer to in Ireland as a Legend!!! A
> total ledgebox!! I cannot thank you enough. That has made my day and works a
> charm. I thank you kindly.
>
> Regards,
> Mark.
>
>
>
> Siegfried Goeschl wrote:
>   
>> Hi Mark,
>>
>> have you tried the "spawn"attribute of the Ant <exec> task?
>>
>> Cheers,
>>
>> Siegfried Goeschl
>>
>> gags_78 wrote:
>>     
>>> Hi folks,
>>>
>>>          I'm trying to introduce automated integration testing for our
>>> application. I successfully integrated the cargo plugin to get our
>>> product
>>> deployed and started within a fresh jboss installation as part of
>>> pre-integration-test phase. Alas in order for our integration tests to
>>> work
>>> we need to connect to an external 3rd party service that itself needs to
>>> be
>>> running before the jboss server tries to boot. 
>>>
>>> The following is the pom snippet I was hoping to use to perform this
>>> task. 
>>>
>>>
>>> <artifactId>maven-antrun-plugin</artifactId>
>>> <executions>
>>>        <execution>
>>>               <phase>process-test-resources</phase>
>>>               	<goals>
>>> 	           <goal>run</goal>
>>>               	</goals>
>>>               	<configuration>
>>>               <tasks>
>>>                     <exec executable="startExternalService.cmd"/>
>>>               </tasks>
>>>               </configuration>								
>>>        </execution>
>>> </executions>
>>>
>>>
>>> Alas the maven process seems to hang until the external process is exited
>>> while I need it to continue running in the background to allow my jboss
>>> server to come up.
>>> I had orginally encountered the same problem with the Jboss server as
>>> obviously you need to kick it off and then once it's up you would run the
>>> tests. Again the mvn process would just hang there. then I stumbled
>>> across
>>> cargo and they've a very handy element called <wait>false</wait> that can
>>> be
>>> introduced to the cargo plugin's configuration element and it prevents
>>> maven
>>> from blocking on the jboss server. This allows you to kick off other
>>> executions but only within the same phase it seems. 
>>>
>>> I think this problem may be associated solely with windows as I believe
>>> though I haven't tested it that the ampersand '&' in linux will instruct
>>> the
>>> process to run in the background allowing the maven process to continue. 
>>>
>>> Basically if anyone has managed to leave a process running on a windows
>>> machine detached from the maven process and continue with the build I'd
>>> love
>>> the heads up on how to. 
>>>
>>> Thanks,
>>> Mark.
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>     
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-antrun-plugin exec task. Windows. Can't leave process running in the background.

Posted by gags_78 <ma...@gmail.com>.
Hi Siegfried,

          You sir, are what we commonly refer to in Ireland as a Legend!!! A
total ledgebox!! I cannot thank you enough. That has made my day and works a
charm. I thank you kindly.

Regards,
Mark.



Siegfried Goeschl wrote:
> 
> Hi Mark,
> 
> have you tried the "spawn"attribute of the Ant <exec> task?
> 
> Cheers,
> 
> Siegfried Goeschl
> 
> gags_78 wrote:
>> Hi folks,
>>
>>          I'm trying to introduce automated integration testing for our
>> application. I successfully integrated the cargo plugin to get our
>> product
>> deployed and started within a fresh jboss installation as part of
>> pre-integration-test phase. Alas in order for our integration tests to
>> work
>> we need to connect to an external 3rd party service that itself needs to
>> be
>> running before the jboss server tries to boot. 
>>
>> The following is the pom snippet I was hoping to use to perform this
>> task. 
>>
>>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <executions>
>>        <execution>
>>               <phase>process-test-resources</phase>
>>               	<goals>
>> 	           <goal>run</goal>
>>               	</goals>
>>               	<configuration>
>>               <tasks>
>>                     <exec executable="startExternalService.cmd"/>
>>               </tasks>
>>               </configuration>								
>>        </execution>
>> </executions>
>>
>>
>> Alas the maven process seems to hang until the external process is exited
>> while I need it to continue running in the background to allow my jboss
>> server to come up.
>> I had orginally encountered the same problem with the Jboss server as
>> obviously you need to kick it off and then once it's up you would run the
>> tests. Again the mvn process would just hang there. then I stumbled
>> across
>> cargo and they've a very handy element called <wait>false</wait> that can
>> be
>> introduced to the cargo plugin's configuration element and it prevents
>> maven
>> from blocking on the jboss server. This allows you to kick off other
>> executions but only within the same phase it seems. 
>>
>> I think this problem may be associated solely with windows as I believe
>> though I haven't tested it that the ampersand '&' in linux will instruct
>> the
>> process to run in the background allowing the maven process to continue. 
>>
>> Basically if anyone has managed to leave a process running on a windows
>> machine detached from the maven process and continue with the build I'd
>> love
>> the heads up on how to. 
>>
>> Thanks,
>> Mark.
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/maven-antrun-plugin-exec-task.-Windows.-Can%27t-leave-process-running-in-the-background.-tp27261952p27270901.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-antrun-plugin exec task. Windows. Can't leave process running in the background.

Posted by Siegfried Goeschl <si...@it20one.at>.
Hi Mark,

have you tried the "spawn"attribute of the Ant <exec> task?

Cheers,

Siegfried Goeschl

gags_78 wrote:
> Hi folks,
>
>          I'm trying to introduce automated integration testing for our
> application. I successfully integrated the cargo plugin to get our product
> deployed and started within a fresh jboss installation as part of
> pre-integration-test phase. Alas in order for our integration tests to work
> we need to connect to an external 3rd party service that itself needs to be
> running before the jboss server tries to boot. 
>
> The following is the pom snippet I was hoping to use to perform this task. 
>
>
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
>        <execution>
>               <phase>process-test-resources</phase>
>               	<goals>
> 	           <goal>run</goal>
>               	</goals>
>               	<configuration>
>               <tasks>
>                     <exec executable="startExternalService.cmd"/>
>               </tasks>
>               </configuration>								
>        </execution>
> </executions>
>
>
> Alas the maven process seems to hang until the external process is exited
> while I need it to continue running in the background to allow my jboss
> server to come up.
> I had orginally encountered the same problem with the Jboss server as
> obviously you need to kick it off and then once it's up you would run the
> tests. Again the mvn process would just hang there. then I stumbled across
> cargo and they've a very handy element called <wait>false</wait> that can be
> introduced to the cargo plugin's configuration element and it prevents maven
> from blocking on the jboss server. This allows you to kick off other
> executions but only within the same phase it seems. 
>
> I think this problem may be associated solely with windows as I believe
> though I haven't tested it that the ampersand '&' in linux will instruct the
> process to run in the background allowing the maven process to continue. 
>
> Basically if anyone has managed to leave a process running on a windows
> machine detached from the maven process and continue with the build I'd love
> the heads up on how to. 
>
> Thanks,
> Mark.
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org