groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kohányi Róbert (JIRA) <j...@apache.org>
Subject [jira] [Commented] (GROOVY-5727) Ovverriding 3rd Party libraries shipped
Date Fri, 15 Apr 2016 20:39:25 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-5727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15243551#comment-15243551
] 

Kohányi Róbert commented on GROOVY-5727:
----------------------------------------

Well, as for me, I don't mind if Groovy ships with 3rd party JARs if it makes use of them
(I guess that's the point of the third party JARs in the first place). But, those JARs should
not be exposed to the ClassLoader supplied to scripts/applications. Or, if somebody uses Grape
to download a dependency then that should be somehow prioritised over the existing 3rd party
libs, but this seems more complicated to achieve than the former version (omitting these classes/JARs
from the ClassLoader).

For the sake of completeness I have the following Groovy version: {{Groovy Version: 2.4.6
JVM: 1.8.0_74 Vendor: Oracle Corporation OS: Mac OS X}} and with this the following list of
JARs are being shipped

{code}
ant-1.9.4.jar
ant-antlr-1.9.4.jar
ant-junit-1.9.4.jar
ant-launcher-1.9.4.jar
bsf-2.4.0.jar
commons-cli-1.2.jar
commons-logging-1.2.jar
gpars-1.2.1.jar
groovy-2.4.6.jar
groovy-ant-2.4.6.jar
groovy-bsf-2.4.6.jar
groovy-console-2.4.6.jar
groovy-docgenerator-2.4.6.jar
groovy-groovydoc-2.4.6.jar
groovy-groovysh-2.4.6.jar
groovy-jmx-2.4.6.jar
groovy-json-2.4.6.jar
groovy-jsr223-2.4.6.jar
groovy-nio-2.4.6.jar
groovy-servlet-2.4.6.jar
groovy-sql-2.4.6.jar
groovy-swing-2.4.6.jar
groovy-templates-2.4.6.jar
groovy-test-2.4.6.jar
groovy-testng-2.4.6.jar
groovy-xml-2.4.6.jar
groovy.icns
hamcrest-core-1.3.jar
ivy-2.4.0.jar
jansi-1.11.jar
jcommander-1.47.jar
jline-2.12.jar
jsp-api-2.0.jar
jsr166y-1.7.0.jar
junit-4.12.jar
multiverse-core-0.7.0.jar
qdox-1.12.1.jar
servlet-api-2.4.jar
testng-6.8.13.jar
xmlpull-1.1.3.1.jar
xstream-1.4.7.jar
{code}

Which of these should not be shipped with Groovy I have no idea whatsoever. Whichever isn't
used by Groovy at all is a good candidate to omit I guess.

> Ovverriding 3rd Party libraries shipped
> ---------------------------------------
>
>                 Key: GROOVY-5727
>                 URL: https://issues.apache.org/jira/browse/GROOVY-5727
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Groovysh
>    Affects Versions: 2.0.4
>            Reporter: deas
>              Labels: contrib
>
> Groovy 2.0.4 ships various 3rd party libraries, e.g. servlet-api-2.4.jar and jsp-api-2.0.jar.
These can get in the way and I see no reasonable way to use user defined versions in groovysh.
Of course you can introduce a custom classloader searching locally before delegating to the
parent or just remove the library shipped to get it out of the way, but I feel there should
be a groovier way. Maybe you should just omit shipping these libraries.
> A concrete situation where I encountered this problem was when I wanted a groovy script
to launch jetty with servlet 3.0 support, pulling in various dependencies with Grape.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message