Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1308 - development/main/magic/core/src/main/net/dpml/magic/tasks

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT netcompartner.com
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1308 - development/main/magic/core/src/main/net/dpml/magic/tasks
  • Date: Mon, 27 Dec 2004 06:14:21 +0100

Author: niclas
Date: Mon Dec 27 06:14:21 2004
New Revision: 1308

Modified:

development/main/magic/core/src/main/net/dpml/magic/tasks/InitializeTask.java
Log:
Added Classloader printout (in comments) for future use.

Modified:
development/main/magic/core/src/main/net/dpml/magic/tasks/InitializeTask.java
==============================================================================
---
development/main/magic/core/src/main/net/dpml/magic/tasks/InitializeTask.java
(original)
+++
development/main/magic/core/src/main/net/dpml/magic/tasks/InitializeTask.java
Mon Dec 27 06:14:21 2004
@@ -18,6 +18,7 @@
package net.dpml.magic.tasks;

import java.net.URI;
+import java.net.*;

import net.dpml.magic.model.Definition;
import net.dpml.magic.model.Resource;
@@ -45,7 +46,6 @@
// if the project declares plugin dependencies then install
// these now
//
-
final Definition def = getDefinition();
final ResourceRef[] refs = def.getPluginRefs();
for( int i=0; i<refs.length; i++ )
@@ -64,7 +64,6 @@
throw new NullPointerException( "spec" );
}
log( "loading: " + spec );
-
try
{
URI uri = new URI( spec );
@@ -74,9 +73,11 @@
{
String urn = plugin.getURN();
Object task = getProject().createTask(
"antlib:net.dpml.magic:plugin" );
- int hashCode = System.identityHashCode(task.getClass());
- int pluginTaskCode =
System.identityHashCode(PluginTask.class);
- log ("created task hascode: " + hashCode + ",
PluginTask.class hashCode: " + pluginTaskCode);
+// System.out.println( "------------- Loaded PluginTask
--------------" );
+// printClassLoaderURLs( task.getClass().getClassLoader() );
+// System.out.println( "------------- Resident PluginTask
--------------" );
+// printClassLoaderURLs( PluginTask.class.getClassLoader() );
+// System.out.println(
"--------------------------------------------------" );
PluginTask p =(PluginTask) task;
p.init();
p.setUri( spec );
@@ -117,4 +118,29 @@
throw new BuildException( error, e );
}
}
+/*
+ private void printClassLoaderURLs( ClassLoader cl )
+ {
+ if( cl == null )
+ return;
+ if( cl instanceof URLClassLoader )
+ {
+ URLClassLoader ucl = (URLClassLoader) cl;
+ URL[] urls = ucl.getURLs();
+ System.out.print( " * " + ucl + " : " );
+ for( int i=0 ; i < urls.length ; i++ )
+ {
+ if( i != 0 )
+ System.out.print( ", " );
+ System.out.print( urls[i] );
+ }
+ System.out.println();
+ }
+ else
+ {
+ log( "Unable to print the URL for classloader " +
cl.getClass().getName() );
+ }
+ printClassLoaderURLs( cl.getParent() );
+ }
+*/
}



  • svn commit: r1308 - development/main/magic/core/src/main/net/dpml/magic/tasks, niclas, 12/27/2004

Archive powered by MHonArc 2.6.24.

Top of Page