notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2291 - in development/main/metro/main: etc/deliverables etc/main src/main/net/dpml/metro
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2291 - in development/main/metro/main: etc/deliverables etc/main src/main/net/dpml/metro
- Date: Sat, 16 Apr 2005 08:28:24 -0400
Author: mcconnell AT dpml.net
Date: Sat Apr 16 08:28:15 2005
New Revision: 2291
Removed:
development/main/metro/main/etc/deliverables/
development/main/metro/main/etc/main/
Modified:
development/main/metro/main/src/main/net/dpml/metro/Metro.java
development/main/metro/main/src/main/net/dpml/metro/Resources.properties
Log:
Update the metro property handling to read in the default installation
properties from ${dpml.preferences}/metro/metro.properties.
Modified: development/main/metro/main/src/main/net/dpml/metro/Metro.java
==============================================================================
--- development/main/metro/main/src/main/net/dpml/metro/Metro.java
(original)
+++ development/main/metro/main/src/main/net/dpml/metro/Metro.java Sat
Apr 16 08:28:15 2005
@@ -102,7 +102,7 @@
public static String TARGET_URI_KEY =
SystemContext.DOMAIN + ".metro.main.artifact";
- public static String DPML_PROPERTIES = "dpml.properties";
+ public static String METRO_PROPERTIES = "metro.properties";
//
------------------------------------------------------------------------
// immutable state
@@ -502,18 +502,18 @@
options.addOptionGroup( server );
//
- // avalon switch
+ // test switch
//
options.addOption(
- new Option( "Xavalon", REZ.getString( "cli-avalon-description" ) )
);
+ new Option( "test", REZ.getString( "cli-test-description" ) ) );
//
- // other
+ // avalon switch
//
options.addOption(
- new Option( "test", "metro test cycle" ) );
+ new Option( "Xavalon", REZ.getString( "cli-avalon-description" ) )
);
return options;
}
@@ -521,9 +521,13 @@
private String[] getLoadArguments( String arg )
{
if( null == arg )
- return new String[0];
+ {
+ return new String[0];
+ }
if( arg.indexOf( "," ) == -1 )
- return new String[]{ arg };
+ {
+ return new String[]{ arg };
+ }
ArrayList list = new ArrayList();
StringTokenizer tokenizer = new StringTokenizer( arg, "," );
while( tokenizer.hasMoreTokens() )
@@ -537,9 +541,9 @@
* Load all properties file from the standard locations. Standard
* locations in priority order include:
* <ul>
- * <li>${user.dir}/dpml.properties</li>
- * <li>${user.home}/dpml.properties</li>
- * <li>${dpml.home}/dpml.properties</li>
+ * <li>${user.dir}/metro.properties</li>
+ * <li>${user.home}/metro.properties</li>
+ * <li>${dpml.home}/data/metro/metro.properties</li>
* </ul>
* @return the aggregated properties
*/
@@ -549,23 +553,25 @@
{
File home = Transit.DPML_HOME;
Properties properties = getStaticProperties();
- File homePreferenceFile = new File( home, DPML_PROPERTIES );
- loadFile( properties, homePreferenceFile );
+
+ File metro = getMetroPreferencesDirectory();
+ File metroPreferenceFile = new File( metro, METRO_PROPERTIES );
+ loadFile( properties, metroPreferenceFile );
//
- // get ${user.home}/[key].properties
+ // get ${user.home}/metro.properties
//
File user = getUserDirectory();
- File userPreferenceFile = new File( user, DPML_PROPERTIES );
+ File userPreferenceFile = new File( user, METRO_PROPERTIES );
loadFile( properties, userPreferenceFile );
//
- // get ${user.dir}/[key].properties
+ // get ${user.dir}/metro.properties
//
File dir = getWorkingDirectory();
- File dirPreferenceFile = new File( dir, DPML_PROPERTIES );
+ File dirPreferenceFile = new File( dir, METRO_PROPERTIES );
loadFile( properties, dirPreferenceFile );
properties.setProperty( Transit.HOME_KEY, home.toString() );
@@ -594,7 +600,7 @@
{
Properties bootstrap = new Properties();
InputStream input =
- Metro.class.getClassLoader().getResourceAsStream( DPML_PROPERTIES
);
+ Metro.class.getClassLoader().getResourceAsStream( METRO_PROPERTIES
);
if( input != null )
{
bootstrap.load( input );
@@ -602,6 +608,13 @@
return bootstrap;
}
+ private static File getMetroPreferencesDirectory()
+ {
+ File home = Transit.DPML_HOME;
+ File data = new File( home, "preferences" );
+ return new File( data, "metro" );
+ }
+
private static File getUserDirectory()
{
return new File( System.getProperty( "user.home" ) );
Modified:
development/main/metro/main/src/main/net/dpml/metro/Resources.properties
==============================================================================
--- development/main/metro/main/src/main/net/dpml/metro/Resources.properties
(original)
+++ development/main/metro/main/src/main/net/dpml/metro/Resources.properties
Sat Apr 16 08:28:15 2005
@@ -13,4 +13,4 @@
cli-server-description=Run the controller as a server (default)
cli-execute-description=On completion of deployment initiate a shutdown.
-cli-avalon-description=Include the avalon component api in the root
container classloader.
+cli-test-description=Run with the freight-train engine.
- svn commit: r2291 - in development/main/metro/main: etc/deliverables etc/main src/main/net/dpml/metro, mcconnell, 04/15/2005
Archive powered by MHonArc 2.6.24.