alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

ActiveMQ example source code file (pom.xml)

This example ActiveMQ source code file (pom.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - ActiveMQ tags/keywords

activemq, activemq, apache, asf, client, client, dependencies, foundation, license, license, see, these, these, you

The ActiveMQ pom.xml source code

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
  
  http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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

  <parent>
    <groupId>org.apache.activemq
    <artifactId>activemq-parent
    <version>5.5.0
  </parent>

  <artifactId>activemq-core
  <packaging>bundle
  <name>ActiveMQ :: Core
  <description>The ActiveMQ Message Broker and Client implementations

  <properties>
    <activemq.osgi.import.pkg>
      com.thoughtworks.xstream*;resolution:=optional,
      javax.xml.stream*;resolution:=optional,
      org.codehaus.jettison*;resolution:=optional,
      org.apache.activeio*;resolution:=optional,
      org.apache.camel*;resolution:=optional,
      org.apache.commons.pool*;resolution:=optional,
      org.apache.commons.net*;resolution:=optional,
      org.apache.derby*;resolution:=optional,
      org.apache.tools.ant*;resolution:=optional,
      org.apache.maven*;resolution:=optional,
      org.apache.xbean*;resolution:=optional,
      '=org.apache.xbean.spring.context.v2;resolution:=optional',
      org.apache.xpath*;resolution:=optional,
      org.codehaus.jam*;resolution:=optional,
      org.springframework*;resolution:=optional,
      org.springframework.beans.factory.xml;resolution:=optional,
      org.w3c.dom.traversal*;resolution:=optional,
      *
    </activemq.osgi.import.pkg>
    <activemq.osgi.export>
      org.apache.activemq*;version=${project.version};-noimport:=true,
      '=META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema';-noimport:=true
    </activemq.osgi.export>
    <activemq.osgi.dynamic.import>*
    <surefire.argLine>-Xmx512M
  </properties>

  <dependencies>

    <!-- =============================== -->
    <!-- Required Dependencies -->
    <!-- =============================== -->
    <dependency>
      <groupId>org.slf4j
      <artifactId>slf4j-api
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs
      <artifactId>geronimo-jms_1.1_spec
    </dependency>

    <dependency>
      <groupId>${project.groupId}
      <artifactId>activeio-core
      <optional>false
    </dependency>

    <dependency>
      <groupId>org.apache.activemq
      <artifactId>kahadb
      <optional>false
    </dependency>
    <dependency>
      <groupId>org.apache.activemq.protobuf
      <artifactId>activemq-protobuf
      <optional>false
    </dependency>

    <!-- =============================== -->
    <!-- Optional Dependencies           -->
    <!-- =============================== -->

    <dependency>
      <groupId>org.osgi
      <artifactId>org.osgi.core
    </dependency>
    

    <dependency>
      <groupId>org.apache.activemq
      <artifactId>activemq-jaas
      <optional>true
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs
      <artifactId>geronimo-jta_1.0.1B_spec
      <optional>true
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs
      <artifactId>geronimo-j2ee-management_1.1_spec
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs
      <artifactId>geronimo-annotation_1.0_spec
      <optional>true
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs
      <artifactId>geronimo-jacc_1.1_spec
      <optional>true
    </dependency>
    <dependency>
      <groupId>commons-pool
      <artifactId>commons-pool
      <optional>true
    </dependency>
    <dependency>
      <groupId>com.thoughtworks.xstream
      <artifactId>xstream
      <optional>true
    </dependency>        
    <dependency>
        <groupId>org.codehaus.jettison
        <artifactId>jettison
        <optional>true
    </dependency>

    <!-- for XML parsing -->
    <dependency>
      <groupId>org.apache.xbean
      <artifactId>xbean-spring
      <optional>true
    </dependency>
    <dependency>
      <groupId>stax
      <artifactId>stax-api
      <optional>true
    </dependency>

    <dependency>
      <groupId>org.springframework
      <artifactId>spring-context
    </dependency>    

    <dependency>
      <groupId>org.apache.derby
      <artifactId>derby
      <optional>true
    </dependency>
    <dependency>
      <groupId>xalan
      <artifactId>xalan
      <optional>true
    </dependency>
    <dependency>
      <groupId>commons-net
      <artifactId>commons-net
    </dependency>

    <!-- not really a dependency at all - just added optionally to get the generator working -->
    <dependency>
      <groupId>org.apache.activemq
      <artifactId>activemq-openwire-generator
      <optional>true
    </dependency>

    <!-- =============================== -->
    <!-- Testing Dependencies            -->
    <!-- =============================== -->
    <dependency>
      <groupId>junit
      <artifactId>junit
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.hamcrest
      <artifactId>hamcrest-all
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.slf4j
      <artifactId>slf4j-log4j12
      <scope>test
    </dependency>
    <dependency>
      <groupId>log4j
      <artifactId>log4j
      <scope>test
    </dependency>
    <dependency>
      <groupId>${project.groupId}
      <artifactId>activeio-core
      <optional>false
      <type>test-jar
    </dependency>
    <dependency>
      <groupId>org.springframework
      <artifactId>spring-jms
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.springframework
      <artifactId>spring-test
      <scope>test
    </dependency>
    
    <dependency>
      <groupId>commons-io
      <artifactId>commons-io
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.apache.activemq
      <artifactId>activemq-jmdns_1.0
      <optional>true
    </dependency>
    
    <dependency>
      <groupId>org.jasypt
      <artifactId>jasypt
    </dependency>

    <!-- database testing -->
    <dependency>
      <groupId>commons-collections
      <artifactId>commons-collections
      <scope>test
    </dependency>
    <dependency>
      <groupId>commons-primitives
      <artifactId>commons-primitives
      <scope>test
    </dependency>
    <dependency>
      <groupId>axion
      <artifactId>axion
      <scope>test
    </dependency>
    <dependency>
      <groupId>regexp
      <artifactId>regexp
      <scope>test
    </dependency>

    <!--  LDAP tests -->
    <dependency>
      <groupId>org.apache.directory.server
      <artifactId>apacheds-core
      <version>1.0.0
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.jmock
      <artifactId>jmock-junit4
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.jmock
      <artifactId>jmock-legacy
      <scope>test
    </dependency>
    <dependency>
      <groupId>org.apache.ftpserver
      <artifactId>ftpserver-core
      <version>${ftpserver-version}
      <scope>test
    </dependency>


  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins
        <artifactId>maven-javadoc-plugin
        <configuration>
          <links>
            <link>http://java.sun.com/j2se/1.5.0/docs/api/
            <link>http://java.sun.com/j2ee/1.4/docs/api/
            <link>http://jakarta.apache.org/commons/logging/apidocs/
            <link>http://junit.sourceforge.net/javadoc/
          </links>
          <stylesheetfile>${basedir}/../etc/css/stylesheet.css
          <linksource>true
          <maxmemory>256m
          <source>1.5
          <groups>
            <group>
              <title>JMS Client
              <packages>org.apache.activemq:org.apache.activemq.command
            </group>
            <group>
              <title>JMS Client support classes for working with BLOBs and JNDI
              <packages>org.apache.activemq.blob:org.apache.activemq.jndi
            </group>
            <group>
              <title>Enterprise Integration Pattern support via Camel
              <packages>org.apache.activemq.camel:org.apache.activemq.camel.*
            </group>
            <group>
              <title>Spring support
              <packages>org.apache.activemq.spring:org.apache.activemq.xbean:org.apache.activemq.pool
            </group>
            <group>
              <title>JMS Client Implementation classes
              <packages>org.apache.activemq.filter:org.apache.activemq.management:org.apache.activemq.selector:org.apache.activemq.thread
            </group>
            <group>
              <title>Broker implementation
              <packages>org.apache.activemq.advisory:org.apache.activemq.broker:org.apache.activemq.broker.*:org.apache.activemq.state:org.apache.activemq.security:org.apache.activemq.transaction
            </group>
            <group>
              <title>Broker Persistent Store
              <packages>org.apache.activemq.store:org.apache.activemq.store.*
            </group>
            <group>
              <title>Kaha fast file based storage
              <packages>org.apache.activemq.kaha:org.apache.activemq.kaha.*
            </group>
            <group>
              <title>Transports
              <packages>org.apache.activemq.transport:org.apache.activemq.transport.*
            </group>
            <group>
              <title>Memory handling
              <packages>org.apache.activemq.memory:org.apache.activemq.memory.*
            </group>
            <group>
              <title>Networks of Brokers
              <packages>org.apache.activemq.network:org.apache.activemq.network.*
            </group>
            <group>
              <title>OpenWire support
              <packages>org.apache.activemq.openwire:org.apache.activemq.openwire.*
            </group>
            <group>
              <title>Utility classes
              <packages>org.apache.activemq.util:org.apache.activemq.wireformat:org.apache.activemq.proxy
            </group>
          </groups>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo
        <artifactId>findbugs-maven-plugin
        <version>1.1
        <configuration>
          <threshold>Normal
          <effort>Default
        </configuration>
      </plugin>
    </plugins>
    </reporting>
    
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix
        <artifactId>maven-bundle-plugin
        <configuration>
          <instructions>
            <Bundle-Activator>org.apache.activemq.util.osgi.Activator
          </instructions>
        </configuration>
      </plugin>
      
      <!-- Configure which tests are included/excuded -->
      <plugin>
        <artifactId>maven-surefire-plugin
        <configuration>
          <forkMode>pertest
          <childDelegation>false
          <useFile>true
          <argLine>${surefire.argLine}

           <systemProperties>
            <property>
              <name>org.apache.activemq.default.directory.prefix
              <value>target/
            </property>
            <!-- Uncomment the following if you want to configure custom logging (using src/test/resources/log4j.properties)
                 while running mvn:test
                 Note: if you want to see log messages on the console window remove
                       "redirectTestOutputToFile" from the parent pom
            -->
            <!--           
            <property>
              <name>log4j.configuration
              <value>file:target/test-classes/log4j.properties
            </property>
            -->
          </systemProperties>

          <includes>
            <include>**/*Test.*
          </includes>
          <excludes>
            <exclude>**/perf/SimpleDurableTopicTest.*
            <!-- These tests run too slow to execute as part of the unit tests -->
            <exclude>**/TransactionNotStartedErrorTest.*
            <exclude>**/DefaultStoreBrokerTest.*
            <exclude>**/TcpTransportBrokerTest.*
            <exclude>**/activeio/*

            <!-- These are performance tests so take too long to run -->
            <exclude>**/perf/*
            
            <!-- These are load tests so take too long to run -->
            <exclude>**/load/*

            <!-- http://jira.activemq.org/jira/browse/AMQ-626 -->
            <exclude>**/MultipleTestsWithSpringFactoryBeanTest.*
            <exclude>**/MultipleTestsWithXBeanFactoryBeanTest.*
            <exclude>**/MultipleTestsWithSpringXBeanFactoryBeanTest.*

            <!--  these seem to fail only in m2 -->
            <!---->

            <!-- Kaha in flux - removing tests -->
            <exclude>**/KahaDBStoreXARecoveryBrokerTest.*
            <exclude>**/KahaDBStoreRecoveryBrokerTest.*

            <!-- Multicast and UDP based tests fail on GBuild -->
            <exclude>**/PeerTransportTest.*
            <exclude>**/MulticastTransportTest.*
            <exclude>**/MulticastNetworkTest.*
            <exclude>**/UnreliableUdpTransportTest.*
            <exclude>**/SslTransportBrokerTest.*

            <!-- this one is a little flaky and can fail on some platforms randomly -->
            <exclude>**/QuickJournalRecoveryBrokerTest.*
            <exclude>**/QuickJournalXARecoveryBrokerTest.*
            <exclude>**/RendezvousDiscoverTransportTest.*
            <exclude>**/MissingDataFileTest.*

            <!-- UDP related tests someimes fail on some platforms -->
            <exclude>**/UdpTransportTest.*
            <exclude>**/UdpTransportUsingServerTest.*
            <exclude>**/UdpSendReceiveWithTwoConnectionsTest.*
            <exclude>**/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.*

            <!-- m2 tests failing since move from assembly  -->
            <exclude>**/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.*
            <exclude>**/TwoBrokerQueueClientsReconnectTest.*
            <exclude>**/QueueConsumerCloseAndReconnectTest.*
            <exclude>**/TwoBrokerMulticastQueueTest.*

            <!-- TODO move to optional module...  -->
            <exclude>**/TwoBrokerTopicSendReceiveUsingHttpTest.*

            <!-- This test only works on machines which have ssh propertly configured -->
            <exclude>**/SSHTunnelNetworkReconnectTest.*

            <!--  see  http://issues.apache.org/activemq/browse/AMQ-826 -->
            <!--  have not yet figured out the way to configure ApacheDS via Spring  -->
            <exclude>**/LDAPAuthorizationMapTest.*

            <!-- http://issues.apache.org/activemq/browse/AMQ-1027 -->
            <exclude>**/FailoverConsumerTest.*

            <!-- The NIO implemenation is not working properly on OS X.. -->
            <exclude>**/nio/**
            <exclude>**/NioQueueSubscriptionTest.*/

             <!-- A test used for memory profiling only. -->
             <exclude>**/NetworkConnectionsCleanedupTest.*/**
             
             <exclude>**/NetworkConnectionsCleanedupTest.*/**
             
             <!-- used just to test potential memory leaks manually -->
             <exclude>**/JDBCTestMemory.*
             
             <exclude>**/amq1490/*
             <exclude>**/archive/*
             <exclude>**/NetworkFailoverTest.*/**
             
             <exclude>**/vm/VMTransportBrokerTest.*
             <exclude>**/broker/MarshallingBrokerTest.*
             

            <exclude>**/AMQDeadlockTest3.*

            <!-- https://issues.apache.org/activemq/browse/AMQ-2050 -->
            <exclude>**/ProxyConnectorTest.*

            <!-- breaks hudson: disable till we get a chance to give it the time that it needs - http://hudson.zones.apache.org/hudson/job/ActiveMQ/org.apache.activemq$activemq-core/199/testReport/org.apache.activemq.network/BrokerNetworkWithStuckMessagesTest/testBrokerNetworkWithStuckMessages/ -->
            <exclude>**/BrokerNetworkWithStuckMessagesTest.*
            
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.activemq.protobuf
        <artifactId>activemq-protobuf
         <executions>
          <execution>
            <goals>
              <goal>compile
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins
        <artifactId>maven-clean-plugin
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}/activemq-data
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins
        <artifactId>maven-antrun-plugin

        <executions>
	        <execution>
            <id>package
            <phase>package
            <configuration>
              <tasks>
                <echo>Deleting unwanted resources from the test-jar
                <delete dir="${project.build.directory}/test-classes" verbose="true">
									<include name="*.*" />
								</delete>
              </tasks>
            </configuration>
            <goals>
              <goal>run
            </goals>
          </execution>
  
          <execution>
            <id>site
            <phase>site
            <configuration>
              <tasks>
                <echo>Running the XSDDoc task
                <taskdef name="xsddoc" classname="net.sf.xframe.xsddoc.Task" />
                <mkdir dir="${basedir}/target/site/xsddoc" />
                <xsddoc file="${basedir}/target/classes/activemq.xsd" out="${basedir}/target/site/xsddoc" doctitle="Apache ActiveMQ XML Schema Reference" header="<a href='http://activemq.apache.org/'>Apache ActiveMQ</a>" footer="Copyright 2007 (c) the <a href='http://www.apache.org/'>Apache Software Foundation</a>" verbose="false" />
                <!--
                        css="${basedir}/../etc/css/stylesheet.css"
                -->
              </tasks>
            </configuration>
            <goals>
              <goal>run
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>xsddoc
            <artifactId>maven-xsddoc-plugin
            <version>1.0
          </dependency>
        </dependencies>
      </plugin>

      <!-- generate the attached tests jar -->
      <plugin>
        <artifactId>maven-jar-plugin
        <executions>
          <execution>
            <goals>
              <goal>test-jar
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo
        <artifactId>javacc-maven-plugin
        <version>2.0
        <executions>
          <execution>
            <phase>generate-sources
            <configuration>
              <sourceDirectory>${basedir}/src/main/grammar
              <outputDirectory>${basedir}/target/generated-javacc
              <packageName>org.apache.activemq.selector
            </configuration>
            <goals>
              <goal>javacc
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.xbean
        <artifactId>maven-xbean-plugin
        <version>${xbean-version}
        <executions>
          <execution>
          <phase>process-classes
            <configuration>
              <namespace>http://activemq.apache.org/schema/core
              <schema>${basedir}/target/classes/activemq.xsd
              <outputDir>${basedir}/target/classes
              <generateSpringSchemasFile>false
              <excludedClasses>org.apache.activemq.broker.jmx.AnnotatedMBean,org.apache.activemq.broker.jmx.DestinationViewMBean
            </configuration>
            <goals>
              <goal>mapping
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo
        <artifactId>cobertura-maven-plugin
        <version>2.0
        <configuration>
	  <check>
            <branchRate>50
            <lineRate>50
            <haltOnFailure>true
            <totalBranchRate>50
            <totalLineRate>50
          </check>
        </configuration>
      </plugin>      
    </plugins>
  </build>

  <profiles>
    
    <profile>
      <id>openwire-generate
      <dependencies>
        <dependency>
          <groupId>org.apache.activemq
          <artifactId>activemq-openwire-generator
          <version>${activemq-version}
          <optional>true
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins
            <artifactId>maven-antrun-plugin
            <executions>
              <execution>
                <id>default
                <phase>generate-sources
                <configuration>
                  <tasks>
                    <echo>Running OpenWire Generator
                    <taskdef name="generate" classname="org.apache.activemq.openwire.tool.JavaGeneratorTask" classpathref="maven.compile.classpath" />
                    <generate version="7" basedir="${basedir}" />
                  </tasks>
                </configuration>
                <goals>
                  <goal>run
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>jdk1.4
      <activation>
        <jdk>1.4
      </activation>
      <dependencies>
        <dependency>
          <groupId>activesoap
          <artifactId>jaxp-api
        </dependency>
      </dependencies>
    </profile>
    
  </profiles>

</project>

Other ActiveMQ examples (source code examples)

Here is a short list of links related to this ActiveMQ pom.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.