git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@586630
13f79535-47bb-0310-9956-
ffa450edef68
*/
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[] {
"archiva-webapp",
"archiva-security",
"archiva-applet",
- "archiva-cli",
"archiva-xml-tools" };
for ( int i = 0; i < modules.length; i++ )
String version = props.getProperty( "version" );
if ( StringUtils.isNotBlank( version ) )
{
- return version;
+ VERSION = version;
+ return VERSION;
}
}
catch ( IOException e )
}
}
- return "Unknown";
+ return VERSION;
}
private static URL findModulePom( ClassLoader cloader, String module )
<%@ 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 \
}
%>
<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">