Skip to content

Commit db95b80

Browse files
author
graeme
committed
fix for GRAILS-1639
git-svn-id: https://svn.codehaus.org/grails/trunk@5765 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d
1 parent d83f701 commit db95b80

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

scripts/InstallPlugin.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ or
4545
target ( "default" : "Installs a plug-in for the given URL or name and version") {
4646
depends(checkVersion)
4747

48-
installPlugin()
48+
installPlugin()
49+
compile()
4950
}
5051

5152
target(cachePlugin:"Implementation target") {

src/commons/org/codehaus/groovy/grails/cli/GrailsScriptRunner.groovy

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,11 @@ Grails home is set to: ${grailsHome}
7171
println "Base Directory: ${baseDir.absolutePath}"
7272

7373
def rootLoader = getClass().classLoader ? getClass().classLoader.rootLoader : Thread.currentThread().getContextClassLoader().rootLoader
74-
75-
/*def appDir = new File("${baseDir.absolutePath}/grails-app")
76-
Adding the grails-app folders to the root loader causes re-load issues as
77-
root loader returns old class before the grails GCL attempts to recompile it
78-
if(appDir.exists()) {
79-
appDir.eachDir { dir ->
80-
rootLoader?.addURL(dir.toURL())
81-
}
82-
}*/
83-
74+
def baseName = new File(baseDir.absolutePath).name
75+
def classesDir = new File("${userHome}/.grails/${grailsVersion}/projects/${baseName}/classes")
76+
if(classesDir.exists()) {
77+
rootLoader.addURL(classesDir.toURL())
78+
}
8479
def allArgs = args[0].trim()
8580

8681
allArgs = processSystemArguments(allArgs).trim().split(" ")

0 commit comments

Comments
 (0)