From f9360a13d984b742ca09c43ad0c450adc1f05b99 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Tue, 10 May 2005 17:00:09 +0000 Subject: [PATCH] test if properties were provided git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@169498 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/test/SurefirePlugin.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java index 12a4782413..20364c42d9 100644 --- a/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java +++ b/maven-plugins/maven-surefire-plugin/src/main/java/org/apache/maven/test/SurefirePlugin.java @@ -168,12 +168,15 @@ public class SurefirePlugin System.setProperty( "basedir", basedir ); // Add all system properties configured by the user - Enumeration propertyKeys = systemProperties.propertyNames(); - while ( propertyKeys.hasMoreElements() ) + if ( systemProperties != null ) { - String key = (String) propertyKeys.nextElement(); - System.setProperty( key, systemProperties.getProperty( key ) ); - getLog().debug( "Setting system property [" + key + "]=[" + systemProperties.getProperty( key ) + "]" ); + Enumeration propertyKeys = systemProperties.propertyNames(); + while ( propertyKeys.hasMoreElements() ) + { + String key = (String) propertyKeys.nextElement(); + System.setProperty( key, systemProperties.getProperty( key ) ); + getLog().debug( "Setting system property [" + key + "]=[" + systemProperties.getProperty( key ) + "]" ); + } } // TODO: we should really just trust the plugin classloader?