Skip to content

Commit

Permalink
GRAILS-11129 - improve class path handling
Browse files Browse the repository at this point in the history
Now if additional classpath is provided with something like this...

    grails -classpath /path/to/some/jar run-app

That additional classpath will be used when forking a process.
  • Loading branch information
Jeff Scott Brown committed Jun 10, 2014
1 parent fe1cb6f commit a0872f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ abstract class ForkedGrailsProcess {
GrailsConsole.instance.updateStatus("Running without daemon...")
}
String classpathString = getBoostrapClasspath(executionContext)
String additionalClasspath = System.getProperty('GRAILS_ADDITIONAL_CLASSPATH')
if(additionalClasspath) {
classpathString = classpathString + File.pathSeparator + additionalClasspath
}
List<String> cmd = buildProcessCommand(executionContext, classpathString)

def processBuilder = new ProcessBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public static void rootLoader(String args[]) {
exit("classpath parameter needs argument");
}
lc.addClassPath(args[argsOffset + 1]);
System.setProperty("GRAILS_ADDITIONAL_CLASSPATH", args[argsOffset+1]);
argsOffset += 2;
}
else if (args[argsOffset].equals("--main")) {
Expand Down

0 comments on commit a0872f8

Please sign in to comment.