Commits

Ed Brannin  committed a8b887f

Changed the main package to com.edbrannin.grinder; passing arguments to Grinder/Console.main()

  • Participants
  • Parent commits ce6bc94

Comments (0)

Files changed (3)

 						<manifest>
 							<addClasspath>true</addClasspath>
 				            <classpathPrefix>lib/</classpathPrefix>
-							<mainClass>com.thomsonreuters.cmg.ean.App</mainClass>
+							<mainClass>com.edbrannin.grinder.App</mainClass>
 						</manifest>
 					</archive>
 				</configuration>

File src/main/java/com/edbrannin/grinder/App.java

+package com.edbrannin.grinder;
+
+import net.grinder.Console;
+import net.grinder.Grinder;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+    public static void main( String[] args )
+    {
+        String[] subArgs = new String[] { System.getProperty("grinder.propfile", "grinder.properties")};
+        if (args.length > 0 && args[0].equalsIgnoreCase("agent")) {
+            Grinder.main(subArgs);
+        } else {
+            Console.main(subArgs);
+        }
+    }
+}

File src/main/java/com/thomsonreuters/cmg/ean/App.java

-package com.thomsonreuters.cmg.ean;
-
-import net.grinder.Console;
-import net.grinder.Grinder;
-
-/**
- * Hello world!
- *
- */
-public class App 
-{
-    public static void main( String[] args )
-    {
-        
-        if (args.length > 0 && args[0].equalsIgnoreCase("agent")) {
-            Grinder.main(new String[0]);
-        } else {
-            Console.main(new String[0]);
-        }
-    }
-}