diff options
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 ); } } |