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

The --discoverPackages output seems wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.5.0.Final
    • 2.4.1.Final
    • None

    Description

      The Known Packages section of output of the --discoverPackages command seems to be completely unsorted, which is confusing. The Unknown Packages section seems completely wrong.

      $ ./bin/windup --discoverPackages --input samples/jee-example-app-1.0.0.ear
      Using Windup at /home/lthon/b/windup-distribution-2.4.1.Final
      > JBoss Windup, version 2.4.1.Final. JBoss Forge, version 2.19.0.Final
      Core rulesets: Installed: 2.4.1.Final Latest release: 2.4.1.Final
      Writing graph config to /tmp/windupgraph_K8RIZX/TitanConfiguration.properties
      Known Packages:
      =======================
      
      org.apache.commons.lang - Apache
      org.apache.commons.lang.time - Apache
      org.apache.log4j - Apache
      org.apache.log4j.xml - Apache
      org.apache.commons.lang.enums - Apache
      org.apache.commons.lang.text - Apache
      org.apache.log4j.lf5.viewer - Apache
      org.apache.log4j.varia - Apache
      org.apache.log4j.chainsaw - Apache
      org.apache.log4j.helpers - Apache
      weblogic.i18n.logging - WebLogic
      org.apache.log4j.lf5.viewer.configure - Apache
      org.apache.log4j.spi - Apache
      weblogic.jndi - WebLogic
      org.apache.log4j.or - Apache
      org.apache.log4j.lf5.viewer.categoryexplorer - Apache
      org.apache.log4j.net - Apache
      org.apache.commons.lang.builder - Apache
      org.apache.log4j.lf5 - Apache
      org.apache.commons.lang.math - Apache
      org.apache.commons.lang.reflect - Apache
      org.apache.log4j.lf5.util - Apache
      weblogic.ejb - WebLogic
      weblogic.transaction - WebLogic
      org.apache.commons.lang.exception - Apache
      weblogic.logging - WebLogic
      weblogic.application - WebLogic
      org.apache.commons.lang.mutable - Apache
      org.apache.commons.lang.enum - Apache
      weblogic.servlet.security - WebLogic
      org.apache.log4j.jmx - Apache
      org.apache.log4j.config - Apache
      weblogic.management - WebLogic
      weblogic.ejbgen - WebLogic
      weblogic.logging.log4j - WebLogic
      weblogic.security.services - WebLogic
      org.apache.log4j.jdbc - Apache
      org.apache.log4j.nt - Apache
      org.apache.log4j.or.sax - Apache
      weblogic.security.acl - WebLogic
      weblogic.common - WebLogic
      weblogic.transaction.nonxa - WebLogic
      
      Unknown Packages:
      =======================
      com - Classes: 21
      org - Classes: 1
      

      The Unknown Packages section only contains com and org, but in the archive, I see packages like com.acme.anvil or org.migration.support. These are not printed.

      I see the condition if (depth == 1 || (depth > 1 && recursiveClassCount > 100)) inside DiscoverPackagesCommand.execute – this suggests that only packages with more than 100 classes are printed, which seems completely arbitrary. When I replace the condition with if (depth >= 1), the output looks much more sane:

      Unknown Packages:
      =======================
      com.acme.anvil.listener - Classes: 2
      com.acme.anvil.management - Classes: 2
      com.acme.anvil.service.jms - Classes: 2
      com.acme.anvil.service - Classes: 12
      com.acme.anvil.vo - Classes: 2
      com.acme.anvil - Classes: 21
      com.acme - Classes: 21
      com - Classes: 21
      org.migration.support - Classes: 1
      org.migration - Classes: 1
      org - Classes: 1
      

      Even the ordering looks nice (unlike the Known Packages section).

      Attachments

        Activity

          People

            jesse.sightler@amentra.com Jesse Sightler
            lthon@redhat.com Ladislav Thon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: