Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-924

Extend JarFileCreator to automatically include dependencies

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      We have a simple JarFileCreator, which allows to add classes to a JAR file as follows:

      JarFileCreator jfc = new JarFileCreator(jarFile);
      jfc.addClass(X.class);
      jfc.addClass(Y.class);
      jfc.createJarFile();
      

      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 to extract all dependencies and add create the JAR file automatically.

      There is an old tutorial (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.

      Attachments

        Activity

          People

            qmlmoon Mingliang Qi
            uce Ufuk Celebi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: