removing version suffix and fix release

Also removing the word Netty from the starting acceptor and its version
I don't think it's necessary to mention Netty at the console or its version.
That's internal implementation detail at this point
This commit is contained in:
Clebert Suconic 2015-03-03 18:46:05 -05:00
parent b52d1cd8e0
commit a43be0ce07
10 changed files with 18 additions and 69 deletions

View File

@ -35,8 +35,6 @@ public interface Version
int getMicroVersion(); int getMicroVersion();
String getVersionSuffix();
int getIncrementingVersion(); int getIncrementingVersion();
boolean isCompatible(int v); boolean isCompatible(int v);

View File

@ -40,8 +40,6 @@ public class VersionImpl implements Version, Serializable
private final int incrementingVersion; private final int incrementingVersion;
private final String versionSuffix;
private final int[] compatibleVersionList; private final int[] compatibleVersionList;
// Constructors -------------------------------------------------- // Constructors --------------------------------------------------
@ -51,7 +49,6 @@ public class VersionImpl implements Version, Serializable
final int minorVersion, final int minorVersion,
final int microVersion, final int microVersion,
final int incrementingVersion, final int incrementingVersion,
final String versionSuffix,
final int[] compatibleVersionList) final int[] compatibleVersionList)
{ {
this.versionName = versionName; this.versionName = versionName;
@ -64,8 +61,6 @@ public class VersionImpl implements Version, Serializable
this.incrementingVersion = incrementingVersion; this.incrementingVersion = incrementingVersion;
this.versionSuffix = versionSuffix;
this.compatibleVersionList = Arrays.copyOf(compatibleVersionList, compatibleVersionList.length); this.compatibleVersionList = Arrays.copyOf(compatibleVersionList, compatibleVersionList.length);
} }
@ -73,17 +68,7 @@ public class VersionImpl implements Version, Serializable
public String getFullVersion() public String getFullVersion()
{ {
return majorVersion + "." + return versionName;
minorVersion +
"." +
microVersion +
"." +
versionSuffix +
" (" +
versionName +
", " +
incrementingVersion +
")";
} }
public String getVersionName() public String getVersionName()
@ -106,11 +91,6 @@ public class VersionImpl implements Version, Serializable
return microVersion; return microVersion;
} }
public String getVersionSuffix()
{
return versionSuffix;
}
public int getIncrementingVersion() public int getIncrementingVersion()
{ {
return incrementingVersion; return incrementingVersion;
@ -139,7 +119,6 @@ public class VersionImpl implements Version, Serializable
result = prime * result + microVersion; result = prime * result + microVersion;
result = prime * result + minorVersion; result = prime * result + minorVersion;
result = prime * result + ((versionName == null) ? 0 : versionName.hashCode()); result = prime * result + ((versionName == null) ? 0 : versionName.hashCode());
result = prime * result + ((versionSuffix == null) ? 0 : versionSuffix.hashCode());
return result; return result;
} }
@ -190,17 +169,6 @@ public class VersionImpl implements Version, Serializable
{ {
return false; return false;
} }
if (versionSuffix == null)
{
if (other.versionSuffix != null)
{
return false;
}
}
else if (!versionSuffix.equals(other.versionSuffix))
{
return false;
}
return true; return true;
} }
} }

View File

@ -138,7 +138,6 @@ public final class VersionLoader
int minorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.minorVersion")); int minorVersion = Integer.valueOf(versionProps.getProperty("activemq.version.minorVersion"));
int microVersion = Integer.valueOf(versionProps.getProperty("activemq.version.microVersion")); int microVersion = Integer.valueOf(versionProps.getProperty("activemq.version.microVersion"));
int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("activemq.version.incrementingVersion")); int[] incrementingVersions = parseCompatibleVersionList(versionProps.getProperty("activemq.version.incrementingVersion"));
String versionSuffix = versionProps.getProperty("activemq.version.versionSuffix");
int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("activemq.version.compatibleVersionList")); int[] compatibleVersionArray = parseCompatibleVersionList(versionProps.getProperty("activemq.version.compatibleVersionList"));
List<Version> definedVersions = new ArrayList<Version>(incrementingVersions.length); List<Version> definedVersions = new ArrayList<Version>(incrementingVersions.length);
for (int incrementingVersion : incrementingVersions) for (int incrementingVersion : incrementingVersions)
@ -148,7 +147,6 @@ public final class VersionLoader
minorVersion, minorVersion,
microVersion, microVersion,
incrementingVersion, incrementingVersion,
versionSuffix,
compatibleVersionArray)); compatibleVersionArray));
} }
//We want the higher version to be the first //We want the higher version to be the first

