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

[CLI] Transform command fails on Mac arm64

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • MTA 7.2.0
    • MTA CLI
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Description of problem:

      Transform command fails on Mac arm64 because it looks for Maven in hardcoded path

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

      7.2.0-23 

      How reproducible:

      100% 

      Steps to Reproduce:
      1. Make sure maven is installed
      2. Check where binary is located

      $ which mvn
      /opt/homebrew/bin/mvn
      

      3. Disable container-less mode
      4. Run command like

      $ /Users/ec2-user/bin/darwin-mta-cli transform openrewrite --input /Users/ec2-user/kantra-cli-tests/reports/complete-duke --target jakarta-xml
      

      Actual results:

      Transform fails with error that maven binary was not found

      ERRO[0006] container run error                           error="exit status 125"
      ERRO[0006] error running openrewrite                     error="+ cp -r /opt/input /tmp/source-app\n+ /usr/bin/mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.configLocation=/opt/openrewrite/jakarta/javax/xml/rewrite.yml -Drewrite.activeRecipes=org.jboss.windup.jakarta.javax.PersistenceXml\ntime=\"2024-11-18T08:19:47Z\" level=error msg=\"Failed to check if b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56 should restart: Post \\\"http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/shouldrestart\\\": EOF\"\nError: Post \"http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/wait\": EOF\n"
      ERRO[0006] failed executing openrewrite recipe           error="+ cp -r /opt/input /tmp/source-app\n+ /usr/bin/mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.configLocation=/opt/openrewrite/jakarta/javax/xml/rewrite.yml -Drewrite.activeRecipes=org.jboss.windup.jakarta.javax.PersistenceXml\ntime=\"2024-11-18T08:19:47Z\" level=error msg=\"Failed to check if b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56 should restart: Post \\\"http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/shouldrestart\\\": EOF\"\nError: Post \"http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/wait\": EOF\n"
      Error: + cp -r /opt/input /tmp/source-app
      + /usr/bin/mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.configLocation=/opt/openrewrite/jakarta/javax/xml/rewrite.yml -Drewrite.activeRecipes=org.jboss.windup.jakarta.javax.PersistenceXml
      time="2024-11-18T08:19:47Z" level=error msg="Failed to check if b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56 should restart: Post \"http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/shouldrestart\": EOF"
      Error: Post "http://d/v5.0.3/libpod/containers/b3c876ecae12a18cdd0d81b70181a615dc745c24ef8314f1c6f15a534db67a56/wait": EOF
      

      Expected results:

       It should look for binary in correct path, path should not be hardcoded

      Additional info:

              emcmulla@redhat.com Emily McMullan
              ibragins@redhat.com Igor Braginsky
              Igor Braginsky Igor Braginsky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: