[jira] [Commented] (FLINK-924) Extend JarFileCreator to automatically include dependencies

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (FLINK-924) Extend JarFileCreator to automatically include dependencies

Shang Yuanchun (Jira)

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

Mingliang Qi commented on FLINK-924:
------------------------------------

The crucial problem of this task is to distinguish the user defined class and system classpath. One of the candidate solution is to let user to specify some white list of packages like "org.project" and in addition we make the package of the program plan as the default package in the white list. It would be good if we could list the whole black list of the system classpath, but is sounds to much.

> Extend JarFileCreator to automatically include dependencies
> -----------------------------------------------------------
>
>                 Key: FLINK-924
>                 URL: https://issues.apache.org/jira/browse/FLINK-924
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Ufuk Celebi
>            Assignee: Mingliang Qi
>            Priority: Minor
>
> We have a simple {{JarFileCreator}}, which allows to add classes to a JAR file as follows:
> {code:java}
> JarFileCreator jfc = new JarFileCreator(jarFile);
> jfc.addClass(X.class);
> jfc.addClass(Y.class);
> jfc.createJarFile();
> {code}
> The created file can then be used with the remote execution environment, which requires a JAR file to ship.
> I propose the following improvement: use [ASM|http://asm.ow2.org/] to extract all dependencies and add create the JAR file automatically.
> There is an [old tutorial|http://asm.ow2.org/doc/tutorial-asm-2.0.html] (for ASM 2), which implements a {{DependencyVisitor}}. Unfortuneately the code does not directly work with ASM 5, but it should be a good starting point.



--
This message was sent by Atlassian JIRA
(v6.2#6252)