jvanzyl 2004/03/20 15:40:50
Modified: maven-core/src/main/java/org/apache/maven DefaultMaven.java
Log:
o cleaning up more crap that's now handled by the project builder
Revision Changes Path
1.7 +0 -87
maven-components/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
Index: DefaultMaven.java
===================================================================
RCS file:
/home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/DefaultMaven.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultMaven.java 20 Mar 2004 23:36:33 -0000 1.6
+++ DefaultMaven.java 20 Mar 2004 23:40:50 -0000 1.7
@@ -6,10 +6,8 @@
import org.apache.maven.plugin.manager.PluginManagerManager;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder;
-import org.apache.maven.util.CollectionUtils;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.PropertyUtils;
import org.codehaus.plexus.util.StringUtils;
import java.io.File;
@@ -17,49 +15,17 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Properties;
import java.util.Set;
public class DefaultMaven
implements Maven
{
- private Map sessionProperties;
-
- // Components
-
private PluginManagerManager pluginMM;
private MavenProjectBuilder projectBuilder;
private I18N i18n;
- public DefaultMaven()
- throws Exception
- {
- sessionProperties = createSessionProperties();
- }
-
- public void setProperty( String key, String value )
- {
- getSessionProperties().put( key, value );
- }
-
- public String getProperty( String key )
- {
- return (String) getSessionProperties().get( key );
- }
-
- public Map getSessionProperties()
- {
- return sessionProperties;
- }
-
- public void setSessionProperties( Map sessionProperties )
- {
- this.sessionProperties = sessionProperties;
- }
-
public Set getAllGoalNames()
{
//return getPluginManager().getGoalNames();
@@ -125,59 +91,6 @@
{
response.getException().printStackTrace();
}
- }
-
- // ----------------------------------------------------------------------
- // MavenSession sessionProperties
- // ----------------------------------------------------------------------
-
- /**
- * MavenSession sessionProperties consist of the following sets of
sessionProperties:
- *
- * 1) System sessionProperties
- * 2) ~/build.sessionProperties
- * 3) defaults.sessionProperties
- * 4) driver.sessionProperties
- *
- * Where the sessionProperties are dominant from top to bottom in the list
above.
- *
- * @return
- */
- public Map createSessionProperties()
- {
- Properties systemProperties = System.getProperties();
-
- File userBuildPropertiesFile = new File( System.getProperty( "user.home" ),
"build.properties" );
- Properties userBuildProperties = PropertyUtils.loadProperties(
userBuildPropertiesFile );
-
- Properties driverProperties = PropertyUtils.loadProperties(
- DefaultMaven.class.getClassLoader().getResourceAsStream(
- MavenConstants.DRIVER_PROPERTIES ) );
-
- Properties defaultProperties = PropertyUtils.loadProperties(
- DefaultMaven.class.getClassLoader().getResourceAsStream(
- MavenConstants.DEFAULTS_PROPERTIES ) );
-
- Map result = CollectionUtils.mergeMaps( new Map[]
- {
- systemProperties,
- userBuildProperties,
- defaultProperties,
- driverProperties
- } );
-
- // Set the basedir value in the context.
- result.put( "basedir", new File( System.getProperty( "user.dir" )
).getPath() );
-
- for ( Iterator i = result.keySet().iterator(); i.hasNext(); )
- {
- String key = (String) i.next();
- String value = (String) result.get( key );
- result.put( key, StringUtils.interpolate( value, result ) );
- }
-
- return result;
-
}
public MavenProject getProject( File project )
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]