Package scala_maven_executions
Class MainHelper
java.lang.Object
scala_maven_executions.MainHelper
Helper methods
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendUrltoClasspathCollection
(ClassLoader cl, Collection<String> classpath) static File
createArgFile
(List<String> args) Creates a file containing all the arguments.private static String
Escapes arguments as necessary so the StringTokenizer for scala arguments pulls in filenames with spaces correctly.static String[]
static String[]
static String
readArgFile
(File argFile) Creates a file containing all the arguments.static void
runMain
(String mainClassName, List<String> args, ClassLoader cl) Runs the main method of a java classstatic String
static String
toMultiPath
(String[] paths) static String
toMultiPath
(List<String> paths) private static String
UnEscapes arguments as necessary so the StringTokenizer for scala arguments pulls in filenames with spaces correctly.
-
Field Details
-
argFilePrefix
- See Also:
-
argFileSuffix
- See Also:
-
-
Constructor Details
-
MainHelper
public MainHelper()
-
-
Method Details
-
toMultiPath
-
toMultiPath
-
findFiles
-
findFiles
-
toClasspathString
- Throws:
Exception
-
appendUrltoClasspathCollection
public static void appendUrltoClasspathCollection(ClassLoader cl, Collection<String> classpath) throws Exception - Throws:
Exception
-
escapeArgumentForScalacArgumentFile
Escapes arguments as necessary so the StringTokenizer for scala arguments pulls in filenames with spaces correctly.- Parameters:
arg
-- Returns:
-
unescapeArgumentForScalacArgumentFile
UnEscapes arguments as necessary so the StringTokenizer for scala arguments pulls in filenames with spaces correctly.- Parameters:
arg
-- Returns:
-
createArgFile
Creates a file containing all the arguments. This file has a very simple format of argument (white-space argument).- Returns:
- Throws:
IOException
-
readArgFile
Creates a file containing all the arguments. This file has a very simple format of argument (white-space argument).- Returns:
- Throws:
IOException
-
runMain
public static void runMain(String mainClassName, List<String> args, ClassLoader cl) throws Exception Runs the main method of a java class- Throws:
Exception
-
locateJar
- Throws:
Exception
-