Updated Branches:
  refs/heads/master 88062a05b -> 4a21924a5

o Moved towards a single wrapper for all properties wrapping needs


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/4a21924a
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/4a21924a
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/4a21924a

Branch: refs/heads/master
Commit: 4a21924a57296fc26f9055d99bc0b4db1e952333
Parents: 88062a0
Author: Kristian Rosenvold <krosenv...@apache.org>
Authored: Thu May 30 08:15:47 2013 +0200
Committer: Kristian Rosenvold <krosenv...@apache.org>
Committed: Thu May 30 08:15:47 2013 +0200

----------------------------------------------------------------------
 .../plugin/surefire/AbstractSurefireMojo.java      |   43 +++-
 .../maven/plugin/surefire/SurefireProperties.java  |  187 +++++++++++----
 .../surefire/booterclient/BooterSerializer.java    |   24 +-
 .../plugin/surefire/SurefirePropertiesTest.java    |    5 +-
 ...BooterDeserializerStartupConfigurationTest.java |   18 +-
 .../surefire/booter/ClasspathConfiguration.java    |   46 +---
 .../maven/surefire/booter/KeyValueSource.java      |    2 +-
 .../maven/surefire/booter/PropertiesWrapper.java   |   16 --
 8 files changed, 208 insertions(+), 133 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
----------------------------------------------------------------------
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
index d254d55..677920e 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java
@@ -69,6 +69,7 @@ import org.apache.maven.shared.utils.io.FileUtils;
 import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
 import org.apache.maven.surefire.booter.Classpath;
 import org.apache.maven.surefire.booter.ClasspathConfiguration;
+import org.apache.maven.surefire.booter.KeyValueSource;
 import org.apache.maven.surefire.booter.ProviderConfiguration;
 import org.apache.maven.surefire.booter.ProviderParameterNames;
 import org.apache.maven.surefire.booter.StartupConfiguration;
