Revision: 15385
Author: [email protected]
Date: Thu Nov 18 09:43:36 2010
Log: Update Issue 1624
Backport to JBCP 5 branch
http://code.google.com/p/mobicents/source/detail?r=15385
Added:
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/resources/org/mobicents/servlet/sip/core/release.properties
Deleted:
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/resources/org/mobicents/servlet/sip/core/version.properties
Modified:
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/pom.xml
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
=======================================
--- /dev/null
+++
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/resources/org/mobicents/servlet/sip/core/release.properties
Thu Nov 18 09:43:36 2010
@@ -0,0 +1,7 @@
+# release.version correspons to the version currently in development.
+# At the time of a public release of the version,
+# the source repository has to be tagged with it and the property needs to
increment in this file.
+release.version=${pom.version}
+release.revision=r${buildNumber}
+release.date=${release.timestamp}
+release.name=${mobicents.name}
=======================================
---
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/resources/org/mobicents/servlet/sip/core/version.properties
Mon Aug 9 01:15:32 2010
+++ /dev/null
@@ -1,4 +0,0 @@
-# release.version correspons to the version currently in development.
-# At the time of a public release of the version,
-# the source repository has to be tagged with it and the property needs to
increment in this file.
-release.version=${pom.version} - revision ${buildNumber}
=======================================
--- /branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/pom.xml Tue Nov
2 04:11:43 2010
+++ /branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/pom.xml Thu Nov
18 09:43:36 2010
@@ -9,7 +9,14 @@
<artifactId>sip-servlets-impl</artifactId>
<packaging>jar</packaging>
<name>Sip Servlets Implementation</name>
-
<url>http://www.mobicents.org-a.googlepages.com/products_sip_servlets.html</url>
+ <url>http://www.mobicents.org/products_sip_servlets.html</url>
+
+ <properties>
+ <mobicents.name>JBCP</mobicents.name>
+
<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
+ <release.timestamp>${maven.build.timestamp}</release.timestamp>
+ </properties>
+
<dependencies>
<!-- sip servlet spec dependency -->
<dependency>
@@ -126,14 +133,14 @@
</dependencies>
<build>
- <!-- resources>
+ <resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
- </resources-->
+ </resources>
<plugins>
- <!-- plugin>
+ <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-4</version>
@@ -149,7 +156,7 @@
<buildNumberPropertiesFileLocation>${basedir}/src/main/resources/org/mobicents/servlet/sip/core</buildNumberPropertiesFileLocation>
<revisionOnScmFailure>no-revision</revisionOnScmFailure>
</configuration>
- </plugin-->
+ </plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<groupId>org.mobicents.tools</groupId>
=======================================
---
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Tue Nov 16 00:54:41 2010
+++
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Thu Nov 18 09:43:36 2010
@@ -351,15 +351,21 @@
}
}
if(logger.isInfoEnabled()) {
- Properties versionProperties = new Properties();
+ Properties releaseProperties = new Properties();
try {
- InputStream in =
SipApplicationDispatcherImpl.class.getResourceAsStream("version.properties");
+ InputStream in =
SipApplicationDispatcherImpl.class.getResourceAsStream("release.properties");
if(in != null) {
- versionProperties.load(in);
+ releaseProperties.load(in);
in.close();
- String version =
versionProperties.getProperty("release.version");
- if(version != null) {
- logger.info("Mobicents Sip Servlets " +
version + " started." );
+ String releaseVersion =
releaseProperties.getProperty("release.version");
+ String releaseName =
releaseProperties.getProperty("release.name");
+ String releaseDate =
releaseProperties.getProperty("release.date");
+ String releaseRevision =
releaseProperties.getProperty("release.revision");
+ if(releaseVersion != null) {
+ // Follow the EAP Convention
+ // Release ID: JBoss [EAP] 5.0.1 (build: SVNTag=JBPAPP_5_0_1
date=201003301050)
+ logger.info("Release ID: (" + releaseName + ") Sip Servlets " +
releaseVersion + " (build: SVNTag=" + releaseRevision + " date=" +
releaseDate);
+ logger.info(releaseName + " Sip Servlets " + releaseVersion + "
(build: revision=" + releaseRevision + " date=" + releaseDate + "
Started.");
} else {
logger.warn("Unable to extract the version of Mobicents Sip Servlets
currently running");
}