-
Bug
-
Resolution: Done
-
Blocker
-
2.0.0.Final, 2.1.0
Description of problem
The source + dependencies mode fails when analyzing Maven multi module projects.
How reproducible
Always
Steps to Reproduce:
- Clear the local Maven repository in the Repositories/Maven view from the Administrator perspective. (There could be cached dependencies)
- Create the Daytrader application pointing to the following repository: https://github.com/WASdev/sample.daytrader7
- Do not assign any credentials to the application (all its dependencies are available publicly, so a settings file shouldn't be required)
- Execute an analysis, choosing the source + dependencies mode. Choose the "Containerization" migration target and leave all the other options from the wizard in their defaults.
Actual results
Application analysis fails with the following error in the analysis results:
0 "Fetching application." 1 "[CMD] Running: /usr/bin/ssh-agent -a /tmp/agent.1" 2 "[CMD] succeeded." 3 "[SSH] Agent started." 4 "[GIT] Cloning: https://github.com/WASdev/sample.daytrader7" 5 "[CMD] Running: /usr/bin/rm -rf /working/sample" 6 "[CMD] succeeded." 7 "[CMD] Running: /usr/bin/git clone https://github.com/WASdev/sample.daytrader7 /working/sample" 8 "[CMD] succeeded." 9 "[MVN] Fetch dependencies." 10 "[CMD] Running: /usr/bin/mvn dependency:copy-dependencies -f /working/sample/pom.xml -DoutputDirectory=/working/dependencies -Dmaven.repo.local=/mnt/m2" 11 "[CMD] failed: exit status 1." 12 "> [INFO] Scanning for projects..." 13 "> [INFO] ------------------------------------------------------------------------" 14 "> [INFO] Reactor Build Order:" 15 "> [INFO] " 16 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module [jar]" 17 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module [war]" 18 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample [pom]" 19 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EAR [ear]" 20 "> [INFO] " 21 "> [INFO] --------------< net.wasdev.wlp.sample:daytrader-ee7-ejb >---------------" 22 "> [INFO] Building WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module 1.0-SNAPSHOT [1/4]" 23 "> [INFO] --------------------------------[ jar ]---------------------------------" 24 "> [INFO] " 25 "> [INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default-cli) @ daytrader-ee7-ejb ---" 26 "> [INFO] Copying javax.annotation-api-1.3.2.jar to /working/dependencies/javax.annotation-api-1.3.2.jar" 27 "> [INFO] Copying activation-1.1.jar to /working/dependencies/activation-1.1.jar" 28 "> [INFO] Copying javax.mail-1.5.0.jar to /working/dependencies/javax.mail-1.5.0.jar" 29 "> [INFO] Copying javaee-api-7.0.jar to /working/dependencies/javaee-api-7.0.jar" 30 "> [INFO] " 31 "> [INFO] --------------< net.wasdev.wlp.sample:daytrader-ee7-web >---------------" 32 "> [INFO] Building WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module 1.0-SNAPSHOT [2/4]" 33 "> [INFO] --------------------------------[ war ]---------------------------------" 34 "> [INFO] ------------------------------------------------------------------------" 35 "> [INFO] Reactor Summary:" 36 "> [INFO] " 37 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module SUCCESS [ 0.972 s]" 38 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module FAILURE [ 0.016 s]" 39 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample 1.0-SNAPSHOT SKIPPED" 40 "> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EAR 1.0-SNAPSHOT SKIPPED" 41 "> [INFO] ------------------------------------------------------------------------" 42 "> [INFO] BUILD FAILURE" 43 "> [INFO] ------------------------------------------------------------------------" 44 "> [INFO] Total time: 1.404 s" 45 "> [INFO] Finished at: 2022-08-09T14:26:54Z" 46 "> [INFO] ------------------------------------------------------------------------" 47 "> [ERROR] Failed to execute goal on project daytrader-ee7-web: Could not resolve dependencies for project net.wasdev.wlp.sample:daytrader-ee7-web:war:1.0-SNAPSHOT: Could not find artifact net.wasdev.wlp.sample:daytrader-ee7-ejb:jar:1.0-SNAPSHOT -> [Help 1]" 48 "> [ERROR] " 49 "> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch." 50 "> [ERROR] Re-run Maven using the -X switch to enable full debug logging." 51 "> [ERROR] " 52 "> [ERROR] For more information about the errors and possible solutions, please read the following articles:" 53 "> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException" 54 "> [ERROR] " 55 "> [ERROR] After correcting the problems, you can resume the build with the command" 56 "> [ERROR] mvn <goals> -rf :daytrader-ee7-web" 57 "> "
Expected results
Analysis executes without problems and the report is available in the application profile.