View File

@ -19,6 +19,5 @@ activemq.version.majorVersion=${activemq.version.majorVersion}
activemq.version.minorVersion=${activemq.version.minorVersion} activemq.version.minorVersion=${activemq.version.minorVersion}
activemq.version.microVersion=${activemq.version.microVersion} activemq.version.microVersion=${activemq.version.microVersion}
activemq.version.incrementingVersion=${activemq.version.incrementingVersion} activemq.version.incrementingVersion=${activemq.version.incrementingVersion}
activemq.version.versionSuffix=${activemq.version.versionSuffix}
activemq.version.versionTag=${activemq.version.versionTag} activemq.version.versionTag=${activemq.version.versionTag}
activemq.version.compatibleVersionList=121,122,123,124,125,126 activemq.version.compatibleVersionList=121,122,123,124,125,126

View File

@ -482,7 +482,7 @@ public class NettyAcceptor implements Acceptor
TimeUnit.MILLISECONDS); TimeUnit.MILLISECONDS);
} }
ActiveMQServerLogger.LOGGER.startedNettyAcceptor(TransportConstants.NETTY_VERSION, host, port, protocolsString); ActiveMQServerLogger.LOGGER.startedAcceptor(host, port, protocolsString);
} }
} }

View File

@ -80,15 +80,15 @@ public interface ActiveMQServerLogger extends BasicLogger
ActiveMQServerLogger LOGGER = Logger.getMessageLogger(ActiveMQServerLogger.class, ActiveMQServerLogger.class.getPackage().getName()); ActiveMQServerLogger LOGGER = Logger.getMessageLogger(ActiveMQServerLogger.class, ActiveMQServerLogger.class.getPackage().getName());
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221000, value = "{0} server is starting with configuration {1}", format = Message.Format.MESSAGE_FORMAT) @Message(id = 221000, value = "{0} Message Broker is starting with configuration {1}", format = Message.Format.MESSAGE_FORMAT)
void serverStarting(String type, Configuration configuration); void serverStarting(String type, Configuration configuration);
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221001, value = "ActiveMQ Server version {0} [{1}] {2}", format = Message.Format.MESSAGE_FORMAT) @Message(id = 221001, value = "Apache ActiveMQ Message Broker version {0} [nodeID={1}] {2}", format = Message.Format.MESSAGE_FORMAT)
void serverStarted(String fullVersion, SimpleString nodeId, String identity); void serverStarted(String fullVersion, SimpleString nodeId, String identity);
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221002, value = "ActiveMQ Server version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT) @Message(id = 221002, value = "Apache ActiveMQ Message Broker version {0} [{1}] stopped", format = Message.Format.MESSAGE_FORMAT)
void serverStopped(String version, SimpleString nodeId); void serverStopped(String version, SimpleString nodeId);
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@ -117,7 +117,7 @@ public interface ActiveMQServerLogger extends BasicLogger
void awaitFailBack(); void awaitFailBack();
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221109, value = "ActiveMQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active", @Message(id = 221109, value = "Apache ActiveMQ Backup Server version {0} [{1}] started, waiting live to fail before it gets active",
format = Message.Format.MESSAGE_FORMAT) format = Message.Format.MESSAGE_FORMAT)
void backupServerStarted(String version, SimpleString nodeID); void backupServerStarted(String version, SimpleString nodeID);
@ -167,8 +167,8 @@ public interface ActiveMQServerLogger extends BasicLogger
void journalUnreferencedMessage(Long messageID); void journalUnreferencedMessage(Long messageID);
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221020, value = "Started Netty Acceptor version {0} {1}:{2,number,#} for protocols [{3}]", format = Message.Format.MESSAGE_FORMAT) @Message(id = 221020, value = "Started Acceptor at {0}:{1,number,#} for protocols [{2}]", format = Message.Format.MESSAGE_FORMAT)
void startedNettyAcceptor(String id, String host, Integer port, String enabledProtocols); void startedAcceptor(String host, Integer port, String enabledProtocols);
@LogMessage(level = Logger.Level.INFO) @LogMessage(level = Logger.Level.INFO)
@Message(id = 221021, value = "failed to remove connection", format = Message.Format.MESSAGE_FORMAT) @Message(id = 221021, value = "failed to remove connection", format = Message.Format.MESSAGE_FORMAT)
@ -325,7 +325,7 @@ public interface ActiveMQServerLogger extends BasicLogger
void divertBindingNotExists(SimpleString bindingName); void divertBindingNotExists(SimpleString bindingName);
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 222007, value = "Security risk! ActiveMQ is running with the default cluster admin user and default password. Please see the cluster chapter in the ActiveMQ User Guide for instructions on how to change this.", format = Message.Format.MESSAGE_FORMAT) @Message(id = 222007, value = "Security risk! Apache ActiveMQ is running with the default cluster admin user and default password. Please see the cluster chapter in the ActiveMQ User Guide for instructions on how to change this.", format = Message.Format.MESSAGE_FORMAT)
void clusterSecurityRisk(); void clusterSecurityRisk();
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@ -986,7 +986,7 @@ public interface ActiveMQServerLogger extends BasicLogger
void backupMovingDataAway(String oldPath, String newPath); void backupMovingDataAway(String oldPath, String newPath);
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 222163, value = "Server is being completely stopped, since this was a replicated backup there may be journal files that need cleaning up. The ActiveMQ server will have to be manually restarted.", @Message(id = 222163, value = "Server is being completely stopped, since this was a replicated backup there may be journal files that need cleaning up. The Apache ActiveMQ broker will have to be manually restarted.",
format = Message.Format.MESSAGE_FORMAT) format = Message.Format.MESSAGE_FORMAT)
void stopReplicatedBackupAfterFailback(); void stopReplicatedBackupAfterFailback();
@ -994,14 +994,6 @@ public interface ActiveMQServerLogger extends BasicLogger
@Message(id = 222164, value = "Error when trying to start replication {0}", format = Message.Format.MESSAGE_FORMAT) @Message(id = 222164, value = "Error when trying to start replication {0}", format = Message.Format.MESSAGE_FORMAT)
void errorStartingReplication(BackupReplicationStartFailedMessage.BackupRegistrationProblem problem); void errorStartingReplication(BackupReplicationStartFailedMessage.BackupRegistrationProblem problem);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222165, value = "Error starting naming server", format = Message.Format.MESSAGE_FORMAT)
void unableToStartNamingServer(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222166, value = "Error stopping naming server", format = Message.Format.MESSAGE_FORMAT)
void unableToStopNamingServer(@Cause Exception e);
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 222167, value = "Group Binding not available so deleting {0} groups from {1}, groups will be bound to another node", @Message(id = 222167, value = "Group Binding not available so deleting {0} groups from {1}, groups will be bound to another node",
format = Message.Format.MESSAGE_FORMAT) format = Message.Format.MESSAGE_FORMAT)

