You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Tim Morrow 2 <ti...@gmail.com> on 2007/04/04 20:51:43 UTC
Forking activemq with maven plugin
Hi,
I'm in the process of automating my container tests, part of which includes
spinning up an ActiveMQ instance for the duration of running the tests.
I found the maven plugin and it works great for starting ActiveMQ, the
problem being that it blocks the Maven build process. I'd like to be able
to fork it, continue with the maven build, then kill it when I'm done.
Similar problems occur with other plugins, for example Jetty. However, I
can run Jetty using Cargo, which has an option to fork.
I don't _think_ Maven provides a way of doing this. Is there a way to
coerce ActiveMQ, when run from the Maven plugin, to fork?
There are plenty of other solutions, of course.
* I could simply run ActiveMQ from maven as a java class, but I can't seem
to find if there is a main class with AMQ 4.x
* I could create a Spring config that boots an embedded broker and write a
small Main class to startup Spring (does anyone know if there is such a
class in Spring already)
Is there a link to the source code of the maven plugin? I'd like to see the
source of BrokerMojo, but I can't seem to find it anywhere.
Thanks in advance,
Tim
--
View this message in context: http://www.nabble.com/Forking-activemq-with-maven-plugin-tf3527573s2354.html#a9843254
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Forking activemq with maven plugin
Posted by Tim Morrow 2 <ti...@gmail.com>.
Done.
https://issues.apache.org/activemq/browse/AMQ-1222
BTW, There didn't seem to be a component for the Maven plugin.
Tim
James.Strachan wrote:
>
>> Would adding a "fork" option to the plugin make sense?
>
> Definitely! We could spin up ActiveMQ in a background thread, let
> maven continue processing then let it die when maven quits. This would
> be extremely useful for integration testing!
>
> Fancy submitting a patch for this?
> http://activemq.apache.org/contributing.html
>
--
View this message in context: http://www.nabble.com/Forking-activemq-with-maven-plugin-tf3527573s2354.html#a9872423
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Forking activemq with maven plugin
Posted by James Strachan <ja...@gmail.com>.
On 4/4/07, Tim Morrow 2 <ti...@gmail.com> wrote:
>
> So trying to run ActiveMQ without the plugin got annoying since I'd have to
> define all the dependencies myself.
>
> FWIW I did find the subversion repo:
> https://svn.apache.org/repos/asf/activemq/trunk/activemq-tooling/maven-activemq-plugin
> and added myself a "fork" option that when set to true spawns AMQ in a
> thread.
> Now my container tests are self-contained and run to completion.
>
> Would adding a "fork" option to the plugin make sense?
Definitely! We could spin up ActiveMQ in a background thread, let
maven continue processing then let it die when maven quits. This would
be extremely useful for integration testing!
Fancy submitting a patch for this?
http://activemq.apache.org/contributing.html
--
James
-------
http://radio.weblogs.com/0112098/
Re: Forking activemq with maven plugin
Posted by Tim Morrow 2 <ti...@gmail.com>.
So trying to run ActiveMQ without the plugin got annoying since I'd have to
define all the dependencies myself.
FWIW I did find the subversion repo:
https://svn.apache.org/repos/asf/activemq/trunk/activemq-tooling/maven-activemq-plugin
and added myself a "fork" option that when set to true spawns AMQ in a
thread.
Now my container tests are self-contained and run to completion.
Would adding a "fork" option to the plugin make sense?
Thanks,
Tim
Tim Morrow 2 wrote:
>
> Hi,
>
> I'm in the process of automating my container tests, part of which
> includes spinning up an ActiveMQ instance for the duration of running the
> tests.
>
> I found the maven plugin and it works great for starting ActiveMQ, the
> problem being that it blocks the Maven build process. I'd like to be able
> to fork it, continue with the maven build, then kill it when I'm done.
> Similar problems occur with other plugins, for example Jetty. However, I
> can run Jetty using Cargo, which has an option to fork.
>
> I don't _think_ Maven provides a way of doing this. Is there a way to
> coerce ActiveMQ, when run from the Maven plugin, to fork?
>
> There are plenty of other solutions, of course.
> * I could simply run ActiveMQ from maven as a java class, but I can't seem
> to find if there is a main class with AMQ 4.x
> * I could create a Spring config that boots an embedded broker and write a
> small Main class to startup Spring (does anyone know if there is such a
> class in Spring already)
>
> Is there a link to the source code of the maven plugin? I'd like to see
> the source of BrokerMojo, but I can't seem to find it anywhere.
>
> Thanks in advance,
>
> Tim
>
>
--
View this message in context: http://www.nabble.com/Forking-activemq-with-maven-plugin-tf3527573s2354.html#a9846213
Sent from the ActiveMQ - User mailing list archive at Nabble.com.