From f12b547470206f8e26d3cdffbd6d22ecb85ecdc9 Mon Sep 17 00:00:00 2001 From: srosse <none@none> Date: Fri, 1 Nov 2013 15:06:32 +0100 Subject: [PATCH] no-jira: write the revision number and the change set in the footer --- pom.xml | 17 ++++++++++++++--- .../java/org/olat/core/util/WebappHelper.java | 6 ++++++ .../olat/gui/control/OlatFooterController.java | 3 +++ .../olat/gui/control/_content/olatFooter.html | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index a79e94423ec..4a85eb715be 100644 --- a/pom.xml +++ b/pom.xml @@ -1125,7 +1125,7 @@ <updatePolicy>never</updatePolicy> </releases> <snapshots> - <enabled>true</enabled> + <enabled>false</enabled> <updatePolicy>daily</updatePolicy> </snapshots> </repository> @@ -1143,6 +1143,16 @@ <updatePolicy>daily</updatePolicy> </snapshots> </pluginRepository> + <pluginRepository> + <id>openolat-plugin-repo</id> + <name>OpenOLAT Public Maven Repository Group</name> + <url>http://nexus.openolat.org/nexus/content/groups/public</url> + <layout>default</layout> + <releases> + <enabled>true</enabled> + <updatePolicy>never</updatePolicy> + </releases> + </pluginRepository> </pluginRepositories> <build> <!-- Useful maven commands: o mvn dependency:tree - check to see what other @@ -1190,9 +1200,9 @@ </testResources> <plugins> <plugin> - <groupId>org.codehaus.mojo</groupId> + <groupId>org.openolat.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> - <version>1.2</version> + <version>1.2.0</version> <executions> <execution> <phase>validate</phase> @@ -1236,6 +1246,7 @@ <manifestEntries> <Build-Change-Set>${changeSet}</Build-Change-Set> <Build-Change-Set-Date>${changeSetDate}</Build-Change-Set-Date> + <Build-Revision-Number>${revisionNumber}</Build-Revision-Number> <Implementation-Build>${buildNumber}</Implementation-Build> </manifestEntries> </archive> diff --git a/src/main/java/org/olat/core/util/WebappHelper.java b/src/main/java/org/olat/core/util/WebappHelper.java index 17a9d163d06..5952b49f5cb 100644 --- a/src/main/java/org/olat/core/util/WebappHelper.java +++ b/src/main/java/org/olat/core/util/WebappHelper.java @@ -85,6 +85,7 @@ public class WebappHelper implements Initializable, Destroyable, ServletContextA private static String buildJdk; private static String changeSet; private static String changeSetDate; + private static String revisionNumber; private static String implementationVersion; @@ -117,6 +118,7 @@ public class WebappHelper implements Initializable, Destroyable, ServletContextA props.load(meta); changeSet = props.getProperty("Build-Change-Set"); changeSetDate = props.getProperty("Build-Change-Set-Date"); + revisionNumber = props.getProperty("Build-Revision-Number"); implementationVersion = props.getProperty("Implementation-Version"); buildJdk = props.getProperty("Build-Jdk"); } catch (IOException e) { @@ -464,6 +466,10 @@ public class WebappHelper implements Initializable, Destroyable, ServletContextA public static String getChangeSetDate() { return changeSetDate; } + + public static String getRevisionNumber() { + return revisionNumber; + } public static String getImplementationVersion() { return implementationVersion; diff --git a/src/main/java/org/olat/gui/control/OlatFooterController.java b/src/main/java/org/olat/gui/control/OlatFooterController.java index ebe852464ca..ce169f1f1ad 100644 --- a/src/main/java/org/olat/gui/control/OlatFooterController.java +++ b/src/main/java/org/olat/gui/control/OlatFooterController.java @@ -100,9 +100,12 @@ public class OlatFooterController extends BasicController { olatFootervc.contextPut("appName", Settings.getApplicationName()); olatFootervc.contextPut("appVersion", Settings.getVersion()); + olatFootervc.contextPut("buildIdentifier", Settings.getBuildIdentifier()); + olatFootervc.contextPut("revisionNumber", WebappHelper.getRevisionNumber()); olatFootervc.contextPut("changeSet", WebappHelper.getChangeSet()); olatFootervc.contextPut("changeSetDate", WebappHelper.getChangeSetDate()); + olatFootervc.contextPut("node", Settings.getNodeInfo()); olatFootervc.contextPut("olatversion", Settings.getFullVersionInfo() +" "+ Settings.getNodeInfo()); diff --git a/src/main/java/org/olat/gui/control/_content/olatFooter.html b/src/main/java/org/olat/gui/control/_content/olatFooter.html index 5a73344ebe6..d57a99521e7 100644 --- a/src/main/java/org/olat/gui/control/_content/olatFooter.html +++ b/src/main/java/org/olat/gui/control/_content/olatFooter.html @@ -5,7 +5,7 @@ <span id="b_counter">($r.render("userCounter") $r.translate("other.users.online"))</span> </div> <div id="b_footer_version"> - <a href="http://www.openolat.org" title="Homepage of the Open Source LMS OpenOLAT $appVersion (Build $changeSet)" target="_blank">$appName $appVersion ($node)</a> + <a href="http://www.openolat.org" title="Homepage of the Open Source LMS OpenOLAT $appVersion (Build $revisionNumber:$changeSet)" target="_blank">$appName $appVersion ($node)</a> </div> #if($r.available("shareLink")) $r.render("shareLink") -- GitLab