@@ -799,23 +800,53 @@ public abstract class AbstractSurefireMojo
 
     private SurefireProperties setupProperties()
     {
+        SurefireProperties sysProps = null;
+        try {
+            sysProps = SurefireProperties.loadProperties( systemPropertiesFile 
);
+        }
+        catch ( IOException e )
+        {
+            String msg = "The system property file '" + 
systemPropertiesFile.getAbsolutePath() + "' can't be read.";
+            if ( getLog().isDebugEnabled() )
+            {
+                getLog().warn( msg, e );
+            }
+            else
+            {
+                getLog().warn( msg );
+            }
+        }
+
         SurefireProperties result =
-            SurefireProperties.calculateEffectiveProperties( 
getSystemProperties(), getSystemPropertiesFile(),
-                                                             
getSystemPropertyVariables(), getUserProperties(),
-                                                             getLog() );
+            SurefireProperties.calculateEffectiveProperties( 
getSystemProperties(), getSystemPropertyVariables(),
+                                                             
getUserProperties(), sysProps );
 
         result.setProperty( "basedir", getBasedir().getAbsolutePath() );
         result.setProperty( "user.dir", 
getWorkingDirectory().getAbsolutePath() );
         result.setProperty( "localRepository", 
getLocalRepository().getBasedir() );
 
-        result.verifyLegalSystemProperties( getLog() );
+        for ( Object o : result.propertiesThatCannotBeSetASystemProperties() )
+        {
+            getLog().warn( o + " cannot be set as system property, use 
<argLine>-D" + o + "=...<argLine> instead" );
+
+        }
         if ( getLog().isDebugEnabled() )
         {
-            result.showToLog( getLog(), "system property" );
+            showToLog( result, getLog(), "system property" );
         }
         return result;
     }
 
+    public void showToLog( SurefireProperties props, 
org.apache.maven.plugin.logging.Log log, String setting )
+    {
+        for ( Object key : props.getStringKeySet() )
+        {
+            String value = props.getProperty( (String) key );
+            log.debug( "Setting " + setting + " [" + key + "]=[" + value + "]" 
);
+        }
+    }
+
+
     private RunResult executeProvider( ProviderInfo provider, 
DefaultScanResult scanResult )
         throws MojoExecutionException, MojoFailureException, 
SurefireExecutionException, SurefireBooterForkException,
         TestSetFailedException
@@ -864,7 +895,7 @@ public abstract class AbstractSurefireMojo
     public static SurefireProperties createCopyAndReplaceForkNumPlaceholder(
         SurefireProperties effectiveSystemProperties, int threadNumber )
     {
-        SurefireProperties filteredProperties = new SurefireProperties( 
effectiveSystemProperties );
+        SurefireProperties filteredProperties = new SurefireProperties( ( 
KeyValueSource) effectiveSystemProperties );
         String threadNumberString = String.valueOf( threadNumber );
         for ( Entry<Object, Object> entry : 
effectiveSystemProperties.entrySet() )
         {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
----------------------------------------------------------------------
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
index ff5cd69..606c26b 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
@@ -18,6 +18,10 @@ package org.apache.maven.plugin.surefire;
  * under the License.
  */
 
+import org.apache.maven.surefire.booter.Classpath;
+import org.apache.maven.surefire.booter.KeyValueSource;
+import org.apache.maven.surefire.util.internal.StringUtils;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -27,13 +31,11 @@ import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.surefire.booter.KeyValueSource;
-
 /**
  * A properties implementation that preserves insertion order.
  */
@@ -55,6 +57,14 @@ public class SurefireProperties
         }
     }
 
+    public SurefireProperties( KeyValueSource source )
+    {
+        if ( source != null )
+        {
+            source.copyTo( this );
+        }
+    }
+
     @Override
     public synchronized Object put( Object key, Object value )
     {
@@ -81,7 +91,7 @@ public class SurefireProperties
         return Collections.enumeration( items );
     }
 
-    public void copyProperties( Properties source )
+    public void copyPropertiesFrom( Properties source )
     {
         if ( source != null )
         {
@@ -94,36 +104,31 @@ public class SurefireProperties
         }
     }
 
-    private Iterable<Object> getStringKeySet()
+    public Iterable<Object> getStringKeySet()
     {
 
         //noinspection unchecked
         return keySet();
     }
 
-    public void showToLog( org.apache.maven.plugin.logging.Log log, String 
setting )
-    {
-        for ( Object key : getStringKeySet() )
-        {
-            String value = getProperty( (String) key );
-            log.debug( "Setting " + setting + " [" + key + "]=[" + value + "]" 
);
-        }
-    }
+    private static final Set<String> keysThatCannotBeUsedAsSystemProperties = 
new HashSet<String>()
+    {{
+            add( "java.library.path" );
+            add( "file.encoding" );
+            add( "jdk.map.althashing.threshold" );
+        }};
 
-    private static final Set<String> keysThatCannotBeUsedAsSystemProperties = 
new HashSet<String>(  ){{
-        add( "java.library.path" );
-        add( "file.encoding");
-        add( "jdk.map.althashing.threshold" );
-    }};
-
-    public void verifyLegalSystemProperties( 
org.apache.maven.plugin.logging.Log log )
+    public Set<Object> propertiesThatCannotBeSetASystemProperties()
     {
+        Set<Object> result = new HashSet<Object>();
         for ( Object key : getStringKeySet() )
         {
-            if (keysThatCannotBeUsedAsSystemProperties.contains( key )) {
-                log.warn( key + " cannot be set as system property, use 
<argLine>-D" + key + "=...<argLine> instead" );
+            if ( keysThatCannotBeUsedAsSystemProperties.contains( key ) )
+            {
+                result.add( key );
             }
         }
+        return result;
     }
 
 
@@ -140,37 +145,14 @@ public class SurefireProperties
         }
     }
 
-    static SurefireProperties calculateEffectiveProperties( Properties 
systemProperties, File systemPropertiesFile,
+    static SurefireProperties calculateEffectiveProperties( Properties 
systemProperties,
                                                             Map<String, 
String> systemPropertyVariables,
-                                                            Properties 
userProperties, Log log )
+                                                            Properties 
userProperties, SurefireProperties props )
     {
         SurefireProperties result = new SurefireProperties();
-        result.copyProperties( systemProperties );
+        result.copyPropertiesFrom( systemProperties );
 
-        if ( systemPropertiesFile != null )
-        {
-            Properties props = new SurefireProperties();
-            try
-            {
-                InputStream fis = new FileInputStream( systemPropertiesFile );
-                props.load( fis );
-                fis.close();
-            }
-            catch ( IOException e )
-            {
-                String msg = "The system property file '" + 
systemPropertiesFile.getAbsolutePath() + "' can't be read.";
-                if ( log.isDebugEnabled() )
-                {
-                    log.warn( msg, e );
-                }
-                else
-                {
-                    log.warn( msg );
-                }
-            }
-
-            result.copyProperties( props );
-        }
+        result.copyPropertiesFrom( props );
 
         copyProperties( result, systemPropertyVariables );
         copyProperties( result, systemPropertyVariables );
@@ -180,7 +162,7 @@ public class SurefireProperties
         // Not gonna do THAT any more... instead, we only propagate those 
system properties
         // that have been explicitly specified by the user via -Dkey=value on 
the CLI
 
-        result.copyProperties( userProperties );
+        result.copyPropertiesFrom( userProperties );
         return result;
     }
 
@@ -212,5 +194,110 @@ public class SurefireProperties
         }
     }
 
