Rate This Document
Findability
Accuracy
Completeness
Readability

Common Failures in Maven Project Source Code Porting

For details about how to handle common failures, see Table 1.

Table 1 Common failures in Maven project source code porting

Failure

Possible Cause

Handling Suggestion

JAR parsing exception

The dependency package contains files with sensitive names.

Decompress the JAR package and check whether the package includes a file whose file name contains a character string ./, ../, ../../, or ... If any such a file is found, delete the invalid character string or rename the file.

The package size has exceeded the upper limit.

  1. Check the package size.
    • On Windows: Go to the JAR package directory and run the dir JAR_package_name command.
    • On Linux: Go to the JAR package directory and run the ll command.
  2. Modify the global.properties file in the config directory of the devkit-migration-plugin-x.x.x-jar-with-dependencies.jar package in the resources directory to increase the upper limit specified by the jar_size_limit field.

The number of files in the package exceeds the upper limit.

Modify the global.properties file in the config directory of the devkit-migration-plugin-x.x.x-jar-with-dependencies.jar package in the resources directory to increase the upper limit specified by the jar_file_num_limit field.

Failed to create a folder.

Create a folder with the same name as the JAR package in the output directory (specified by -o) and rectify the fault based on the error cause.

Failed to obtain drive space information.

View the logs to determine the cause and then rectify the fault.

Decompression failed.

Decompress the package and rectify the fault based on the error cause.

Failed to create a decompression path.

Create a folder with the same name as the JAR package in the output directory (specified by -o) and rectify the fault based on the error cause.

The file does not exist.

View the logs to determine the cause and then rectify the fault.

The dependency package has exceeded half of the remaining drive space.

Expand the drive capacity or clear the drive space.

Failed to analyze the module.

The com.ruoyi:ruoyi-common:jar:4.7.9 file on which the ruoyi-system project depends does not exist in the local repository or central repository. The error information is as follows:

1
Failed to execute goal on project ruoyi-system: Could not resolve dependencies for project com.ruoyi:ruoyi-system:jar:4.7.9: com.ruoyi:ruoyi-common:jar:4.7.9 was not found in https://mirrors.tools.huawei.com/maven/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced 
  • If a sub-module is depended on, you can run the mvn clean install command in the sub-module directory to install the sub-module to the local repository.
  • If another JAR package is required, upload it to the remote repository or run the following command to install it in the local repository:
    1
    mvn install:install-file -Dfile=/path/to/ruoyi-common.jar -DgroupId=com.ruo -DartifactId=ruoyi-common -Dversion=4.7.9 -Dpackaging=jar