Skip to content

Commit

Permalink
fix for GRAILS-10768 “console: setTargetDirectory() throws exception …
Browse files Browse the repository at this point in the history
…after creating first domain model”
  • Loading branch information
graemerocher committed Nov 13, 2013
1 parent f85204c commit f66dae9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ class GrailsProjectCompiler extends BaseSettingsApi{
* Compiles plugin and normal sources
*/
void compileAll() {
if(config == null) {
configureClasspath()
}

if (buildSettings.forkSettings.compile && !Environment.isFork()) {
def forkedCompiler = new ForkedGrailsCompiler(buildSettings)
def forkConfig = buildSettings.forkSettings.compile
Expand Down Expand Up @@ -265,6 +269,9 @@ class GrailsProjectCompiler extends BaseSettingsApi{
* @param targetDir The target directory to compile to
*/
void compile(targetDir) {
if(config == null) {
configureClasspath()
}

def compilerPaths = { String classpathId ->
for (srcPath in srcDirectories) {
Expand Down Expand Up @@ -309,6 +316,9 @@ class GrailsProjectCompiler extends BaseSettingsApi{
* @param targetDir The target directory to compile to
*/
void compilePlugins(targetDir) {
if(config == null) {
configureClasspath()
}
def classesDirPath = targetDir
getAnt().mkdir(dir:classesDirPath)

Expand Down
2 changes: 1 addition & 1 deletion scripts/Console.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ target(console: "Load the Grails interactive Swing console") {
def forkConfig = forkSettings?.console


projectCompiler.compileAll()
packageApp()
if (forkConfig == false || forkConfig == 'false') {
try {

Expand Down

0 comments on commit f66dae9

Please sign in to comment.