View File

@ -52,14 +52,12 @@ public class VersionImplTest extends Assert
int minorVersion = 0; int minorVersion = 0;
int microVersion = 1; int microVersion = 1;
int incrementingVersion = 10; int incrementingVersion = 10;
String versionSuffix = "suffix";
int[] compatibleVersionList = {7,8,9,10}; int[] compatibleVersionList = {7,8,9,10};
VersionImpl version = new VersionImpl(versionName, VersionImpl version = new VersionImpl(versionName,
majorVersion, majorVersion,
minorVersion, minorVersion,
microVersion, microVersion,
incrementingVersion, incrementingVersion,
versionSuffix,
compatibleVersionList); compatibleVersionList);
Assert.assertEquals(versionName, version.getVersionName()); Assert.assertEquals(versionName, version.getVersionName());
@ -67,15 +65,14 @@ public class VersionImplTest extends Assert
Assert.assertEquals(minorVersion, version.getMinorVersion()); Assert.assertEquals(minorVersion, version.getMinorVersion());
Assert.assertEquals(microVersion, version.getMicroVersion()); Assert.assertEquals(microVersion, version.getMicroVersion());
Assert.assertEquals(incrementingVersion, version.getIncrementingVersion()); Assert.assertEquals(incrementingVersion, version.getIncrementingVersion());
Assert.assertEquals(versionSuffix, version.getVersionSuffix());
} }
@Test @Test
public void testEquals() throws Exception public void testEquals() throws Exception
{ {
VersionImpl version = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); VersionImpl version = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, new int[]{7,8,9,10});
VersionImpl sameVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, "suffix", new int[]{7,8,9,10}); VersionImpl sameVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 10, new int[]{7,8,9,10});
VersionImpl differentVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 11, "suffix", new int[]{7,8,9,10,11}); VersionImpl differentVersion = new VersionImpl("ACTIVEMQ", 2, 0, 1, 11, new int[]{7,8,9,10,11});
Assert.assertFalse(version.equals(new Object())); Assert.assertFalse(version.equals(new Object()));
@ -87,7 +84,7 @@ public class VersionImplTest extends Assert
@Test @Test
public void testSerialize() throws Exception public void testSerialize() throws Exception
{ {
VersionImpl version = new VersionImpl("uyiuy", 3, 7, 6, 12, "uhuhuh", new int[]{9,10,11,12}); VersionImpl version = new VersionImpl("uyiuy", 3, 7, 6, 12, new int[]{9,10,11,12});
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos); ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(version); oos.writeObject(version);

View File

@ -82,7 +82,7 @@ public class WebServerComponent implements ExternalComponent
{ {
server.start(); server.start();
System.out.println("Server started at " + webServerConfig.bind); System.out.println("HTTP Server started at " + webServerConfig.bind);
} }
public void stop() throws Exception public void stop() throws Exception

View File

@ -51,16 +51,14 @@
<!-- base url for site deployment. See distribution management for full url. Override this in settings.xml for staging --> <!-- base url for site deployment. See distribution management for full url. Override this in settings.xml for staging -->
<staging.siteURL>scp://people.apache.org/x1/www/activemq.apache.org</staging.siteURL> <staging.siteURL>scp://people.apache.org/x1/www/activemq.apache.org</staging.siteURL>
<netty.version>4.0.20.Final</netty.version> <netty.version>4.0.20.Final</netty.version>
<activemq.version.versionName>Active Hornet</activemq.version.versionName> <activemq.version.versionName>${project.version}</activemq.version.versionName>
<activemq.version.majorVersion>6</activemq.version.majorVersion> <activemq.version.majorVersion>6</activemq.version.majorVersion>
<activemq.version.minorVersion>0</activemq.version.minorVersion> <activemq.version.minorVersion>0</activemq.version.minorVersion>
<activemq.version.microVersion>0</activemq.version.microVersion> <activemq.version.microVersion>0</activemq.version.microVersion>
<activemq.version.incrementingVersion>126,125,124,123,122</activemq.version.incrementingVersion> <activemq.version.incrementingVersion>126,125,124,123,122</activemq.version.incrementingVersion>
<activemq.version.versionSuffix>SNAPSHOT</activemq.version.versionSuffix> <activemq.version.versionTag>${project.version}</activemq.version.versionTag>
<activemq.version.versionTag>SNAPSHOT</activemq.version.versionTag>
<ActiveMQ-Version> <ActiveMQ-Version>
${activemq.version.majorVersion}.${activemq.version.minorVersion}.${activemq.version.microVersion}.${activemq.version.versionSuffix} ${project.version}(${activemq.version.incrementingVersion})
(${activemq.version.versionName}, ${activemq.version.incrementingVersion})
</ActiveMQ-Version> </ActiveMQ-Version>
<resteasy.version>3.0.9.Final</resteasy.version> <resteasy.version>3.0.9.Final</resteasy.version>
<skipUnitTests>true</skipUnitTests> <skipUnitTests>true</skipUnitTests>

View File

@ -48,7 +48,6 @@ public class VersionLoaderTest extends UnitTestCase
props.load(ClassLoader.getSystemResourceAsStream(VersionLoader.DEFAULT_PROP_FILE_NAME)); props.load(ClassLoader.getSystemResourceAsStream(VersionLoader.DEFAULT_PROP_FILE_NAME));
Assert.assertEquals(props.get("activemq.version.versionName"), version.getVersionName()); Assert.assertEquals(props.get("activemq.version.versionName"), version.getVersionName());
Assert.assertEquals(props.get("activemq.version.versionSuffix"), version.getVersionSuffix());
Assert.assertEquals(Integer.parseInt(props.getProperty("activemq.version.majorVersion")), Assert.assertEquals(Integer.parseInt(props.getProperty("activemq.version.majorVersion")),
version.getMajorVersion()); version.getMajorVersion());