当前位置: 首页 > 工具软件 > keta-custom > 使用案例 >

编译keta-custom时出现patchca下载失败

那正初
2023-12-01

编译keta-custom时出现patchca下载失败

MVN在编译的时候会自动在网络上下载依赖包的地址,但由于在官方库下载包经常会失败,,因为找不到  patchca包,所以编译失败。
net.pusuo:patchca这个jar要去github上下载。
错误内容如下:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.618 s
[INFO] Finished at: 2014-08-08T14:25:12+08:00
[INFO] Final Memory: 16M/219M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project keta-custom-main: Could not resolve dependencies for project com.ketayao:keta-custom-main:jar:3.2: Failure to find net.pusuo:patchca:jar:0.5.0 in http://maven.oschina.net/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus-osc has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :keta-custom-main

解决方法:
  1. 去github上下载patchca这个jar;
  2. 直接指定本地目录。
代码如下:
<!-- pcaptcha验证码 -->
<dependency>
<groupId>net.pusuo</groupId>
<artifactId>patchca</artifactId>
<scope>system</scope>
<systemPath>D:/download/patchca-0.5.0/lib/patchca-0.5.0.jar</systemPath>
</dependency>

就可以直接编译成功了。
 类似资料: