notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2781 - development/main/transit/core/handler/src/main/net/dpml/transit
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2781 - development/main/transit/core/handler/src/main/net/dpml/transit
- Date: Tue, 07 Jun 2005 17:01:02 -0400
Author: mcconnell AT dpml.net
Date: Tue Jun 7 17:01:00 2005
New Revision: 2781
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
Log:
remove item cause grief for peter
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
Tue Jun 7 17:01:00 2005
@@ -18,18 +18,6 @@
package net.dpml.transit;
-import net.dpml.transit.adapter.Adapter;
-import net.dpml.transit.adapter.CacheMonitorAdapter;
-import net.dpml.transit.adapter.LoggingAdapter;
-import net.dpml.transit.adapter.NetworkMonitorAdapter;
-import net.dpml.transit.adapter.RepositoryMonitorAdapter;
-import net.dpml.transit.artifact.Artifact;
-import net.dpml.transit.monitors.CacheMonitor;
-import net.dpml.transit.monitors.Monitor;
-import net.dpml.transit.monitors.NetworkMonitor;
-import net.dpml.transit.monitors.RepositoryMonitor;
-import net.dpml.transit.util.Dictionary;
-
import java.io.File;
import java.io.FileInputStream;
import java.net.URI;
@@ -43,6 +31,18 @@
import java.util.logging.LogManager;
import java.util.prefs.Preferences;
+import net.dpml.transit.adapter.Adapter;
+import net.dpml.transit.adapter.CacheMonitorAdapter;
+import net.dpml.transit.adapter.LoggingAdapter;
+import net.dpml.transit.adapter.NetworkMonitorAdapter;
+import net.dpml.transit.adapter.RepositoryMonitorAdapter;
+import net.dpml.transit.artifact.Artifact;
+import net.dpml.transit.monitors.CacheMonitor;
+import net.dpml.transit.monitors.Monitor;
+import net.dpml.transit.monitors.NetworkMonitor;
+import net.dpml.transit.monitors.RepositoryMonitor;
+import net.dpml.transit.util.Dictionary;
+
/**
* CLI hander for the transit package.
*
@@ -51,20 +51,6 @@
*/
public final class Main
{
-
//--------------------------------------------------------------------------
- // static utilities for setup of logging manager
-
//--------------------------------------------------------------------------
-
- /**
- * The key used to declare the custom logging configuration handler class.
- */
- private static final String LOG_CONFIG_CLASS_KEY =
"java.util.logging.config.class";
- static
- {
- System.setProperty( LOG_CONFIG_CLASS_KEY,
- System.getProperty( LOG_CONFIG_CLASS_KEY,
- "net.dpml.transit.logging.ConfigurationHandler" ) );
- }
/**
* The transit uri.
@@ -149,58 +135,10 @@
}
//
- // check if a prefs reset has been requested
- //
-
- for( int i=0; i < args.length; i++ )
- {
- String arg = args[i];
- if( arg.equals( "-reset" ) )
- {
- try
- {
- Preferences prefs = Preferences.systemNodeForPackage(
Main.class );
- logger.info( "Resetting: " + prefs );
- prefs.removeNode();
- }
- catch( Throwable e )
- {
- logger.log( Level.SEVERE, "System preferences reset
failure.", e );
- }
- try
- {
- Preferences prefs = Preferences.userNodeForPackage(
Main.class );
- logger.info( "Resetting: " + prefs );
- prefs.removeNode();
- }
- catch( Throwable e )
- {
- logger.log( Level.SEVERE, "User preferences reset
failure.", e );
- }
- }
- }
-
- //
- // check if a prefs are enabled (default is false)
- //
-
- boolean interactive = args.length == 0; // doubleclick on jar file
-
- for( int i=0; i < args.length; i++ )
- {
- String arg = args[i];
- if( arg.equals( "-prefs" ) || arg.equals( "-manager" ) ||
interactive )
- {
- System.setProperty( "dpml.transit.preferences.enabled",
"true" );
- }
- }
-
- //
// setup transit
//
Transit transit = Transit.getInstance();
-
Adapter adapter = new LoggingAdapter();
RepositoryMonitor repoMonitor = new RepositoryMonitorAdapter(
adapter );
CacheMonitor cacheMonitor = new CacheMonitorAdapter( adapter );
@@ -256,7 +194,7 @@
path = BOOTSTRAP_URI;
}
- String[] arguments = collapseArgs( interactive, args );
+ String[] arguments = collapseArgs( args );
URI uri = Artifact.createArtifact( path ).toURI();
Map data = new Hashtable();
@@ -281,12 +219,8 @@
* @param args the commandline args
* @return the applications arugments
*/
- private static String[] collapseArgs( boolean interactive, String[] args
)
+ private static String[] collapseArgs( String[] args )
{
- if( interactive )
- {
- return new String[]{ "-manager" };
- }
ArrayList list = new ArrayList();
for( int i=0; i < args.length; i++ )
{
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/Transit.java
Tue Jun 7 17:01:00 2005
@@ -28,8 +28,6 @@
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
-import java.util.prefs.Preferences;
-
import net.dpml.lang.NullArgumentException;
import net.dpml.transit.monitors.Monitor;
- svn commit: r2781 - development/main/transit/core/handler/src/main/net/dpml/transit, mcconnell, 06/07/2005
Archive powered by MHonArc 2.6.24.