Symptoms
When you scan a Java application in Lucent Sky AVM and the JavaBuild scan argument is set to Maven, the scan fails with one of the following errors:
One or more Maven build errors occurred when building the application. (-42210020)
One or more Maven build errors occurred when building the application. (-42210021)
In addition, Maven build log contains the following message:
[INFO] BUILD FAILURE
Cause
When scanning a Java application and the JavaBuild scan argument set to Maven, Apache Ant is used to build the application. If errors occurred during Maven build, the scan fails.
Resolution
To resolve this issue, use the following methods starting with the first method below. If that does not resolve the issue, try the next method.
Method 1
Resolve errors in Maven logs, then scan the application again.
To learn more about common types of Maven errors, see the More Information section.
Method 2
Use direct binary analysis to scan Java applications without building them in Lucent Sky AVM. To learn more about how to use direct binary analysis, view the following article in the Lucent Sky Knowledge Base:
Scan an application using direct binary analysis
Method 3
To disable binary analysis and only use source code analysis to scan a Java application, include AnalysisEngines,20 in scan arguments.
More Information
Common types of Maven build errors include:
-
Syntax and semantic errors - There are two common causes of syntax and sematic errors in JDK compilation, either that there are actual syntax and semantic errors in the source code, or the source code was compiled with an incorrect encoding. For more information on how to resolve encoding problems, view the following article in the Lucent Sky Knowledge Base:
Troubleshoot encoding problems -
Repository errors - The most common reason for repository errors is that the Lucent Sky AVM instance is unable to access the specified repositories. For more information on how to configure Maven bundled with Lucent Sky AVM, view the following article in the Lucent Sky Knowledge Base:
Configure package repositories