Skip to content

The latest version (codeanalyzer-1.0.8.jar) of the code analyzer is failing when executing the datasets #87

Open
@rejoykulangara

Description

Describe the bug

The latest version (codeanalyzer-1.0.8.jar) of the code analyzer execution is failing when executing the dataset .
Currently, we have found this issue in the cash-account and portfolio-spring projects.
code analyser version = codeanalyzer-1.0.8.jar
datasets = https://github.com/IBMStockTrader/cash-account,
https://github.com/IBMStockTrader/portfolio-spring

Steps To Reproduce

Steps to reproduce the behavior:
execute below command with latest code analyser (1.0.8)
java -jar codeanalyzer-1.0.8.jar -i ~/{root project folder} -o ~/{outputFolder} -a 2

Observed behavior

Command execution is failing with the following error:

java.lang.RuntimeException: java.lang.IllegalStateException: Could not find a valid maven command. I did not find
/cash-account/mvnw in the project directory or in the system PATH.
at com.ibm.cldk.CodeAnalyzer.run(CodeAnalyzer.java:103)
at picocli.CommandLine.executeUserObject(CommandLine.java:1767)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2139)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2106)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1973)
at picocli.CommandLine.execute(CommandLine.java:1902)
at com.ibm.cldk.CodeAnalyzer.main(CodeAnalyzer.java:92)
Caused by: java.lang.IllegalStateException: Could not find a valid maven command. I did not find /cash-account/mvnw in the project directory or in the system PATH.
at com.ibm.cldk.utils.BuildProject.downloadLibraryDependencies(BuildProject.java:231)
at com.ibm.cldk.CodeAnalyzer.analyze(CodeAnalyzer.java:121)
at com.ibm.cldk.CodeAnalyzer.run(CodeAnalyzer.java:101)

Expected behavior

It should execute and build analysis.json without any error

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS = macOS 15.1, linux
  • Version of Java = Eclipse OpenJ9 VM 17.0.10.0
  • Version of Maven = Apache Maven 3.9.9

Additional context

Add any other context about the problem here.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions