For completeness, I have created a GROOVY issue for this, just to have
it reported in case somebody else stumbles into this behavior:
https://issues.apache.org/jira/browse/GROOVY-8108
Paul King wrote:
> Is there a reason you don't want to use:
>
> @GrabConfig(systemClassLoader=true)
>
> along with your @Grab?
Actually, it looks like I found a reason that really makes this
no option: It apparently does not work in a web container, tried
in a Tomcat (8.0) and an embedded Jetty.
Correction:
if (args.containsKey("classLoader") && args.get("classLoader") !=
ClassLoader.getSystemClassLoader()) {
not:
if (args.containsKey("classLoader") && args.get("classLoader" !=
ClassLoader.getSystemClassLoader())) {
I was not aware of that option, that's already better :)
... but I am not sure if it goes far enough, as follows.
I have two use cases, both involving Grengine.
The more immediate one is a webapp with a single Grengine instance based
on a set of Groovy script files and so far it is the only web
Is there a reason you don't want to use:
@GrabConfig(systemClassLoader=true)
along with your @Grab?
On Mon, Feb 27, 2017 at 7:51 PM, Alain Stalder wrote:
> Maybe someone can point me in the right direction regarding the following
> issue with Grape...
>
> Issue in code (in words further below):
Tonight I got this to load the EmailException class a few times without
any changes to the source - so it must be a race condition.
I guess the static initializer at the bottom is a call to
Grape#grab(Map dependency) with the effect of adding the
commons-email JAR to the classpath.
And I gue
PS: Below is what I get when I look at the Demo.class with the "JD"
decompiler...
Is this maybe some kind of Grape concurrency issue similar to GROOVY-7407?
https://issues.apache.org/jira/browse/GROOVY-7407
(I still get the same result when I am applying the workaround listed
there - which
Maybe someone can point me in the right direction regarding the
following issue with Grape...
Issue in code (in words further below):
--
import org.codehaus.groovy.control.CompilerConfiguration
def demoScriptText = """\
@Grab('org.apache.commons:commons-email:1.3.3')
import org.apache.commons.