Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-3779

[CLI] MTA CLI fails to analyze dependencies on private repo even when a settings file is provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Blocker Blocker
    • MTA 7.1.1
    • MTA 7.1.0
    • MTA CLI
    • None
    • 9
    • False
    • Hide

      None

      Show
      None
    • False
    • Critical
    • None

      Description of problem:

      The CLI is producing wrong results when analyzing tackle-testapp-public even when correct credentials are being provided for the analysis. Logs show that the configuration-utils dependency is not being resolved, so the expected local-storage-00001 issue that should be found in the dependency is not reported.

      I checked my credentials on a Maven build just to be sure that they were up to date and they worked flawlessly:

      [rroman@fedora tackle-testapp-public]$ mvn package -s /home/rroman/apache-maven-3.8.1/conf/settings-tackle-public.xml 
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] -----------------< io.konveyor.demo:customers-tomcat >------------------
      [INFO] Building Order Management 0.0.1-SNAPSHOT
      [INFO] --------------------------------[ war ]---------------------------------
      Downloading from central: https://repo1.maven.org/maven2/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.pom
      Downloading from tackle-testapp-public: https://maven.pkg.github.com/konveyor/tackle-testapp-public/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.pom
      Downloaded from tackle-testapp-public: https://maven.pkg.github.com/konveyor/tackle-testapp-public/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.pom (1.8 kB at 1.5 kB/s)
      Downloading from central: https://repo1.maven.org/maven2/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.jar
      Downloading from tackle-testapp-public: https://maven.pkg.github.com/konveyor/tackle-testapp-public/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.jar
      Downloaded from tackle-testapp-public: https://maven.pkg.github.com/konveyor/tackle-testapp-public/io/konveyor/demo/configuration-utils/1.0.0/configuration-utils-1.0.0.jar (3.4 kB at 3.6 kB/s)
      [INFO] 
      [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ customers-tomcat ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Using 'UTF-8' encoding to copy filtered properties files.
      [INFO] Copying 2 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ customers-tomcat ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ customers-tomcat ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Using 'UTF-8' encoding to copy filtered properties files.
      [INFO] skip non existing resourceDirectory /home/rroman/miscelanea/tackle-testapp-public/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ customers-tomcat ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ customers-tomcat ---
      [INFO] 
      [INFO] --- maven-war-plugin:3.3.1:war (default-war) @ customers-tomcat ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [customers-tomcat] in [/home/rroman/miscelanea/tackle-testapp-public/target/customers-tomcat-0.0.1-SNAPSHOT]
      [INFO] Processing war project
      [INFO] Building war: /home/rroman/miscelanea/tackle-testapp-public/target/customers-tomcat-0.0.1-SNAPSHOT.war
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  3.504 s
      [INFO] Finished at: 2024-09-05T10:34:52+02:00
      [INFO] ------------------------------------------------------------------------
      
      

      Version-Release number of selected component (if applicable):

      [rroman@fedora mta-7.1.0-cli-linux-amd64]$ mta-cli version
      version: 7.1.0
      SHA: dd48d6991a22ff3bad31121b974c6c17063dfbd8
      image: registry.redhat.io/mta/mta-cli-rhel9:7.1.0
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. Execute the analysis against the tackle-testapp-public application passing the appropriate credentials to consume dependencies from the associated private Maven repository:

      mta-cli analyze --input /home/rroman/miscelanea/tackle-testapp-public/ --output /home/rroman/mtacli --target cloud-readiness --maven-settings /home/rroman/apache-maven-3.8.1/conf/settings-tackle-public.xml
      

      Actual results:

      Analysis only finds one issue for the hardcoded-ip-address rule.

      Expected results:

      Analysis finds one issue for the hardcoded-ip-address rule and another one for the local-storage-00001 rule.

      Additional info:

      Find analysis output attached

              emcmulla@redhat.com Emily McMullan
              rromanni@redhat.com Ramon Roman Nissen
              Igor Braginsky Igor Braginsky
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: