2727import java .net .URL ;
2828import java .security .AccessController ;
2929import java .security .PrivilegedAction ;
30+ import java .util .ArrayList ;
3031import java .util .List ;
3132
3233import org .apache .commons .io .IOUtils ;
@@ -62,22 +63,18 @@ public static URL[] getJARList() throws MalformedURLException {
6263 } else {
6364 buildDir = new File (baseDir , "build" );
6465 }
65- File fopJar = new File (buildDir , "fop.jar" );
66- if (!fopJar .exists ()) {
67- fopJar = new File (baseDir , "fop.jar" );
68- }
69- if (!fopJar .exists ()) {
70- throw new RuntimeException ("fop.jar not found in directory: "
71- + baseDir .getAbsolutePath () + " (or below)" );
72- }
73- List jars = new java .util .ArrayList ();
74- jars .add (fopJar .toURI ().toURL ());
75- File [] files ;
66+ List jars = new ArrayList ();
7667 FileFilter filter = new FileFilter () {
7768 public boolean accept (File pathname ) {
7869 return pathname .getName ().endsWith (".jar" );
7970 }
8071 };
72+ File [] files = buildDir .listFiles (filter );
73+ if (files != null ) {
74+ for (File file : files ) {
75+ jars .add (file .toURI ().toURL ());
76+ }
77+ }
8178 File libDir = new File (baseDir , "lib" );
8279 if (!libDir .exists ()) {
8380 libDir = baseDir ;
@@ -97,12 +94,7 @@ public boolean accept(File pathname) {
9794 }
9895 }
9996 }
100- URL [] urls = (URL [])jars .toArray (new URL [jars .size ()]);
101- /*
102- for (int i = 0, c = urls.length; i < c; i++) {
103- System.out.println(urls[i]);
104- }*/
105- return urls ;
97+ return (URL [])jars .toArray (new URL [jars .size ()]);
10698 }
10799
108100 /**
0 commit comments