notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
r1064 - in trunk/main: depot/tools/builder/src/main/net/dpml/tools/tasks transit/core/src/main/net/dpml/transit
- From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
- To: notify-dpml AT lists.ibiblio.org
- Subject: r1064 - in trunk/main: depot/tools/builder/src/main/net/dpml/tools/tasks transit/core/src/main/net/dpml/transit
- Date: Fri, 10 Feb 2006 01:56:27 +0100
Author: mcconnell
Date: 2006-02-10 01:55:50 +0100 (Fri, 10 Feb 2006)
New Revision: 1064
Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PluginExportTask.java
trunk/main/transit/core/src/main/net/dpml/transit/Category.java
trunk/main/transit/core/src/main/net/dpml/transit/Plugin.java
trunk/main/transit/core/src/main/net/dpml/transit/PropertiesPlugin.java
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
Log:
remove native stuff (needs to be addressed via Station not a Transit)
Modified:
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PluginExportTask.java
===================================================================
---
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PluginExportTask.java
2006-02-09 01:58:11 UTC (rev 1063)
+++
trunk/main/depot/tools/builder/src/main/net/dpml/tools/tasks/PluginExportTask.java
2006-02-10 00:55:50 UTC (rev 1064)
@@ -121,16 +121,6 @@
*/
public static final String ARTIFACT_PRIVATE = "dpml.artifact.dependency";
- /**
- * The constant artifact native w32 dependencies.
- */
- public static final String ARTIFACT_NATIVE_W32 =
"dpml.artifact.native.w32";
-
- /**
- * The constant artifact native nix dependencies.
- */
- public static final String ARTIFACT_NATIVE_NIX =
"dpml.artifact.native.nix";
-
//
------------------------------------------------------------------------
// state
//
------------------------------------------------------------------------
@@ -344,22 +334,6 @@
private void writeClasspath( final Writer writer )
throws Exception
{
- Resource[] w32Resources = getResource().getClasspathProviders(
Category.W32 );
- if( w32Resources.length > 0 )
- {
- final String label = "Native W32 dependencies.";
- final String lead = ARTIFACT_NATIVE_W32;
- writeRefs( writer, w32Resources, lead, label );
- }
-
- Resource[] nixResources = getResource().getClasspathProviders(
Category.NIX );
- if( nixResources.length > 0 )
- {
- final String label = "Native NIX dependencies.";
- final String lead = ARTIFACT_NATIVE_NIX;
- writeRefs( writer, nixResources, lead, label );
- }
-
Resource[] systemResources = getResource().getClasspathProviders(
Category.SYSTEM );
if( systemResources.length > 0 )
{
Modified: trunk/main/transit/core/src/main/net/dpml/transit/Category.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/Category.java
2006-02-09 01:58:11 UTC (rev 1063)
+++ trunk/main/transit/core/src/main/net/dpml/transit/Category.java
2006-02-10 00:55:50 UTC (rev 1064)
@@ -50,20 +50,10 @@
public static final Category PRIVATE = new Category( "private", 3 );
/**
- * Native category.
- */
- public static final Category W32 = new Category( "w32", 4 );
-
- /**
- * Native category.
- */
- public static final Category NIX = new Category( "nix", 5 );
-
- /**
* Array of scope enumeration values.
*/
private static final Category[] ENUM_VALUES =
- new Category[]{SYSTEM, PUBLIC, PROTECTED, PRIVATE, W32, NIX};
+ new Category[]{SYSTEM, PUBLIC, PROTECTED, PRIVATE};
/**
* Returns an array of activation enum values.
@@ -118,14 +108,6 @@
{
return PRIVATE;
}
- else if( value.equalsIgnoreCase( "w32" ) )
- {
- return W32;
- }
- else if( value.equalsIgnoreCase( "nix" ) )
- {
- return NIX;
- }
else
{
final String error =
Modified: trunk/main/transit/core/src/main/net/dpml/transit/Plugin.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/Plugin.java
2006-02-09 01:58:11 UTC (rev 1063)
+++ trunk/main/transit/core/src/main/net/dpml/transit/Plugin.java
2006-02-10 00:55:50 UTC (rev 1064)
@@ -70,13 +70,6 @@
URI[] getDependencies( Category key );
/**
- * Return the native dependencies
- *
- * @return the uris to native libraries
- */
- URI[] getNativeDependencies();
-
- /**
* Return the aggregated set of dependency uris.
*
* @return the dependency artifacts
Modified:
trunk/main/transit/core/src/main/net/dpml/transit/PropertiesPlugin.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/PropertiesPlugin.java
2006-02-09 01:58:11 UTC (rev 1063)
+++ trunk/main/transit/core/src/main/net/dpml/transit/PropertiesPlugin.java
2006-02-10 00:55:50 UTC (rev 1064)
@@ -73,16 +73,6 @@
static final String PP_IMP_KEY = "dpml.artifact.dependency";
/**
- * key to designate w32 native libraries
- */
- static final String PP_NATIVE_W32_KEY = "dpml.artifact.native.w32";
-
- /**
- * key to designate nix native libraries
- */
- static final String PP_NATIVE_NIX_KEY = "dpml.artifact.native.nix";
-
- /**
* key to designate the plugin classname.
*/
static final String PP_FACTORY_KEY = "dpml.plugin.class";
@@ -152,16 +142,6 @@
private final URI[] m_imp;
/**
- * The set of uris representing the native w32 libraries.
- */
- private final URI[] m_w32;
-
- /**
- * The set of uris representing the native nix libraries.
- */
- private final URI[] m_nix;
-
- /**
* Plugin group.
*/
private final String m_group;
@@ -240,8 +220,6 @@
m_uri = Artifact.createArtifact( m_group, m_name, m_version,
"plugin" ).toURI();
- m_w32 = buildDependents( attributes, PP_NATIVE_W32_KEY );
- m_nix = buildDependents( attributes, PP_NATIVE_NIX_KEY );
m_sys = buildDependents( attributes, PP_SYS_KEY );
m_api = buildDependents( attributes, PP_API_KEY );
m_spi = buildDependents( attributes, PP_SPI_KEY );
@@ -377,10 +355,6 @@
*/
public URI[] getDependencies( Category key )
{
- //if( key == Category.ANY )
- //{
- // return getDependencies();
- //}
if( key == Category.SYSTEM )
{
return m_sys;
@@ -406,23 +380,6 @@
}
/**
- * Return the native dependencies
- *
- * @return the uris to native libraries
- */
- public URI[] getNativeDependencies()
- {
- if( Environment.isUnix() )
- {
- return m_nix;
- }
- else
- {
- return m_w32;
- }
- }
-
- /**
* Return all dependencies
* @return the set of URIs
*/
Modified:
trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
===================================================================
--- trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-02-09 01:58:11 UTC (rev 1063)
+++ trunk/main/transit/core/src/main/net/dpml/transit/StandardLoader.java
2006-02-10 00:55:50 UTC (rev 1064)
@@ -168,7 +168,6 @@
try
{
getLogger().debug( "loading plugin: " + uri );
- //getMonitor().getPluginRequested( parent, uri, args );
Plugin descriptor = getPluginDescriptor( uri );
ClassLoader classloader = createClassLoader( parent, descriptor
);
String classname = descriptor.getClassname();
@@ -185,8 +184,7 @@
{
Class clazz = loadPluginClass( classloader, classname );
getLogger().debug( "established plugin class: " +
clazz.getName() );
- //getMonitor().establishedPluginClass( clazz );
- return createPlugin( classloader, descriptor, clazz, args );
+ return createPlugin( clazz, args );
}
catch( ClassNotFoundException e )
{
@@ -208,7 +206,6 @@
{
String error = "Unable to create a plugin using [" + uri + "].";
getLogger().error( error, ce );
- //getMonitor().exceptionOccurred( "getPlugin", ce );
throw new InvocationTargetException( ce );
}
}
@@ -308,17 +305,14 @@
/**
* Create a factory using a supplied class and command line arguments.
*
- * @param descriptor the plugin descriptor
- * @param classloader the classloader to be used for plugin creation
* @param clazz the the factory class
* @param args the command line args
* @return the plugin instance
* @exception IOException if a plugin creation error occurs
* @exception InvocationTargetException if a plugin constructor
invocation error occurs
- * @exception NullArgumentException if the any one of supplied
classloader, descriptor,
- * class arguments are null
+ * @exception NullArgumentException if the class or args argument is null
*/
- private Object createPlugin( ClassLoader classloader, Plugin descriptor,
Class clazz, Object[] args )
+ private Object createPlugin( Class clazz, Object[] args )
throws IOException, NullArgumentException, InvocationTargetException
{
if( null == clazz )
@@ -329,23 +323,6 @@
{
throw new NullArgumentException( "args" );
}
- if( null == classloader )
- {
- throw new NullArgumentException( "classloader" );
- }
- if( null == descriptor )
- {
- throw new NullArgumentException( "descriptor" );
- }
- //Object[] params = new Object[ args.length + THREE ];
- //for( int i=0; i < args.length; i++ )
- //{
- // params[i] = args[i];
- //}
- //params[ args.length ] = classloader;
- //params[ args.length + 1 ] = descriptor;
- //params[ args.length + 2 ] = this;
- //return instantiate( clazz, params );
return instantiate( clazz, args );
}
@@ -619,18 +596,6 @@
throw new NullArgumentException( "base" );
}
- // load any native libraries declared by the plugin
-
- URI[] libraries = descriptor.getNativeDependencies();
- for( int i=0; i<libraries.length; i++ )
- {
- URI library = libraries[i];
- File source = (File) library.toURL().getContent( new
Class[]{File.class} );
- String path = source.getCanonicalPath();
- System.load( path );
- getLogger().debug( "loaded library: " + path );
- }
-
URI plugin = descriptor.getURI();
URI[] systemArtifacts = descriptor.getDependencies( Category.SYSTEM
);
- r1064 - in trunk/main: depot/tools/builder/src/main/net/dpml/tools/tasks transit/core/src/main/net/dpml/transit, mcconnell at BerliOS, 02/09/2006
Archive powered by MHonArc 2.6.24.