QPID-7609: [System Tests/Integration Tests] Refactor the POMs to avoid the addition of the JMS 1.1 dependency if testing the Qpid JMS Client

This works against both the released Qpid JMS Client (which has transitive dependency on JMS 1.1) and the current SNAPSHOT (which has transitive dependency on JMS 2.0).

Also:

* factored out a foreign message test from JMSPropertiesTest, removing the compile time JMS 1.1 dependency by using a proxy
diff --git a/joramtests/pom.xml b/joramtests/pom.xml
index 9398e59..6a75b91 100644
--- a/joramtests/pom.xml
+++ b/joramtests/pom.xml
@@ -60,12 +60,6 @@
             <version>${slf4j-version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-            <version>${geronimo-jms-1-1-version}</version>
-            <scope>compile</scope>
-        </dependency>
-        <dependency>
             <groupId>org.fusesource.joram-jms-tests</groupId>
             <artifactId>joram-jms-tests</artifactId>
             <version>${joram-jms-tests-version}</version>
@@ -170,6 +164,22 @@
     </build>
     <profiles>
         <profile>
+            <id>addJms11IfNecessary</id>
+            <activation>
+                <property>
+                    <name>joramtests</name>
+                    <value>!qpid-jms-client</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jms_1.1_spec</artifactId>
+                    <version>${geronimo-jms-1-1-version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
             <id>joram</id>
             <activation>
                 <property>
diff --git a/perftests/pom.xml b/perftests/pom.xml
index 3872214..37b1e5b 100644
--- a/perftests/pom.xml
+++ b/perftests/pom.xml
@@ -67,16 +67,6 @@
   </properties>
 
   <dependencies>
-    <!-- client deps -->
-
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-      <version>${geronimo-jms-1-1-version}</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <!-- other deps -->
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <artifactId>logback-classic</artifactId>
@@ -206,6 +196,22 @@
   </build>
   <profiles>
     <profile>
+      <id>addJms11IfNecessary</id>
+      <activation>
+        <property>
+          <name>perftests</name>
+          <value>!qpid-jms-client</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-jms_1.1_spec</artifactId>
+          <version>${geronimo-jms-1-1-version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
       <id>perftests</id>
       <activation>
         <property>
diff --git a/perftests/src/main/assembly/qpid-perftests-bin.xml b/perftests/src/main/assembly/qpid-perftests-bin.xml
index 2391982..13ba1a7 100644
--- a/perftests/src/main/assembly/qpid-perftests-bin.xml
+++ b/perftests/src/main/assembly/qpid-perftests-bin.xml
@@ -57,7 +57,6 @@
       <useProjectArtifact>false</useProjectArtifact>
       <scope>provided</scope>
       <includes>
-        <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
         <include>org.apache.derby:derby</include>
       </includes>
     </dependencySet>
diff --git a/qpid-perftests-systests/pom.xml b/qpid-perftests-systests/pom.xml
index 7455ebf..acf7208 100644
--- a/qpid-perftests-systests/pom.xml
+++ b/qpid-perftests-systests/pom.xml
@@ -53,13 +53,6 @@
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-      <version>${geronimo-jms-1-1-version}</version>
-      <scope>provided</scope>
-    </dependency>
-
     <!-- other deps -->
 
     <dependency>
diff --git a/qpid-systests-parent/pom.xml b/qpid-systests-parent/pom.xml
index ed6729c..17d779b 100644
--- a/qpid-systests-parent/pom.xml
+++ b/qpid-systests-parent/pom.xml
@@ -234,4 +234,39 @@
     </plugins>
   </reporting>
 
+  <profiles>
+    <profile>
+      <id>java-mms.1-0</id>
+      <activation>
+        <property>
+          <name>profile</name>
+          <value>java-mms.1-0</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.qpid</groupId>
+          <artifactId>qpid-jms-client</artifactId>
+          <version>${qpid-jms-client-version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+    <profile>
+      <!-- The 0-x client does not have a dependency on the JMS 1.1 spec.  Add it now. -->
+      <id>addJms11IfNecessary</id>
+      <activation>
+        <property>
+          <name>profile</name>
+          <value>!java-mms.1-0</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.geronimo.specs</groupId>
+          <artifactId>geronimo-jms_1.1_spec</artifactId>
+          <version>${geronimo-jms-1-1-version}</version>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
 </project>
diff --git a/systests/pom.xml b/systests/pom.xml
index 6b9c376..7b479c6 100644
--- a/systests/pom.xml
+++ b/systests/pom.xml
@@ -37,26 +37,13 @@
       <version>${project.version}</version>
     </dependency>
 
-    <!-- client deps -->
+    <!-- Many systests have a compile/runtime dependency on qpid-client -->
     <dependency>
       <groupId>org.apache.qpid</groupId>
       <artifactId>qpid-client</artifactId>
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.apache.geronimo.specs</groupId>
-      <artifactId>geronimo-jms_1.1_spec</artifactId>
-      <version>${geronimo-jms-1-1-version}</version>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.qpid</groupId>
-      <artifactId>qpid-jms-client</artifactId>
-      <version>${qpid-jms-client-version}</version>
-    </dependency>
-
     <!-- jca deps -->
     <dependency>
       <groupId>org.apache.qpid</groupId>
diff --git a/systests/src/test/java/org/apache/qpid/client/message/NonQpidObjectMessage.java b/systests/src/test/java/org/apache/qpid/client/message/NonQpidObjectMessage.java
deleted file mode 100644
index 3aabfa1..0000000
--- a/systests/src/test/java/org/apache/qpid/client/message/NonQpidObjectMessage.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- *
- * 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.
- *
- */
-package org.apache.qpid.client.message;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Session;
-import java.io.Serializable;
-import java.util.Enumeration;
-
-public class NonQpidObjectMessage implements ObjectMessage {
-
-    private ObjectMessage _realMessage;
-    private String _contentString;
-
-    /**
-     * Allows us to construct a JMS message which
-     * does not inherit from the Qpid message superclasses
-     * and expand our unit testing of MessageConverter et al
-     * @param session
-     */
-    public NonQpidObjectMessage(Session session) throws JMSException
-    {
-        _realMessage = session.createObjectMessage();
-    }
-
-    public String getJMSMessageID() throws JMSException {
-        return _realMessage.getJMSMessageID();
-    }
-
-    public void setJMSMessageID(String string) throws JMSException {
-        _realMessage.setJMSMessageID(string);
-    }
-
-    public long getJMSTimestamp() throws JMSException {
-        return _realMessage.getJMSTimestamp();
-    }
-
-    public void setJMSTimestamp(long l) throws JMSException {
-        _realMessage.setJMSTimestamp(l);
-    }
-
-    public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
-        return _realMessage.getJMSCorrelationIDAsBytes();
-    }
-
-    public void setJMSCorrelationIDAsBytes(byte[] bytes) throws JMSException {
-        _realMessage.setJMSCorrelationIDAsBytes(bytes);
-    }
-
-    public void setJMSCorrelationID(String string) throws JMSException {
-        _realMessage.setJMSCorrelationID(string);
-    }
-
-    public String getJMSCorrelationID() throws JMSException {
-        return _realMessage.getJMSCorrelationID();
-    }
-
-    public Destination getJMSReplyTo() throws JMSException {
-        return _realMessage.getJMSReplyTo();
-    }
-
-    public void setJMSReplyTo(Destination destination) throws JMSException {
-        _realMessage.setJMSReplyTo(destination);
-    }
-
-    public Destination getJMSDestination() throws JMSException {
-        return _realMessage.getJMSDestination();
-    }
-
-    public void setJMSDestination(Destination destination) throws JMSException {
-        _realMessage.setJMSDestination(destination);
-    }
-
-    public int getJMSDeliveryMode() throws JMSException {
-        return _realMessage.getJMSDeliveryMode();
-    }
-
-    public void setJMSDeliveryMode(int i) throws JMSException {
-        _realMessage.setJMSDeliveryMode(i);
-    }
-
-    public boolean getJMSRedelivered() throws JMSException {
-        return _realMessage.getJMSRedelivered();
-    }
-
-    public void setJMSRedelivered(boolean b) throws JMSException {
-        _realMessage.setJMSRedelivered(b);
-    }
-
-    public String getJMSType() throws JMSException {
-        return _realMessage.getJMSType();
-    }
-
-    public void setJMSType(String string) throws JMSException {
-        _realMessage.setJMSType(string);
-    }
-
-    public long getJMSExpiration() throws JMSException {
-        return _realMessage.getJMSExpiration();
-    }
-
-    public void setJMSExpiration(long l) throws JMSException {
-        _realMessage.setJMSExpiration(l);
-    }
-
-    public int getJMSPriority() throws JMSException {
-        return _realMessage.getJMSPriority();
-    }
-
-    public void setJMSPriority(int i) throws JMSException {
-        _realMessage.setJMSPriority(i);
-    }
-
-    public void clearProperties() throws JMSException {
-        _realMessage.clearProperties();
-    }
-
-    public boolean propertyExists(String string) throws JMSException {
-        return _realMessage.propertyExists(string);
-    }
-
-    public boolean getBooleanProperty(String string) throws JMSException {
-        return _realMessage.getBooleanProperty(string);
-    }
-
-    public byte getByteProperty(String string) throws JMSException {
-        return _realMessage.getByteProperty(string);
-    }
-
-    public short getShortProperty(String string) throws JMSException {
-        return _realMessage.getShortProperty(string);
-    }
-
-    public int getIntProperty(String string) throws JMSException {
-        return _realMessage.getIntProperty(string);
-    }
-
-    public long getLongProperty(String string) throws JMSException {
-        return _realMessage.getLongProperty(string);
-    }
-
-    public float getFloatProperty(String string) throws JMSException {
-        return _realMessage.getFloatProperty(string);
-    }
-
-    public double getDoubleProperty(String string) throws JMSException {
-        return _realMessage.getDoubleProperty(string);
-    }
-
-    public String getStringProperty(String string) throws JMSException {
-        return _realMessage.getStringProperty(string);
-    }
-
-    public Object getObjectProperty(String string) throws JMSException {
-        return _realMessage.getObjectProperty(string);
-    }
-
-    public Enumeration getPropertyNames() throws JMSException {
-        return _realMessage.getPropertyNames();
-    }
-
-    public void setBooleanProperty(String string, boolean b) throws JMSException {
-        _realMessage.setBooleanProperty(string,b);
-    }
-
-    public void setByteProperty(String string, byte b) throws JMSException {
-        _realMessage.setByteProperty(string,b);
-    }
-
-    public void setShortProperty(String string, short i) throws JMSException {
-        _realMessage.setShortProperty(string,i);
-    }
-
-    public void setIntProperty(String string, int i) throws JMSException {
-        _realMessage.setIntProperty(string,i);
-    }
-
-    public void setLongProperty(String string, long l) throws JMSException {
-        _realMessage.setLongProperty(string,l);
-    }
-
-    public void setFloatProperty(String string, float v) throws JMSException {
-        _realMessage.setFloatProperty(string,v);
-    }
-
-    public void setDoubleProperty(String string, double v) throws JMSException {
-        _realMessage.setDoubleProperty(string,v);
-    }
-
-    public void setStringProperty(String string, String string1) throws JMSException {
-        _realMessage.setStringProperty(string,string1);
-    }
-
-    public void setObjectProperty(String string, Object object) throws JMSException {
-        _realMessage.setObjectProperty(string,object);
-    }
-
-    public void acknowledge() throws JMSException {
-        _realMessage.acknowledge();
-    }
-
-    public void clearBody() throws JMSException {
-        _realMessage.clearBody();
-    }
-
-    public void setObject(Serializable serializable) throws JMSException {
-        if (serializable instanceof String)
-        {
-            _contentString = (String)serializable;
-        }
-    }
-
-    public Serializable getObject() throws JMSException {
-        return _contentString;      }
-}
diff --git a/systests/src/test/java/org/apache/qpid/test/unit/message/ForeignMessageTest.java b/systests/src/test/java/org/apache/qpid/test/unit/message/ForeignMessageTest.java
new file mode 100644
index 0000000..3d46315
--- /dev/null
+++ b/systests/src/test/java/org/apache/qpid/test/unit/message/ForeignMessageTest.java
@@ -0,0 +1,118 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.qpid.test.unit.message;
+
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.Session;
+
+import com.google.common.reflect.AbstractInvocationHandler;
+import com.google.common.reflect.Reflection;
+
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
+
+
+public class ForeignMessageTest extends QpidBrokerTestCase
+{
+
+    private static final String JMS_CORR_ID = "QPIDID_01";
+    private static final String JMS_TYPE = "test.jms.type";
+    private static final String GROUP = "group";
+    private static final int JMSX_GROUP_SEQ_VALUE = 1;
+
+    /**
+     * Tests that a non-Qpid JMS message (in this case a proxy) can be sent and received.
+     */
+    public void testSendForeignMessage() throws Exception
+    {
+        final Connection con = getConnection();
+        final Session session = con.createSession(true, Session.SESSION_TRANSACTED);
+        Queue queue = createTestQueue(session);
+        Destination replyTo = createTestQueue(session, "my.replyto");
+
+        MessageConsumer consumer = session.createConsumer(queue);
+
+        final MessageProducer producer = session.createProducer(queue);
+
+        // create a 'foreign' JMS message using proxy
+        ObjectMessage sentMsg = getForeignObjectMessage(session.createObjectMessage());
+
+        sentMsg.setJMSCorrelationID(JMS_CORR_ID);
+        sentMsg.setJMSType(JMS_TYPE);
+        sentMsg.setStringProperty("JMSXGroupID", GROUP);
+        sentMsg.setIntProperty("JMSXGroupSeq", JMSX_GROUP_SEQ_VALUE);
+        sentMsg.setJMSReplyTo(replyTo);
+        Serializable payload = UUID.randomUUID();
+        sentMsg.setObject(payload);
+
+        // send it
+        producer.send(sentMsg);
+        String sentMessageId = sentMsg.getJMSMessageID();
+        session.commit();
+
+        con.start();
+
+        // get message and check JMS properties
+        ObjectMessage rm = (ObjectMessage) consumer.receive(getReceiveTimeout());
+        assertNotNull(rm);
+
+        assertEquals("JMS Correlation ID mismatch", sentMsg.getJMSCorrelationID(), rm.getJMSCorrelationID());
+        assertEquals("JMS Type mismatch", sentMsg.getJMSType(), rm.getJMSType());
+        assertEquals("JMS Reply To mismatch", sentMsg.getJMSReplyTo(), rm.getJMSReplyTo());
+        assertEquals("JMSMessageID mismatch:", sentMessageId, rm.getJMSMessageID());
+        assertEquals("JMS Default priority should be 4",Message.DEFAULT_PRIORITY,rm.getJMSPriority());
+
+        //Validate that the JMSX values are correct
+        assertEquals("JMSXGroupID is not as expected:", GROUP, rm.getStringProperty("JMSXGroupID"));
+        assertEquals("JMSXGroupSeq is not as expected:", JMSX_GROUP_SEQ_VALUE, rm.getIntProperty("JMSXGroupSeq"));
+
+        assertEquals("Message payload not as expected", payload, rm.getObject());
+
+        session.commit();
+    }
+
+    private ObjectMessage getForeignObjectMessage(final ObjectMessage message)
+    {
+        return Reflection.newProxy(ObjectMessage.class, new AbstractInvocationHandler()
+        {
+            @Override
+            protected Object handleInvocation(final Object proxy, final Method method, final Object[] args)
+                    throws Throwable
+            {
+                return method.invoke(message, args);
+            }
+        });
+    }
+}
diff --git a/systests/src/test/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java b/systests/src/test/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
index 769d99b..1e37711 100644
--- a/systests/src/test/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
+++ b/systests/src/test/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
@@ -35,26 +35,14 @@
 import javax.jms.Session;
 import javax.jms.Topic;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.qpid.client.message.NonQpidObjectMessage;
 import org.apache.qpid.client.message.QpidMessageProperties;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 
-/**
- * @author Apache Software Foundation
- */
 public class JMSPropertiesTest extends QpidBrokerTestCase
 {
-
-    private static final Logger _logger = LoggerFactory.getLogger(JMSPropertiesTest.class);
-
-    public static final String JMS_CORR_ID = "QPIDID_01";
-    public static final int JMS_DELIV_MODE = 1;
-    public static final String JMS_TYPE = "test.jms.type";
-    protected static final String NULL_OBJECT_PROPERTY = "NullObject";
-    protected static final String INVALID_OBJECT_PROPERTY = "InvalidObject";
+    private static final String JMS_CORR_ID = "QPIDID_01";
+    private static final String JMS_TYPE = "test.jms.type";
+    private static final String INVALID_OBJECT_PROPERTY = "InvalidObject";
 
     public void testJMSProperties() throws Exception
     {
@@ -65,15 +53,15 @@
         MessageConsumer consumer = consumerSession.createConsumer(queue);
 
         Connection con2 = getConnection();
-        Session producerSession = con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-        MessageProducer producer = producerSession.createProducer(queue);
-        Destination JMS_REPLY_TO = createTestQueue(producerSession, "my.replyto");
+        final Session producerSession = con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+        final MessageProducer producer = producerSession.createProducer(queue);
+        Destination replyTo = createTestQueue(producerSession, "my.replyto");
+
         // create a test message to send
-        ObjectMessage sentMsg = new NonQpidObjectMessage(producerSession);
+        ObjectMessage sentMsg = producerSession.createObjectMessage();
         sentMsg.setJMSCorrelationID(JMS_CORR_ID);
-        sentMsg.setJMSDeliveryMode(JMS_DELIV_MODE);
         sentMsg.setJMSType(JMS_TYPE);
-        sentMsg.setJMSReplyTo(JMS_REPLY_TO);
+        sentMsg.setJMSReplyTo(replyTo);
 
         String JMSXGroupID_VALUE = "group";
         sentMsg.setStringProperty("JMSXGroupID", JMSXGroupID_VALUE);
@@ -84,7 +72,7 @@
         try
         {
             sentMsg.setObjectProperty(INVALID_OBJECT_PROPERTY, new Exception());
-            fail("Non primitive Object Property value set");
+            fail("Non serializable Object Property value set");
         }
         catch (MessageFormatException mfe)
         {
@@ -100,17 +88,15 @@
         con.start();
 
         // get message and check JMS properties
-        ObjectMessage rm = (ObjectMessage) consumer.receive(2000);
+        ObjectMessage rm = (ObjectMessage) consumer.receive(getReceiveTimeout());
         assertNotNull(rm);
 
         assertEquals("JMS Correlation ID mismatch", sentMsg.getJMSCorrelationID(), rm.getJMSCorrelationID());
-        // TODO: Commented out as always overwritten by send delivery mode value - prob should not set in conversion
-        // assertEquals("JMS Delivery Mode mismatch",sentMsg.getJMSDeliveryMode(),rm.getJMSDeliveryMode());
         assertEquals("JMS Type mismatch", sentMsg.getJMSType(), rm.getJMSType());
         assertEquals("JMS Reply To mismatch", sentMsg.getJMSReplyTo(), rm.getJMSReplyTo());
         assertTrue("JMSMessageID Does not start ID:", rm.getJMSMessageID().startsWith("ID:"));
-        assertEquals("JMS Default priority should be 4",Message.DEFAULT_PRIORITY,rm.getJMSPriority());   
-        
+        assertEquals("JMS Default priority should be 4",Message.DEFAULT_PRIORITY,rm.getJMSPriority());
+
         //Validate that the JMSX values are correct
         assertEquals("JMSXGroupID is not as expected:", JMSXGroupID_VALUE, rm.getStringProperty("JMSXGroupID"));
         assertEquals("JMSXGroupSeq is not as expected:", JMSXGroupSeq_VALUE, rm.getIntProperty("JMSXGroupSeq"));
@@ -134,8 +120,8 @@
         assertTrue("JMSXGroupID not available.",JMSXGroupID_Available);
         assertTrue("JMSXGroupSeq not available.",JMSXGroupSeq_Available);
 
-        // Check that the NULL_OBJECT_PROPERTY was not set or transmitted.
-        assertFalse(NULL_OBJECT_PROPERTY + " was not set.", rm.propertyExists(NULL_OBJECT_PROPERTY));
+        // Check that the INVALID_OBJECT_PROPERTY was not set or transmitted.
+        assertFalse(INVALID_OBJECT_PROPERTY + " was not set.", rm.propertyExists(INVALID_OBJECT_PROPERTY));
 
         con.close();
     }
@@ -158,7 +144,7 @@
         m.setObjectProperty(QpidMessageProperties.AMQP_0_10_APP_ID, "my-app-id");
         prod.send(m);
 
-        Message msg = consumer.receive(1000);
+        Message msg = consumer.receive(getReceiveTimeout());
         assertNotNull(msg);
 
     	Enumeration<String> enu = msg.getPropertyNames();
diff --git a/tck/pom.xml b/tck/pom.xml
index 5be8fac..0354f0f 100644
--- a/tck/pom.xml
+++ b/tck/pom.xml
@@ -62,11 +62,6 @@
             <version>${slf4j-version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jms_1.1_spec</artifactId>
-            <version>${geronimo-jms-1-1-version}</version>
-        </dependency>
-        <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
             <version>${httpclient-version}</version>
@@ -284,7 +279,22 @@
             </build>
 
         </profile>
-
+        <profile>
+            <id>addJms11IfNecessary</id>
+            <activation>
+                <property>
+                    <name>tck</name>
+                    <value>!qpid-jms-client</value>
+                </property>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.geronimo.specs</groupId>
+                    <artifactId>geronimo-jms_1.1_spec</artifactId>
+                    <version>${geronimo-jms-1-1-version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
         <profile>
             <!-- Profile used to execute TCK against the Qpid JMS client -->
             <id>qpid-jms-client</id>