]> source.dussan.org Git - archiva.git/commitdiff
[MRM-895]
authorMaria Odea B. Ching <oching@apache.org>
Mon, 4 Aug 2008 06:34:41 +0000 (06:34 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Mon, 4 Aug 2008 06:34:41 +0000 (06:34 +0000)
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

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaVersion.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/Banner.java

index 34ab2f2821fa60f37d844bbb7671cd2819bf8b81..ea78d87617e97e58bab736d45a3458a5f431015a 100644 (file)
@@ -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
index 27775bf083a92fd553b267b4931265e0b3279974..ea090e6249a8684e2a4050bf4236b33eb0e4dda7 100644 (file)
@@ -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 );
     }
 }