You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Jefferson K. French" <je...@frenches.org> on 2003/07/24 09:32:46 UTC

Starting a server in the background

In trying to learn Maven, I'm converting from a current Ant build. At
one point I need to run a server in the background, but I can't figure
out how to do it. Our Ant test target has lines roughly like this:

  <parallel>
    <antcall target="start_test_server"/>
    <sequential>
      <sleep seconds="10"/>
      <antcall target="run_server_tests"/>
      <antcall target="stop_test_server"/>
    </sequential>
  </parallel>

I was thinking the start and stop server targets would be test:test
preGoal and postGoals, respectively, and the run server target (which
uses JUnit) would be handled by test:test.

My problem is the test server must run in the background so the
test:test preGoal can finish, but I don't know how do make it so. I've
looked at the cactus plugin, but that seems to be geared towards
appservers like Tomcat. Ours is a SOAP server using GLUE.

Could anyone point me in the right direction? Thanks.

    Jeff

-- 
mailto:jeff@frenches.org



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


Re: Starting a server in the background - SOLVED

Posted by Ben Walding <be...@walding.com>.
Yep. Looks good.

Thanks,

Ben

Jefferson K. French wrote:

>OK, I added it. It's my first wiki entry, so hopefully I did it
>correctly.
>
>On Fri, 25 Jul 2003, at 16:47:24 [GMT +1000] Ben Walding wrote:
>
>  
>
>>Feel free to add to this to the wiki
>>http://wiki.codehaus.org/maven/MailingListSupport
>>    
>>
>
>  
>
>>Jefferson K. French wrote:
>>    
>>
>
>  
>
>>>I figured out how to do this, and want to pass along what I learned in
>>>case anyone else has the same question.
>>>
>>>According to several Ant resources I read, you cannot yet do this with
>>>Ant tags, although it is frequently requested. Luckily Maven uses
>>>Jelly, where it is easy. You can simply do this:
>>> <preGoal name="test:test">
>>>   <j:thread>
>>>     <attainGoal name="start_test_server"/>
>>>   </j:thread>
>>>   <sleep seconds="10"/>
>>> </preGoal>
>>>
>>>inside the test:test preGoal.
>>>
>>>      
>>>
>
>  
>



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


Re: Starting a server in the background - SOLVED

Posted by "Jefferson K. French" <je...@frenches.org>.
OK, I added it. It's my first wiki entry, so hopefully I did it
correctly.

On Fri, 25 Jul 2003, at 16:47:24 [GMT +1000] Ben Walding wrote:

> Feel free to add to this to the wiki
> http://wiki.codehaus.org/maven/MailingListSupport

> Jefferson K. French wrote:

>>I figured out how to do this, and want to pass along what I learned in
>>case anyone else has the same question.
>>
>>According to several Ant resources I read, you cannot yet do this with
>>Ant tags, although it is frequently requested. Luckily Maven uses
>>Jelly, where it is easy. You can simply do this:
>>  <preGoal name="test:test">
>>    <j:thread>
>>      <attainGoal name="start_test_server"/>
>>    </j:thread>
>>    <sleep seconds="10"/>
>>  </preGoal>
>>
>>inside the test:test preGoal.
>>

-- 
mailto:jeff@frenches.org



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


Re: Starting a server in the background - SOLVED

Posted by Ben Walding <be...@walding.com>.
Feel free to add to this to the wiki
http://wiki.codehaus.org/maven/MailingListSupport

Jefferson K. French wrote:

>I figured out how to do this, and want to pass along what I learned in
>case anyone else has the same question.
>
>According to several Ant resources I read, you cannot yet do this with
>Ant tags, although it is frequently requested. Luckily Maven uses
>Jelly, where it is easy. You can simply do this:
>  <preGoal name="test:test">
>    <j:thread>
>      <attainGoal name="start_test_server"/>
>    </j:thread>
>    <sleep seconds="10"/>
>  </preGoal>
>
>inside the test:test preGoal.
>
>On Thu, 24 Jul 2003, at 02:32:46 [GMT -0500] Jefferson K. French
>wrote:
>
>  
>
>>In trying to learn Maven, I'm converting from a current Ant build. At
>>one point I need to run a server in the background, but I can't figure
>>out how to do it. Our Ant test target has lines roughly like this:
>>    
>>
>
>  
>
>>  <parallel>
>>    <antcall target="start_test_server"/>
>>    <sequential>
>>      <sleep seconds="10"/>
>>      <antcall target="run_server_tests"/>
>>      <antcall target="stop_test_server"/>
>>    </sequential>
>>  </parallel>
>>    
>>
>
>  
>
>>I was thinking the start and stop server targets would be test:test
>>preGoal and postGoals, respectively, and the run server target (which
>>uses JUnit) would be handled by test:test.
>>    
>>
>
>  
>
>>My problem is the test server must run in the background so the
>>test:test preGoal can finish, but I don't know how do make it so. I've
>>looked at the cactus plugin, but that seems to be geared towards
>>appservers like Tomcat. Ours is a SOAP server using GLUE.
>>    
>>
>
>  
>
>>Could anyone point me in the right direction? Thanks.
>>    
>>
>
>  
>
>>    Jeff
>>    
>>
>
>
>  
>



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


Re: Starting a server in the background - SOLVED

Posted by "Jefferson K. French" <je...@frenches.org>.
I figured out how to do this, and want to pass along what I learned in
case anyone else has the same question.

According to several Ant resources I read, you cannot yet do this with
Ant tags, although it is frequently requested. Luckily Maven uses
Jelly, where it is easy. You can simply do this:
  <preGoal name="test:test">
    <j:thread>
      <attainGoal name="start_test_server"/>
    </j:thread>
    <sleep seconds="10"/>
  </preGoal>

inside the test:test preGoal.

On Thu, 24 Jul 2003, at 02:32:46 [GMT -0500] Jefferson K. French
wrote:

> In trying to learn Maven, I'm converting from a current Ant build. At
> one point I need to run a server in the background, but I can't figure
> out how to do it. Our Ant test target has lines roughly like this:

>   <parallel>
>     <antcall target="start_test_server"/>
>     <sequential>
>       <sleep seconds="10"/>
>       <antcall target="run_server_tests"/>
>       <antcall target="stop_test_server"/>
>     </sequential>
>   </parallel>

> I was thinking the start and stop server targets would be test:test
> preGoal and postGoals, respectively, and the run server target (which
> uses JUnit) would be handled by test:test.

> My problem is the test server must run in the background so the
> test:test preGoal can finish, but I don't know how do make it so. I've
> looked at the cactus plugin, but that seems to be geared towards
> appservers like Tomcat. Ours is a SOAP server using GLUE.

> Could anyone point me in the right direction? Thanks.

>     Jeff


-- 
mailto:jeff@frenches.org



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