mirror of https://github.com/apache/archiva.git
Adding version into footer
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@586630 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8ce5a7d4f9
commit
e74ebe51b7
|
@ -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 )
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue