aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2008-08-04 06:34:41 +0000
committerMaria Odea B. Ching <oching@apache.org>2008-08-04 06:34:41 +0000
commitbaa9a7cada496fb9776e0dcf3ea71c26c568c0de (patch)
treef3315a854851238d2dd1d4c8d2c721ffd6b256c4
parentfd144735f727fc3ae99ce96fbd8706d2d232a6f8 (diff)
downloadarchiva-baa9a7cada496fb9776e0dcf3ea71c26c568c0de.tar.gz
archiva-baa9a7cada496fb9776e0dcf3ea71c26c568c0de.zip
[MRM-895]
submitted by Mark Jeffrey -no longer pass the class loader in ArchivaVersion.determineVersion() git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@682269 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java13
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java4
2 files changed, 9 insertions, 8 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java
index 34ab2f282..ea78d8761 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java
@@ -19,14 +19,14 @@ package org.apache.maven.archiva.web.startup;
* under the License.
*/
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.io.IOUtils;
-
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.Properties;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+
/**
* ArchivaVersion
*
@@ -41,14 +41,15 @@ public class ArchivaVersion
{
}
- public static String determineVersion( ClassLoader cloader )
+ public static String determineVersion( )
{
if ( version != null )
{
return version;
}
- InputStream is = cloader.getResourceAsStream( "/META-INF/maven/org.apache.archiva/archiva-configuration/pom.properties" );
+ InputStream is = ArchivaConfiguration.class.getResourceAsStream( "/META-INF/maven/org.apache.archiva/archiva-configuration/pom.properties" );
+
if ( is != null )
{
try
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java
index 27775bf08..ea090e624 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java
@@ -220,7 +220,7 @@ public class Banner
public void display()
{
- String banner = getBanner( ArchivaVersion.determineVersion( this.getClass().getClassLoader() ) );
- LoggerFactory.getLogger( Banner.class ).info( StringUtils.repeat( "_", 25 ) + "\n" + banner );
+ String banner = getBanner( ArchivaVersion.determineVersion() );
+ LoggerFactory.getLogger( Banner.class ).info( StringUtils.repeat( "_", 25 ) + "\n" + banner );
}
}