diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-10-19 22:21:54 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-10-19 22:21:54 +0000 |
commit | e74ebe51b78f67b7fb4a4fa8db518a28ed8b9488 (patch) | |
tree | 96e44635a76bed999661aa3e6336b9d1356519dc /archiva-web | |
parent | 8ce5a7d4f95e9e10e3195dd46e4b346d6a7f1f40 (diff) | |
download | archiva-e74ebe51b78f67b7fb4a4fa8db518a28ed8b9488.tar.gz archiva-e74ebe51b78f67b7fb4a4fa8db518a28ed8b9488.zip |
Adding version into footer
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@586630 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-web')
-rw-r--r-- | archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java | 13 | ||||
-rw-r--r-- | archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp | 9 |
2 files changed, 17 insertions, 5 deletions
diff --git a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java index 78d2dc391..7b433f536 100644 --- a/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java +++ b/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java @@ -34,8 +34,15 @@ import java.util.Properties; */ public class ArchivaVersion { + public static String VERSION = "Unknown"; + public static String determineVersion( ClassLoader cloader ) { + if ( VERSION != null ) + { + return VERSION; + } + /* This is the search order of modules to find the version. */ String modules[] = new String[] { @@ -60,7 +67,6 @@ public class ArchivaVersion "archiva-webapp", "archiva-security", "archiva-applet", - "archiva-cli", "archiva-xml-tools" }; for ( int i = 0; i < modules.length; i++ ) @@ -77,7 +83,8 @@ public class ArchivaVersion String version = props.getProperty( "version" ); if ( StringUtils.isNotBlank( version ) ) { - return version; + VERSION = version; + return VERSION; } } catch ( IOException e ) @@ -87,7 +94,7 @@ public class ArchivaVersion } } - return "Unknown"; + return VERSION; } private static URL findModulePom( ClassLoader cloader, String module ) diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp index 95836dfa6..eca75b754 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp @@ -25,6 +25,8 @@ <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %> <%@ page import="java.util.Calendar" %> +<%@ page import="org.apache.maven.archiva.web.startup.ArchivaVersion" %> + <html> <head> <title>Apache Archiva \ @@ -173,8 +175,11 @@ } %> <div id="footer"> - <div class="xright">© - Copyright © <%= copyrightRange %> Apache Software Foundation + <div class="xleft"> + Apache Archiva <%= ArchivaVersion.VERSION %> + </div> + <div class="xright"> + Copyright © <%= copyrightRange %> Apache Software Foundation </div> <div class="clear"> |