[jboss-cvs] JBossAS SVN: r95122 - projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 19 12:05:31 EDT 2009
Author: alesj
Date: 2009-10-19 12:05:31 -0400 (Mon, 19 Oct 2009)
New Revision: 95122
Modified:
projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/IndexerTask.java
projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/Main.java
Log:
Use UCL.
Modified: projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/IndexerTask.java
===================================================================
--- projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/IndexerTask.java 2009-10-19 16:02:48 UTC (rev 95121)
+++ projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/IndexerTask.java 2009-10-19 16:05:31 UTC (rev 95122)
@@ -29,6 +29,7 @@
import java.io.File;
import java.io.IOException;
import java.net.URL;
+import java.net.URLClassLoader;
import java.util.StringTokenizer;
import org.apache.tools.ant.BuildException;
@@ -202,7 +203,9 @@
Main m = new Main();
AnnotationScanner as = AnnotationScannerFactory.getStrategy(AnnotationScannerFactory.JAVA_LANG_REFLECT);
- AnnotationRepository ari = as.scan(new URL[] {input.toURI().toURL()});
+ URL[] urls = {input.toURI().toURL()};
+ URLClassLoader ucl = new URLClassLoader(urls);
+ AnnotationRepository ari = as.scan(urls, ucl);
if (excludeAll)
{
Modified: projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/Main.java
===================================================================
--- projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/Main.java 2009-10-19 16:02:48 UTC (rev 95121)
+++ projects/annotations/branches/AnnEnv/indexer/src/main/java/org/jboss/papaki/indexer/Main.java 2009-10-19 16:05:31 UTC (rev 95122)
@@ -31,6 +31,7 @@
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.net.URL;
+import java.net.URLClassLoader;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPOutputStream;
@@ -105,7 +106,9 @@
File destination = new File(root, "META-INF");
AnnotationScanner as = AnnotationScannerFactory.getStrategy(AnnotationScannerFactory.JAVA_LANG_REFLECT);
- AnnotationRepository ari = as.scan(new URL[] {input.toURI().toURL()});
+ URL[] urls = {input.toURI().toURL()};
+ URLClassLoader ucl = new URLClassLoader(urls);
+ AnnotationRepository ari = as.scan(urls, ucl);
m.store(ari, destination);
More information about the jboss-cvs-commits
mailing list