Note that there are some explanatory texts on larger screens.

plurals
  1. POactivemq-maven-plugin ignore files in classpath?
    primarykey
    data
    text
    <p>I have been trying to get activemq-maven-plugin to run activemq with configuration in classpath of the bundle. However, I don't have much luck. It seems that the activemq-maven-plugin just ignore resources (resources/main/conf/activemq.properties) the local bundle. I checked the jar and target/classes and they are built into the right local. I am able to get plugin to run (mvn activemq:run) if I take out the PropertyPlaceholderConfigurer bean in the activemq.xml Did I do anything wrong?</p> <p>Here is the output</p> <pre><code>[INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to start ActiveMQ Broker Embedded error: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [conf/activemq.properties] cannot be opened because it does not exist [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Mon May 03 15:56:05 PDT 2010 [INFO] Final Memory: 11M/79M [INFO] ------------------------------------------------------------------------ </code></pre> <p>Here is the pom.xml, which I specific the plugin to look up activemq.xml via file, that works. </p> <p>However, in the activemq.xml </p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;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"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;oc.test&lt;/groupId&gt; &lt;artifactId&gt;mq&lt;/artifactId&gt; &lt;version&gt;0.1&lt;/version&gt; &lt;name&gt;mq&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;3.8.1&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.activemq.tooling&lt;/groupId&gt; &lt;artifactId&gt;maven-activemq-plugin&lt;/artifactId&gt; &lt;version&gt;5.3.1&lt;/version&gt; &lt;configuration&gt; &lt;configUri&gt;xbean:file:src/main/resources/conf/activemq.xml&lt;/configUri&gt; &lt;fork&gt;false&lt;/fork&gt; &lt;systemProperties&gt; &lt;property&gt; &lt;name&gt;javax.net.ssl.keyStorePassword&lt;/name&gt; &lt;value&gt;password&lt;/value&gt; &lt;/property&gt; &lt;property&gt; &lt;name&gt;org.apache.activemq.default.directory.prefix&lt;/name&gt; &lt;value&gt;./target/&lt;/value&gt; &lt;/property&gt; &lt;/systemProperties&gt; &lt;/configuration&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework&lt;/groupId&gt; &lt;artifactId&gt;spring&lt;/artifactId&gt; &lt;version&gt;2.5.5&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>Here is the src/main/resources/conf/activemq.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd "&gt; &lt;bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt; &lt;property name="locations"&gt; &lt;value&gt;classpath:conf/activemq.properties&lt;/value&gt; &lt;/property&gt; &lt;property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE"/&gt; &lt;/bean&gt; &lt;broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="./data"&gt; &lt;!-- The transport connectors ActiveMQ will listen to --&gt; &lt;transportConnectors&gt; &lt;transportConnector name="openwire" uri="tcp://localhost:61616"/&gt; &lt;/transportConnectors&gt; &lt;/broker&gt; &lt;/beans&gt; </code></pre> <p>Here is the src/main/resources/conf/activemq.properties</p> <pre><code>activemq.port=61616 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload