Avoid packaging resources jar in the ApplicationMaster, so that the logback.xml in it doesn't affect the AM.

This closes #31 from GitHub.

Signed-off-by: Ali Anwar <anwar1@berkeley.edu>
diff --git a/twill-core/src/main/java/org/apache/twill/launcher/TwillLauncher.java b/twill-core/src/main/java/org/apache/twill/launcher/TwillLauncher.java
index 8287947..a5052b3 100644
--- a/twill-core/src/main/java/org/apache/twill/launcher/TwillLauncher.java
+++ b/twill-core/src/main/java/org/apache/twill/launcher/TwillLauncher.java
@@ -96,10 +96,14 @@
     });
 
     // Add the app jar, resources jar and twill jar directories to the classpath as well
-    for (File dir : Arrays.asList(appJarDir, resourceJarDir, twillJarDir)) {
+    for (File dir : Arrays.asList(appJarDir, twillJarDir)) {
       urls.add(dir.toURI().toURL());
       urls.add(new File(dir, "classes").toURI().toURL());
-      urls.add(new File(dir, "resources").toURI().toURL());
+    }
+
+    // this indicates that we are not in the ApplicationMaster
+    if (useClassPath) {
+      urls.add(new File(resourceJarDir, "resources").toURI().toURL());
     }
 
     // Add all lib jars