---
title: Maven工程源码迁移分析常见失败场景
description: "Maven工程源码迁移分析常见失败场景请参见表1中的处理建议解决。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevps/portingadvisor/systemmigration/KunpengDevKitClifaq_0004.html
sourcePath: /source/zh/kunpengdevps/portingadvisor/systemmigration/KunpengDevKitClifaq_0004.html
indexId: 77c1f0be2d3cf9c2d848416105134a3af914d83f8ccdd806bd39b6998fcc5ae584
---
# Maven工程源码迁移分析常见失败场景

Maven工程源码迁移分析常见失败场景请参见表1中的处理建议解决。


**表1 Maven工程源码迁移分析常见失败场景**

| 失败场景 | 可能原因 | 处理建议 |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| JAR解析异常 | 依赖包内存在敏感名称文件 | 手动解压JAR包，检查包内是否存在包含./、../、../../或..字符串的文件，若存在则可将字符串删除或修改文件名称。 |  |  |  |  |
| JAR解析异常 | 压缩包文件大小超过限制 | 查看压缩包文件大小。 Windows操作系统：请前往JAR包所在目录，执行dir JAR包命令 Linux操作系统：请前往JAR包所在目录，执行ll命令 然后根据文件大小，修改“resources”目录下的devkit\-migration\-plugin\-x.x.x\-jar\-with\-dependencies.jar包内的config目录下global.properties文件，调整其中“jar\_size\_limit”字段所指定的JAR包大小限制。 |  |  |  |  |
| JAR解析异常 | 压缩包内文件数量超过限制 | 可通过修改“resources”目录下的devkit\-migration\-plugin\-x.x.x\-jar\-with\-dependencies.jar包内的config目录下global.properties文件，调整其中“jar\_file\_num\_limit”字段所指定的JAR包数量限制。 |  |  |  |  |
| JAR解析异常 | 创建文件夹失败 | 请手动在输出目录（即\-o指定路径）创建与JAR包同名的文件夹，然后根据具体的报错原因进行处理。 |  |  |  |  |
| JAR解析异常 | 获取磁盘空间失败 | 请先查阅日志以确定具体原因，再进行相应处理。 |  |  |  |  |
| JAR解析异常 | 解压失败 | 请手动解压，然后根据具体的报错原因进行处理。 |  |  |  |  |
| JAR解析异常 | 创建解压路径失败 | 请手动在输出目录（即\-o指定路径）创建与JAR包同名的文件夹，然后根据具体的报错原因进行处理。 |  |  |  |  |
| JAR解析异常 | 文件不存在 | 请先查阅日志以确定具体原因，再进行相应处理。 |  |  |  |  |
| JAR解析异常 | 依赖包超过剩余磁盘空间的一半 | 可尝试扩容或清理磁盘空间。 |  |  |  |  |
| 模块分析失败 | 项目ruoyi\-system依赖的com.ruoyi:ruoyi\-common:jar:4.7.9在本地仓库和中央仓库不存在，报错信息如下： 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 | 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 | 如果依赖的是子模块，则可以到子模块所在目录下执行mvn clean install将其安装到本地仓库。 如果依赖的是其他JAR包，则可以上传到远程仓库或通过以下命令安装到本地仓库： 1 mvn install:install\-file \-Dfile=/path/to/ruoyi\-common.jar \-DgroupId=com.ruoyi \-DartifactId=ruoyi\-common \-Dversion=4.7.9 \-Dpackaging=jar | 1 | mvn install:install\-file \-Dfile=/path/to/ruoyi\-common.jar \-DgroupId=com.ruoyi \-DartifactId=ruoyi\-common \-Dversion=4.7.9 \-Dpackaging=jar |
| 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 |  |  |  |  |  |
| 1 | mvn install:install\-file \-Dfile=/path/to/ruoyi\-common.jar \-DgroupId=com.ruoyi \-DartifactId=ruoyi\-common \-Dversion=4.7.9 \-Dpackaging=jar |  |  |  |  |  |
