ARTEMIS-1546 Changing version check from 1.4.0 to latest 1.5.5

This commit is contained in:
Clebert Suconic 2017-12-20 12:27:59 -05:00
parent 17c2c8fc56
commit bccf18fa6f
9 changed files with 69 additions and 21 deletions

View File

@ -29,6 +29,7 @@ public class PacketImpl implements Packet {
// Constants -------------------------------------------------------------------------
// 2.0.0
public static final int ADDRESSING_CHANGE_VERSION = 129;
public static final SimpleString OLD_QUEUE_PREFIX = new SimpleString("jms.queue.");

View File

@ -64,7 +64,7 @@ import org.apache.activemq.artemis.utils.uri.BeanSupport;
*/
public class ActiveMQConnectionFactory extends JNDIStorable implements ConnectionFactoryOptions, Externalizable, ConnectionFactory, XAConnectionFactory, AutoCloseable {
private static final long serialVersionUID = -7554006056207377105L;
private static final long serialVersionUID = 6730844785641767519L;
private ServerLocator serverLocator;

View File

@ -63,6 +63,11 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
@Parameter
private File targetFolder;
private MavenProject project;
@Parameter
private boolean optional = false;
@Override
protected boolean isIgnore() {
return false;
@ -81,7 +86,7 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
}
}
getLog().info("Local " + localRepository);
MavenProject project = (MavenProject) getPluginContext().get("project");
project = (MavenProject) getPluginContext().get("project");
Map properties = getPluginContext();
@ -105,8 +110,7 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
}
String classPathGenerated = buffer.toString();
project.getProperties().setProperty(variableName, classPathGenerated);
getLog().info("dependency-scan setting: " + variableName + "=" + classPathGenerated);
setVariable(classPathGenerated);
}
if (targetFolder != null) {
@ -117,7 +121,11 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
}
} catch (Throwable e) {
getLog().error(e);
throw new MojoFailureException(e.getMessage());
if (optional) {
setVariable("");
} else {
throw new MojoFailureException(e.getMessage());
}
} finally {
for (RemoteRepository repository : listRepo) {
remoteRepos.remove(repository);
@ -127,4 +135,11 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin {
}
private void setVariable(String classPathGenerated) {
if (variableName != null) {
project.getProperties().setProperty(variableName, classPathGenerated);
getLog().info("dependency-scan setting: " + variableName + "=" + classPathGenerated);
}
}
}

View File

@ -365,6 +365,27 @@
<variableName>ARTEMIS-140</variableName>
</configuration>
</execution>
<execution>
<id>155-check</id>
<phase>compile</phase>
<goals>
<goal>dependency-scan</goal>
</goals>
<configuration>
<libListWithDeps>
<arg>org.apache.activemq:artemis-jms-server:1.5.5</arg>
<arg>org.apache.activemq:artemis-jms-client:1.5.5</arg>
<arg>org.apache.activemq:artemis-hornetq-protocol:1.5.5</arg>
<arg>org.apache.activemq:artemis-amqp-protocol:1.5.5</arg>
<arg>org.apache.activemq:artemis-hornetq-protocol:1.5.5</arg>
<arg>org.codehaus.groovy:groovy-all:${groovy.version}</arg>
</libListWithDeps>
<libList>
<arg>org.apache.activemq.tests:compatibility-tests:${project.version}</arg>
</libList>
<variableName>ARTEMIS-155</variableName>
</configuration>
</execution>
<execution>
<id>hornetq-235</id>
<phase>compile</phase>
@ -372,13 +393,14 @@
<goal>dependency-scan</goal>
</goals>
<configuration>
<optional>true</optional>
<extraRepositories>
<!-- some of the dependencies are not on maven central,
and the artemis maven plugin has the capability of using this extra repo -->
<arg>https://repository.jboss.org/nexus/content/groups/public</arg>
</extraRepositories>
<libListWithDeps>
<arg>org.hornetq:hornetq-jms-server:2.4.7.Final</arg>
<arg>org.hornetq:hornetq-jms-server:2.3.5.Final</arg>
<arg>org.codehaus.groovy:groovy-all:${groovy.version}</arg>
</libListWithDeps>
<libList>
@ -394,6 +416,7 @@
<goal>dependency-scan</goal>
</goals>
<configuration>
<optional>true</optional>
<extraRepositories>
<!-- some of the dependencies are not on maven central,
and the artemis maven plugin has the capability of using this extra repo -->
@ -425,6 +448,10 @@
<name>ARTEMIS-240</name>
<value>${ARTEMIS-240}</value>
</property>
<property>
<name>ARTEMIS-155</name>
<value>${ARTEMIS-155}</value>
</property>
<property>
<name>ARTEMIS-140</name>
<value>${ARTEMIS-140}</value>

View File

@ -24,6 +24,7 @@ import groovy.lang.GroovyShell;
public class GroovyRun {
public static final String SNAPSHOT = "ARTEMIS-SNAPSHOT";
public static final String ONE_FIVE = "ARTEMIS-155";
public static final String ONE_FOUR = "ARTEMIS-140";
public static final String TWO_FOUR = "ARTEMIS-240";
public static final String HORNETQ_235 = "HORNETQ-235";

View File

@ -38,7 +38,7 @@ configuration.addAcceptorConfiguration("artemis", "tcp://0.0.0.0:61616");
configuration.setSecurityEnabled(false);
configuration.setPersistenceEnabled(false);
try {
if (!type.equals("ARTEMIS-140")) {
if (!type.startsWith("ARTEMIS-1")) {
configuration.addAddressesSetting("#", new AddressSettings().setAutoCreateAddresses(true));
}
} catch (Throwable e) {
@ -54,7 +54,7 @@ server.setJmsConfiguration(jmsConfiguration);
server.start();
// uncomment this next statements to validate https://issues.apache.org/jira/browse/ARTEMIS-1561
if (producer.toString().equals("ARTEMIS-140") && type.equals("ARTEMIS-SNAPSHOT") ||
if (producer.toString().startsWith("ARTEMIS-1") && type.equals("ARTEMIS-SNAPSHOT") ||
producer.toString().startsWith("HORNETQ")) {
server.getJMSServerManager().createQueue(true, "queue", null, true);
}

View File

@ -23,6 +23,7 @@ import org.junit.runners.Parameterized;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_235;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_247;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR;
@ -55,13 +56,14 @@ public class MeshTest extends VersionedBaseTest {
// during development sometimes is useful to comment out the combinations
// and add the ones you are interested.. example:
*/
// combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{ONE_FOUR, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE});
// combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE});
combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FOUR, TWO_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FOUR, TWO_FOUR, SNAPSHOT, HORNETQ_235}));
combinations.addAll(combinatory(new Object[]{ONE_FOUR}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT}));
combinations.addAll(combinatory(new Object[]{HORNETQ_235}, new Object[]{ONE_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FOUR, SNAPSHOT, HORNETQ_235}));
combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, TWO_FOUR, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FIVE, TWO_FOUR, SNAPSHOT, HORNETQ_235}));
combinations.addAll(combinatory(new Object[]{ONE_FIVE}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}));
combinations.addAll(combinatory(new Object[]{HORNETQ_235}, new Object[]{ONE_FIVE, SNAPSHOT, HORNETQ_235}, new Object[]{ONE_FIVE, SNAPSHOT, HORNETQ_235}));
combinations.addAll(combinatory(new Object[]{HORNETQ_247}, new Object[]{SNAPSHOT, HORNETQ_247}, new Object[]{SNAPSHOT, HORNETQ_247}));
combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, ONE_FOUR});
return combinations;
}

