Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-1840

Windup runtime plugin bundles 114 unused jars

    XMLWordPrintable

    Details

    • Sprint:
      Sprint 41
    • Story Points:
      15

      Description

      If you unzip the windup plugin org.jboss.tools.windup.runtime as it is currently created after a build, you will see the org.jboss.tools.windup.runtime/lib folder has 134 jars in the lib folder.

      unzip l target/org.jboss.tools.windup.runtime-4.0.0.Final.jar | grep "lib/" | grep ".jar$" | grep -v "rhamt-cli" | wc -l
      134

      Despite this, the plugin's manifest.mf requires only 22 of these jars. So the plugin is being released with 112 jars that are absolutely zero use. They aren't on the classpath, and so are just taking up space... about 50+ mb of space. This is about 1/7 the total size of the plugin. Removing these useless jars could speed up installation and decrease disk usage by 15%.

      While the 112 useless jars being bundled is the bigger problem, of the 22 jars actually required in the manifest, it seems only 12 of them may be strictly necessary. Several can be removed from the manifest without any error (as far as I can tell). Still others are only required because of dependency on a single class, usually an enum or string constant.

      The culprit of the first bug seems to be the copy-dependencies target in the pom file. It's copying all dependencies of all listed dependencies, even if the flow of execution will never make it in there after analysis of the server code. This leads to a huge array of unnecessary jars being downloaded, like jackson-annotations.jar, maven-settings.jar, kryo.jar, antlr.jar, org.eclipse.osgi.jar, jline.jar, and about 110 other jars that have no business being bundled in the plugin at all.

      An RMI solution only needs access to what jars can be reasonably expected to either be sent over the wire (tooling-api, tooling-impl) or what jars those objects directly require or expose (WindupException, etc).

        Attachments

          Activity

            People

            Assignee:
            jsteele John Steele
            Reporter:
            rob.stryker Rob Stryker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: