Open czellweg opened 10 years ago
Without digging into it, my guess is that it's something that is not supported by Grails. I say this, because the plugin is not doing anything special here. It is setting up the classpath path and then launching Grails in a separate JVM.
The first thing I would try is to create your JAR file and then create a plain Grails app (without Gradle), add the jar in BuildConfig.groovy
to the compile dependencies and see if you can use them in dev mode.
You can also verify your classpaths by adding something like this to your build file:
run { //or 'grails-run-app' depending on which one you're using
doFirst {
logClasspaths()
}
}
John, thanks for your quick reply.
Logging the classpath reveals that the needed jar is on the runtime classpath (which is what is needed). Seeing that tomcat is used and that I've specified servlet 3.0, I would assume that, at the very least, the resources under META-INF/resources are made available to Grails. That doesn't seem to be the case though.
I might ask the guys from Grails then. Thank you for your help!
Hey guys
I'm not quite sure whether my issue is on the grails-gradle-plugin side, the grails side, my configuration or a bit of everything so maybe you can help out.
We want to have our js/html resources (Angular) in a separate project (web-js-html) which is a dependee of the main grails app (web-grails). To be specific: we want to refactor out the contents of web-grails/web-app However, when in dev mode, i.e. starting the grails app using 'gradle grails-run-app', the dependent project with those resources doesn't seem to be available on the classpath.
The following are oul build.gradle files:
In my - maybe naive - understanding, I would assume that the resources in web-js-html will be available on the web-grails classpath. However, this is not the case.
If I package the web-grails app and deploy it to a standalone Tomcat, it works fine as the resources are bundled in a jar under the META-INF/resources which will be available through the servlet 3.0 contrainer, i.e. they're on the classpath.
Could this be an issue of the grails-gradle-plugin or is it an issue on the Grails side?
Thanks in advance for your opinion.