View File

@ -21,9 +21,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.HORNETQ_247;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.TWO_FOUR;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE;
/**
* To run this test on the IDE and debug it, run the compatibility-tests through a command line once:
@ -53,14 +54,15 @@ public class SendAckTest extends VersionedBaseTest {
// during development sometimes is useful to comment out the combinations
// and add the ones you are interested.. example:
*/
// combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{ONE_FOUR, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE});
// combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE});
combinations.addAll(combinatory(new Object[]{SNAPSHOT, ONE_FOUR}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT}));
combinations.addAll(combinatory(new Object[]{SNAPSHOT, ONE_FIVE}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}));
// not every combination on two four would make sense.. as there's a compatibility issue between 2.4 and 1.4 when crossing consumers and producers
combinations.add(new Object[]{TWO_FOUR, SNAPSHOT, SNAPSHOT});
combinations.add(new Object[]{SNAPSHOT, TWO_FOUR, TWO_FOUR});
combinations.add(new Object[]{HORNETQ_247, SNAPSHOT, SNAPSHOT});
return combinations;
}

View File

@ -22,7 +22,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FOUR;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.ONE_FIVE;
import static org.apache.activemq.artemis.tests.compatibility.GroovyRun.SNAPSHOT;
/**
@ -53,10 +53,10 @@ public class SerializationTest extends VersionedBaseTest {
// during development sometimes is useful to comment out the combinations
// and add the ones you are interested.. example:
*/
// combinations.add(new Object[]{SNAPSHOT, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{ONE_FOUR, ONE_FOUR, ONE_FOUR});
// combinations.add(new Object[]{SNAPSHOT, ONE_FIVE, ONE_FIVE});
// combinations.add(new Object[]{ONE_FIVE, ONE_FIVE, ONE_FIVE});
combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT}, new Object[]{ONE_FOUR, SNAPSHOT}));
combinations.addAll(combinatory(new Object[]{SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}, new Object[]{ONE_FIVE, SNAPSHOT}));
return combinations;
}