groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject Re: rm servlet-api.jar?
Date Tue, 10 Jan 2017 07:26:01 GMT
Le 10 janv. 2017 01:44, "Jochen Theodorou" <> a écrit :

On 06.01.2017 10:54, Romain Manni-Bucau wrote:

> Hi guys,
> Using groovy bundle (export PATH=$GROOVY_HOME/bin:$PATH) I often hit a
> blocker: servlet-api is there. It means that if you use tomcat you will
> use the wrong servlet api and get some troubles (missing message bundle,
> wrong version etc...).
> It can be overriden with setting up a custom groovy-starter.conf and
> setting the system property groovy.starter.conf.override but this is not
> very convenient.
> How to get rid of most of convenient dependencies from groovy/lib?
> Idea can be to use grapes to resolve them later when needed from groovy
> classloader(s) which makes it quite dynamic but a simpler solution can
> also be to have some profile and add them in the cli to control the
> classpath like:
> ./bin/groovy --light myscript.groovy
> ./bin/groovy --all myscript.groovy

wouldn´t it be better to be able to set the configuration in a more
convenient way?

Hmm, proposed this way cause it was tthe most convenient for me (light and
fluent on the CLI)

> etc
> With this last option we need to define which profiles we want and also
> if we want to have a regex support:
> ./bin/groovy --root-loader={groovy.home}/lib/*.jar myscript.groovy
> any thoughts on this?

I think * and ** are supported in the starter configurations. Does it have
to be on the command line?

Yes it does but you need to share a starter.conf + a command line as a
framework. Not very user friendly.

Thinking to it wonder if grapes shouldnt be able to handle it. Until you
execute the script you didnt load these polluting classes/jar so you should
be able to remove them from the classloader or at least exclude the classes
just throwing ClassNotFoundException from the RootLoader.

bye Jochen

View raw message