You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mjustin <mi...@gmx.net> on 2010/08/14 14:48:02 UTC

How can I create a "compact" distribution of ActiveMQ

Hello,

I wouldl like to bundle a minimal version of ActiveMQ (w. Stomp support)
with an application. Maybe the easiest way would be using a Maven POM
artifact to retrieve only the required files, and then package my (Java) app
with the Maven assembly plugin?

Cheers,
Michael Justin

-----
Michael Justin
SCJP, SCJA
betasoft - Software for Delphi™ and for the Java™ platform
http://www.mikejustin.com - http://www.betabeans.de
-- 
View this message in context: http://old.nabble.com/How-can-I-create-a-%22compact%22-distribution-of-ActiveMQ-tp29436711p29436711.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I create a "compact" distribution of ActiveMQ

Posted by mjustin <mi...@gmx.net>.
Hi Dejan,

Many thanks for the answer!

Here is my working example pom.xml, which uses the current 5.5 snapshot:



> 
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>     <groupId>de.betabeans</groupId>
>     <artifactId>embedded</artifactId>
>     <packaging>jar</packaging>
>     <version>1.0-SNAPSHOT</version>
>     <name>embedded</name>
>     <url>http://maven.apache.org</url>
>   
>     <repositories>
>         <repository>
>             <id>apache.snapshots</id>
>             <name>Apache Development Snapshot Repository</name>
>            
> <url>https://repository.apache.org/content/repositories/snapshots</url>
>             <releases>
>                 <enabled>false</enabled>
>             </releases>
>         </repository>
>     </repositories>
> 
>     <dependencies>
>         <dependency>
>             <groupId>org.apache.activemq</groupId>
>             <artifactId>activemq-all</artifactId>
>             <version>5.5-SNAPSHOT</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>com.thoughtworks.xstream</groupId>
>             <artifactId>xstream</artifactId>
>             <version>1.3.1</version>
>             <type>jar</type>
>         </dependency>
>     </dependencies>
> 
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>exec-maven-plugin</artifactId>
>                 <version>1.1</version>
>                 <executions>
>                     <execution>
>                         <goals>
>                             <goal>java</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <mainClass>de.betabeans.embedded.App</mainClass>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
> 
> </project>
> 
And the Java source:



> 
> package de.betabeans.embedded;
> 
> import org.apache.activemq.broker.BrokerService;
> 
> public class App {
> 
>     public static void main(String[] args) {
>         try {
>             BrokerService broker = new BrokerService();
>             broker.setBrokerName("habari");
>             broker.setUseShutdownHook(false);
>             broker.addConnector("stomp://0.0.0.0:61613");
>             broker.start();
> 
>             System.out.println("press any key to stop the broker");
>             System.in.read();
>         } catch (Exception ex) {
>             ex.printStackTrace();
>         }
> 
>     }
> }
> 



Dejan Bosanac wrote:
> 
> maven and pom would do the trick. You basically only need activemq-all
> jar or you can get separate jars.
> 


-----
Michael Justin
SCJP, SCJA
habarisoft - Software for Delphi and for the Java™ platform
http://www.habarisoft.net - http://www.betabeans.de
-- 
View this message in context: http://old.nabble.com/How-can-I-create-a-%22compact%22-distribution-of-ActiveMQ-tp29436711p29543953.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How can I create a "compact" distribution of ActiveMQ

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi Michael,

maven and pom would do the trick. You basically only need activemq-all
jar or you can get separate jars. A bit outdated list can be found
here (will update it soon)

http://activemq.apache.org/initial-configuration.html#InitialConfiguration-RequiredJARs

but basically, you'll need activemq-core, kahadb (if you're using it),
commons-logging, and geronimo j2ee specs

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Sat, Aug 14, 2010 at 2:48 PM, mjustin <mi...@gmx.net> wrote:
>
> Hello,
>
> I wouldl like to bundle a minimal version of ActiveMQ (w. Stomp support)
> with an application. Maybe the easiest way would be using a Maven POM
> artifact to retrieve only the required files, and then package my (Java) app
> with the Maven assembly plugin?
>
> Cheers,
> Michael Justin
>
> -----
> Michael Justin
> SCJP, SCJA
> betasoft - Software for Delphi™ and for the Java™ platform
> http://www.mikejustin.com - http://www.betabeans.de
> --
> View this message in context: http://old.nabble.com/How-can-I-create-a-%22compact%22-distribution-of-ActiveMQ-tp29436711p29436711.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>