diff --git a/maven-embedder/pom.xml b/maven-embedder/pom.xml index 8df61c5787..55e8307105 100644 --- a/maven-embedder/pom.xml +++ b/maven-embedder/pom.xml @@ -27,7 +27,7 @@ maven-embedder Maven Embedder - 2.1.0.v20070209-2050 + 2.1.0.v20070209-2105 diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedRequest.java b/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedderConfiguration.java similarity index 73% rename from maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedRequest.java rename to maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedderConfiguration.java index fadbfde8c0..d10d91ec8e 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedRequest.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/DefaultMavenEmbedderConfiguration.java @@ -25,12 +25,12 @@ import org.apache.maven.settings.Settings; import org.codehaus.plexus.classworlds.ClassWorld; /** - * Default implementation of MavenEmbedRequest intefrace. + * Default implementation of MavenEmbedderConfiguration intefrace. * * @author mkleint */ -public class DefaultMavenEmbedRequest - implements MavenEmbedRequest +public class DefaultMavenEmbedderConfiguration + implements MavenEmbedderConfiguration { private List inactives; @@ -53,30 +53,30 @@ public class DefaultMavenEmbedRequest private ClassWorld classWorld; - /** Creates a new instance of DefaultMavenEmbedRequest */ - public DefaultMavenEmbedRequest() + /** Creates a new instance of DefaultMavenEmbedderConfiguration */ + public DefaultMavenEmbedderConfiguration() { } - public MavenEmbedRequest addActiveProfile( String profile ) + public MavenEmbedderConfiguration addActiveProfile( String profile ) { getActiveProfiles().add( profile ); return this; } - public MavenEmbedRequest addInactiveProfile( String profile ) + public MavenEmbedderConfiguration addInactiveProfile( String profile ) { getInactiveProfiles().add( profile ); return this; } - public MavenEmbedRequest addActiveProfiles( List profiles ) + public MavenEmbedderConfiguration addActiveProfiles( List profiles ) { getActiveProfiles().addAll( profiles ); return this; } - public MavenEmbedRequest addInactiveProfiles( List profiles ) + public MavenEmbedderConfiguration addInactiveProfiles( List profiles ) { getInactiveProfiles().addAll( profiles ); return this; @@ -100,13 +100,13 @@ public class DefaultMavenEmbedRequest return inactives; } - public MavenEmbedRequest setUserSettingsFile( File user ) + public MavenEmbedderConfiguration setUserSettingsFile( File user ) { userSettings = user; return this; } - public MavenEmbedRequest setGlobalSettingsFile( File global ) + public MavenEmbedderConfiguration setGlobalSettingsFile( File global ) { globalSettings = global; return this; @@ -122,7 +122,7 @@ public class DefaultMavenEmbedRequest return globalSettings; } - public MavenEmbedRequest setConfigurationCustomizer( ContainerCustomizer customizer ) + public MavenEmbedderConfiguration setConfigurationCustomizer( ContainerCustomizer customizer ) { this.customizer = customizer; return this; @@ -133,7 +133,7 @@ public class DefaultMavenEmbedRequest return customizer; } - public MavenEmbedRequest setSystemProperties( Properties properties ) + public MavenEmbedderConfiguration setSystemProperties( Properties properties ) { systemProperties = properties; return this; @@ -154,7 +154,7 @@ public class DefaultMavenEmbedRequest return extensions; } - public MavenEmbedRequest setMavenEmbedderLogger( MavenEmbedderLogger logger ) + public MavenEmbedderConfiguration setMavenEmbedderLogger( MavenEmbedderLogger logger ) { this.logger = logger; return this; @@ -170,13 +170,13 @@ public class DefaultMavenEmbedRequest return classWorld; } - public MavenEmbedRequest setClassWorld( ClassWorld classWorld ) + public MavenEmbedderConfiguration setClassWorld( ClassWorld classWorld ) { this.classWorld = classWorld; return this; } - public MavenEmbedRequest setClassLoader( ClassLoader loader ) + public MavenEmbedderConfiguration setClassLoader( ClassLoader loader ) { this.classWorld = new ClassWorld( "plexus.core", loader ); return this; diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java index 5ec77e7b4a..e58548d0ee 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java @@ -142,7 +142,7 @@ public class MavenEmbedder // User options // ---------------------------------------------------------------------- - private MavenEmbedRequest embedderRequest; + private MavenEmbedderConfiguration embedderRequest; // ---------------------------------------------------------------------------- // Constructors @@ -158,7 +158,7 @@ public class MavenEmbedder MavenEmbedderLogger logger ) throws MavenEmbedderException { - this( new DefaultMavenEmbedRequest().setClassWorld( classWorld ).setMavenEmbedderLogger( logger ) ); + this( new DefaultMavenEmbedderConfiguration().setClassWorld( classWorld ).setMavenEmbedderLogger( logger ) ); } public MavenEmbedder( ClassLoader classLoader ) @@ -174,10 +174,10 @@ public class MavenEmbedder this( new ClassWorld( "plexus.core", classLoader ), logger ); } - public MavenEmbedder( MavenEmbedRequest req ) + public MavenEmbedder( MavenEmbedderConfiguration embedderConfiguration ) throws MavenEmbedderException { - start( req ); + start( embedderConfiguration ); } // ---------------------------------------------------------------------- @@ -488,7 +488,7 @@ public class MavenEmbedder // Lifecycle // ---------------------------------------------------------------------- - private void start( MavenEmbedRequest req ) + private void start( MavenEmbedderConfiguration req ) throws MavenEmbedderException { this.classWorld = req.getClassWorld(); diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedRequest.java b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderConfiguration.java similarity index 70% rename from maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedRequest.java rename to maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderConfiguration.java index 911fbe221a..0f9daae1d2 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedRequest.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderConfiguration.java @@ -27,46 +27,46 @@ import org.codehaus.plexus.classworlds.ClassWorld; * * @author mkleint */ -public interface MavenEmbedRequest +public interface MavenEmbedderConfiguration { /* * Add profile to activate. */ - MavenEmbedRequest addActiveProfile( String profile ); + MavenEmbedderConfiguration addActiveProfile( String profile ); /* * Add profile to inactivate. */ - MavenEmbedRequest addInactiveProfile( String profile ); + MavenEmbedderConfiguration addInactiveProfile( String profile ); /* * Add a list of String instances with names of profiles to activate. */ - MavenEmbedRequest addActiveProfiles( List profiles ); + MavenEmbedderConfiguration addActiveProfiles( List profiles ); /* * Add a list of String instances with names of profiles to inactivate. */ - MavenEmbedRequest addInactiveProfiles( List profiles ); + MavenEmbedderConfiguration addInactiveProfiles( List profiles ); /* * Set location of the user settings file to use for the embedder. */ - MavenEmbedRequest setUserSettingsFile( File user ); + MavenEmbedderConfiguration setUserSettingsFile( File user ); /* * Set location of the global settings file to use for the embedder. */ - MavenEmbedRequest setGlobalSettingsFile( File global ); + MavenEmbedderConfiguration setGlobalSettingsFile( File global ); /** * Set a customizer callback implemetation that will be given a chance to modify the plexus container * on startup. */ - MavenEmbedRequest setConfigurationCustomizer( ContainerCustomizer customizer ); + MavenEmbedderConfiguration setConfigurationCustomizer( ContainerCustomizer customizer ); /** set the system properties to be used during the lifecycle of the embedder. Excluding the time when executing the project, then the properties from MavenExecutionRequestare used. */ - MavenEmbedRequest setSystemProperties( Properties properties ); + MavenEmbedderConfiguration setSystemProperties( Properties properties ); List getActiveProfiles(); @@ -84,13 +84,13 @@ public interface MavenEmbedRequest List getExtensions(); - public MavenEmbedRequest setMavenEmbedderLogger( MavenEmbedderLogger logger ); + public MavenEmbedderConfiguration setMavenEmbedderLogger( MavenEmbedderLogger logger ); public MavenEmbedderLogger getMavenEmbedderLogger(); public ClassWorld getClassWorld(); - public MavenEmbedRequest setClassWorld( ClassWorld classWorld ); + public MavenEmbedderConfiguration setClassWorld( ClassWorld classWorld ); - public MavenEmbedRequest setClassLoader( ClassLoader loader ); + public MavenEmbedderConfiguration setClassLoader( ClassLoader loader ); } diff --git a/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java b/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java index 4c25e3eb7c..4f42b88e54 100644 --- a/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java +++ b/maven-embedder/src/test/java/org/apache/maven/embedder/MavenEmbedderTest.java @@ -230,8 +230,6 @@ public class MavenEmbedderTest assertEquals( 1, artifacts.size() ); Artifact artifact = (Artifact) artifacts.iterator().next(); - - System.out.println( "artifact = " + artifact ); } public void testProjectWithExtensionsReading() diff --git a/maven-embedder/src/test/java/org/apache/maven/embedder/TestComponentOverride.java b/maven-embedder/src/test/java/org/apache/maven/embedder/TestComponentOverride.java index 2da04cb13a..586efadbb7 100644 --- a/maven-embedder/src/test/java/org/apache/maven/embedder/TestComponentOverride.java +++ b/maven-embedder/src/test/java/org/apache/maven/embedder/TestComponentOverride.java @@ -25,7 +25,7 @@ public class TestComponentOverride ClassLoader loader = Thread.currentThread().getContextClassLoader(); - MavenEmbedRequest request = new DefaultMavenEmbedRequest(); + MavenEmbedderConfiguration request = new DefaultMavenEmbedderConfiguration(); request.setClassLoader( loader );