You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2009/01/09 09:02:59 UTC

[jira] Commented: (SLING-549) Scala interpreter should use the current ClassLoader instead of rebuilding its own classpath

    [ https://issues.apache.org/jira/browse/SLING-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662271#action_12662271 ] 

Felix Meschberger commented on SLING-549:
-----------------------------------------

Thanks for supplying this patch

I have the following remarks:

  1 Is there a reason to have two projects instead of one single project ?
  2 Is there a reason to exclude the imports of Sling packages in the ScriptEngine project ?
  3 Source files miss the ASL license headers.
  4 Please explicitly state the versions in the dependency elements for the
    sling artifacts. Using variables won't work in the long run. And also refer to
    released artifacts unless you require functionality from SNAPSHOTs

I think, we can fix the third and fourth issue when applying the patch.

> Scala interpreter should use the current ClassLoader instead of rebuilding its own classpath
> --------------------------------------------------------------------------------------------
>
>                 Key: SLING-549
>                 URL: https://issues.apache.org/jira/browse/SLING-549
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>         Attachments: SLING-549.patch
>
>
> As the code at [1] demonstrates, the scala interpreter rebuilds its own classpath from the current JVM classpath and user-supplied additions.
> We should find a way for it to use the current classloader instead.
> Note that the almost same test [2] works when run with "mvn test" without setting the classpath explicitly, probably because in this case the JVM classpath includes the scala jars.
> [1] http://code.google.com/p/sling-scala/source/browse/trunk/scala-min-bundle/src/main/java/org/apache/sling/scripting/scala/minbundle/ScalaCompileServlet.java
> [2] http://code.google.com/p/sling-scala/source/browse/trunk/scala-min-bundle/src/test/java/org/apache/sling/scripting/scala/minbundle/ScalaCompilerTest.java?r=38

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.