+    public void setProperty( String key, File file )
+    {
+        if ( file != null )
+        {
+            setProperty( key, file.toString() );
+        }
+    }
+
+    public void setProperty( String key, Boolean aBoolean )
+    {
+        if ( aBoolean != null )
+        {
+            setProperty( key, aBoolean.toString() );
+        }
+    }
+
+    public void addList( List items, String propertyPrefix )
+    {
+        if ( items == null || items.size() == 0 )
+        {
+            return;
+        }
+        int i = 0;
+        for ( Object item : items )
+        {
+            if ( item == null )
+            {
+                throw new NullPointerException( propertyPrefix + i + " has 
null value" );
+            }
+
+            String[] stringArray = StringUtils.split( item.toString(), "," );
+
+            for ( String aStringArray : stringArray )
+            {
+                setProperty( propertyPrefix + i, aStringArray );
+                i++;
+            }
+
+        }
+    }
+
+    public void setClasspath( String prefix, Classpath classpath )
+    {
+        List classpathElements = classpath.getClassPath();
+        for ( int i = 0; i < classpathElements.size(); ++i )
+        {
+            String element = (String) classpathElements.get( i );
+            setProperty( prefix + i, element );
+        }
+    }
+
+    private static SurefireProperties loadProperties( InputStream inStream )
+        throws IOException
+    {
+        Properties p = new Properties();
+
+        try
+        {
+            p.load( inStream );
+        }
+        finally
+        {
+            close( inStream );
+        }
+
+        return new SurefireProperties( p );
+    }
+
+    public static SurefireProperties loadProperties( File file )
+        throws IOException
+    {
+        if ( file != null )
+        {
+            return loadProperties( new FileInputStream( file ) );
+        }
+
+        return new SurefireProperties();
+    }
+
+    private static void close( InputStream inputStream )
+    {
+        if ( inputStream == null )
+        {
+            return;
+        }
+
+        try
+        {
+            inputStream.close();
+        }
+        catch ( IOException ex )
+        {
+            // ignore
+        }
+    }
+
+    public void setNullableProperty( String key, String value )
+    {
+        if ( value != null )
+        {
+            super.setProperty( key, value );
+        }
+
+    }
+
 
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
----------------------------------------------------------------------
diff --git 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
index 7530aea..84371c8 100644
--- 
a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
+++ 
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/BooterSerializer.java
@@ -21,11 +21,12 @@ package org.apache.maven.plugin.surefire.booterclient;
 
 import java.io.File;
 import java.io.IOException;
-import java.util.Properties;
+
+import org.apache.maven.plugin.surefire.SurefireProperties;
 import org.apache.maven.surefire.booter.BooterConstants;
 import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
+import org.apache.maven.surefire.booter.ClasspathConfiguration;
 import org.apache.maven.surefire.booter.KeyValueSource;
-import org.apache.maven.surefire.booter.PropertiesWrapper;
 import org.apache.maven.surefire.booter.ProviderConfiguration;
 import org.apache.maven.surefire.booter.StartupConfiguration;
 import org.apache.maven.surefire.booter.SystemPropertyManager;
@@ -69,28 +70,31 @@ class BooterSerializer
         throws IOException
     {
 
-        PropertiesWrapper properties = new PropertiesWrapper( new Properties() 
);
-        sourceProperties.copyTo( properties.getProperties() );
+        SurefireProperties properties = new SurefireProperties( 
sourceProperties );
 
-        providerConfiguration.getClasspathConfiguration().addForkProperties( 
properties );
+        ClasspathConfiguration cp = 
providerConfiguration.getClasspathConfiguration();
+        properties.setClasspath( ClasspathConfiguration.CLASSPATH, 
cp.getTestClasspath() );
+        properties.setClasspath( ClasspathConfiguration.SUREFIRE_CLASSPATH, 
cp.getProviderClasspath() );
+        properties.setProperty( ClasspathConfiguration.ENABLE_ASSERTIONS, 
String.valueOf( cp.isEnableAssertions()) );
+        properties.setProperty( ClasspathConfiguration.CHILD_DELEGATION, 
String.valueOf( cp.isChildDelegation() ) );
 
         TestArtifactInfo testNg = booterConfiguration.getTestArtifact();
         if ( testNg != null )
         {
             properties.setProperty( BooterConstants.TESTARTIFACT_VERSION, 
testNg.getVersion() );
-            properties.setProperty( BooterConstants.TESTARTIFACT_CLASSIFIER, 
testNg.getClassifier() );
+            properties.setNullableProperty( 
BooterConstants.TESTARTIFACT_CLASSIFIER, testNg.getClassifier() );
         }
 
         properties.setProperty( 
BooterConstants.FORKTESTSET_PREFER_TESTS_FROM_IN_STREAM, readTestsFromInStream 
);
-        properties.setProperty( BooterConstants.FORKTESTSET, getTypeEncoded( 
testSet ) );
+        properties.setNullableProperty( BooterConstants.FORKTESTSET, 
getTypeEncoded( testSet ) );
 
         TestRequest testSuiteDefinition = 
booterConfiguration.getTestSuiteDefinition();
         if ( testSuiteDefinition != null )
         {
             properties.setProperty( BooterConstants.SOURCE_DIRECTORY, 
testSuiteDefinition.getTestSourceDirectory() );
             properties.addList( testSuiteDefinition.getSuiteXmlFiles(), 
BooterConstants.TEST_SUITE_XML_FILES );
-            properties.setProperty( BooterConstants.REQUESTEDTEST, 
testSuiteDefinition.getRequestedTest() );
-            properties.setProperty( BooterConstants.REQUESTEDTESTMETHOD, 
testSuiteDefinition.getRequestedTestMethod() );
+            properties.setNullableProperty( BooterConstants.REQUESTEDTEST, 
testSuiteDefinition.getRequestedTest() );
+            properties.setNullableProperty( 
BooterConstants.REQUESTEDTESTMETHOD, 
testSuiteDefinition.getRequestedTestMethod() );
         }
 
         DirectoryScannerParameters directoryScannerParameters = 
booterConfiguration.getDirScannerParams();
@@ -128,7 +132,7 @@ class BooterSerializer
                                 String.valueOf( 
booterConfiguration.isFailIfNoTests() ) );
         properties.setProperty( BooterConstants.PROVIDER_CONFIGURATION, 
providerConfiguration.getProviderClassName() );
 
-        return SystemPropertyManager.writePropertiesFile( 
properties.getProperties(),
+        return SystemPropertyManager.writePropertiesFile( properties,
                                                           
forkConfiguration.getTempDirectory(), "surefire",
                                                           
forkConfiguration.isDebug() );
     }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefirePropertiesTest.java
----------------------------------------------------------------------
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefirePropertiesTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefirePropertiesTest.java
index 5a4663a..af9ee75 100644
--- 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefirePropertiesTest.java
+++ 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/SurefirePropertiesTest.java
@@ -22,6 +22,7 @@ import java.util.Enumeration;
 import java.util.Properties;
 
 import junit.framework.TestCase;
+import org.apache.maven.surefire.booter.KeyValueSource;
 
 /**
  * Tests the insertion-order preserving properties collection
@@ -33,7 +34,7 @@ public class SurefirePropertiesTest
     public void testKeys()
         throws Exception
     {
-        SurefireProperties orderedProperties = new SurefireProperties( null );
+        SurefireProperties orderedProperties = new SurefireProperties( 
(KeyValueSource) null );
         orderedProperties.setProperty( "abc", "1" );
         orderedProperties.setProperty( "xyz", "1" );
         orderedProperties.setProperty( "efg", "1" );
@@ -48,7 +49,7 @@ public class SurefirePropertiesTest
     public void testKeysReinsert()
         throws Exception
     {
-        SurefireProperties orderedProperties = new SurefireProperties( null );
+        SurefireProperties orderedProperties = new SurefireProperties( 
(KeyValueSource)null );
         orderedProperties.setProperty( "abc", "1" );
         orderedProperties.setProperty( "xyz", "1" );
         orderedProperties.setProperty( "efg", "1" );

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
index bbcf5e1..7c11370 100644
--- 
a/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
+++ 
b/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/BooterDeserializerStartupConfigurationTest.java
@@ -70,16 +70,10 @@ public class BooterDeserializerStartupConfigurationTest
     {
         assertEquals( expectedConfiguration.getTestClasspath().getClassPath(),
                       actualConfiguration.getTestClasspath().getClassPath() );
-        Properties propertiesForExpectedConfiguration = 
getPropertiesForClasspathConfiguration( expectedConfiguration );
-        Properties propertiesForActualConfiguration = 
getPropertiesForClasspathConfiguration( actualConfiguration );
-        assertEquals( propertiesForExpectedConfiguration, 
propertiesForActualConfiguration );
-    }
-
-    private Properties getPropertiesForClasspathConfiguration( 
ClasspathConfiguration configuration )
-    {
-        Properties properties = new Properties();
-        configuration.addForkProperties( new PropertiesWrapper( properties ) );
-        return properties;
+        assertEquals( expectedConfiguration.isEnableAssertions(), 
actualConfiguration.isEnableAssertions() );
+        assertEquals(  expectedConfiguration.isChildDelegation(), 
actualConfiguration.isChildDelegation() );
+        assertEquals(  expectedConfiguration.getProviderClasspath(), 
actualConfiguration.getProviderClasspath() );
+        assertEquals(  expectedConfiguration.getTestClasspath(), 
actualConfiguration.getTestClasspath() );
     }
 
     public void testClassLoaderConfiguration()
@@ -99,8 +93,8 @@ public class BooterDeserializerStartupConfigurationTest
 
     private ClasspathConfiguration createClasspathConfiguration()
     {
-        Classpath testClassPath = new Classpath( Arrays.asList( new String[]{ 
"CP1", "CP2" } ) );
-        Classpath providerClasspath = new Classpath( Arrays.asList( new 
String[]{ "SP1", "SP2" } ) );
+        Classpath testClassPath = new Classpath( Arrays.asList( "CP1", "CP2" ) 
);
+        Classpath providerClasspath = new Classpath( Arrays.asList( "SP1", 
"SP2" ) );
         return new ClasspathConfiguration( testClassPath, providerClasspath, 
Classpath.emptyClasspath(), true, true );
     }
 

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
----------------------------------------------------------------------
diff --git 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
index 9b3f9c3..5dbf018 100644
--- 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
+++ 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/ClasspathConfiguration.java
@@ -29,13 +29,13 @@ package org.apache.maven.surefire.booter;
  */
 public class ClasspathConfiguration
 {
-    private static final String CHILD_DELEGATION = "childDelegation";
+    public static final String CHILD_DELEGATION = "childDelegation";
 
-    private static final String ENABLE_ASSERTIONS = "enableAssertions";
+    public static final String ENABLE_ASSERTIONS = "enableAssertions";
 
-    private static final String CLASSPATH = "classPathUrl.";
+    public static final String CLASSPATH = "classPathUrl.";
 
-    private static final String SUREFIRE_CLASSPATH = "surefireClassPathUrl.";
+    public static final String SUREFIRE_CLASSPATH = "surefireClassPathUrl.";
 
     private final Classpath classpathUrls;
 
@@ -77,20 +77,6 @@ public class ClasspathConfiguration
         this.surefireClasspathUrls = surefireClassPathUrls;
     }
 
-    public void addForkProperties( PropertiesWrapper properties )
-    {
-        properties.setClasspath( CLASSPATH, classpathUrls );
-        properties.setClasspath( SUREFIRE_CLASSPATH, surefireClasspathUrls );
-        properties.setProperty( ENABLE_ASSERTIONS, String.valueOf( 
enableAssertions ) );
-        properties.setProperty( CHILD_DELEGATION, String.valueOf( 
childDelegation ) );
-    }
-
-    public ClassLoader createTestClassLoader( boolean childDelegation )
-        throws SurefireExecutionException
-    {
-        return classpathUrls.createClassLoader( null, childDelegation, 
enableAssertions, "test" );
-    }
-
     public ClassLoader createMergedClassLoader()
         throws SurefireExecutionException
     {
@@ -98,30 +84,13 @@ public class ClasspathConfiguration
             .createClassLoader( null, this.childDelegation, enableAssertions, 
"test" );
     }
 
-    public ClassLoader createTestClassLoader()
-        throws SurefireExecutionException
-    {
-        return classpathUrls.createClassLoader( null, this.childDelegation, 
enableAssertions, "test" );
-    }
-
-    public ClassLoader createSurefireClassLoader( ClassLoader parent )
-        throws SurefireExecutionException
-    {
-        return surefireClasspathUrls.createClassLoader( parent, false, 
enableAssertions, "provider" );
-    }
-
     public Classpath getProviderClasspath()
     {
         return surefireClasspathUrls;
     }
 
-    public ClassLoader createInprocSurefireClassLoader( ClassLoader parent )
-        throws SurefireExecutionException
-    {
-        return inprocClasspath.createClassLoader( parent, false, 
enableAssertions, "provider" );
-    }
 
-    public Classpath getTestClasspath()
+        public Classpath getTestClasspath()
     {
         return classpathUrls;
     }
@@ -137,4 +106,9 @@ public class ClasspathConfiguration
     {
         return enableAssertions;
     }
+
+    public boolean isChildDelegation()
+    {
+        return childDelegation;
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
----------------------------------------------------------------------
diff --git 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
index 9abdb8e..dd5e7e3 100644
--- 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
+++ 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/KeyValueSource.java
@@ -21,7 +21,7 @@ package org.apache.maven.surefire.booter;
 import java.util.Map;
 
 /**
- * A key-value source obeying the general constrains of java.util.Properties
+ * A key-value source obeying the geneal constrains of java.util.Properties
  */
 public interface KeyValueSource
 {

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4a21924a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java
----------------------------------------------------------------------
diff --git 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java
 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java
index e5e3d8e..8a40c63 100644
--- 
a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java
+++ 
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PropertiesWrapper.java
@@ -119,22 +119,6 @@ public class PropertiesWrapper
     }
 
 
-    public void setProperty( String key, File file )
-    {
-        if ( file != null )
-        {
-            setProperty( key, file.toString() );
-        }
-    }
-
-    public void setProperty( String key, Boolean aBoolean )
-    {
-        if ( aBoolean != null )
-        {
-            setProperty( key, aBoolean.toString() );
-        }
-    }
-
     Classpath getClasspath( String prefix )
     {
         List<String> elements = getStringList( prefix );

Reply via email to