一招解决maven中的pom.xml文件报错问题 missing artifact failed to transfer等问题
来源:互联网 发布:网络知名言情女作家 编辑:程序博客网 时间:2024/05/23 19:19
最近使用maven,都快将人给搞疯了,原因就是missing artifact xxxx failed to transfer xxxx ,这些问题错综复杂,不好处理。最终的原因大部门就是下载jar包的时候网络出现故障,下载的jar包带有lastUpdated结尾,导致完整的jar包下载不下来,这时候如果你根据pom.xml文件一个一个去排查,等你排查完了,妹子门都嫁了。作为程序员当然是偷懒了。写一段代码轻松搞定,妈妈从此再也不担心我pom.xml文件报错了。
package com.java8.test;
import java.io.File;
public class DelFileEndWithLasted {
public static void main(String[] args) {
File file = new File("E:/RepositoryMars");
// System.out.println(file.isDirectory());
//需要使用递归的方法
deleteFile(file);
}
//删除repository下的已lastUpdated结尾的文件,解决pom.xml文件报错的问题
public static void deleteFile(File file){
if(file.isDirectory()){
//是目录就遍历下面的文件
File[] files = file.listFiles();
for (File file2 : files) {
deleteFile(file2);
}
}else{
//不是目录就判断文件是否是以lastUpdated结尾,就删除该文件
if(file.getName().endsWith(".lastUpdated")){
// file.delete();
System.out.println(file.getName());
}
}
}
}
- 一招解决maven中的pom.xml文件报错问题 missing artifact failed to transfer等问题
- Maven项目pom.xml文件报错“ ArtifactDescriptorException: Failed to read artifact descriptor for ...”解决方法
- Maven的pom.xml报错:Missing artifact
- 解决maven一系统问题,Missing artifact
- 解决在pom.xml文件中出现Missing artifact jdk.tools:jdk.tools:jar:1.6问题
- pom.xml报错“Missing artifact”
- 解决maven引用jdk中的tools.jar报Missing artifact的问题
- 如何解决maven引用jdk中的tools.jar报Missing artifact的问题?
- 如何解决maven引用jdk中的tools.jar报Missing artifact的问题?
- 解决maven引用jdk中的tools.jar报Missing artifact的问题
- MyEclipse中maven项目pom文件报missing artifact错误
- maven 的 pom.xml 文件报错:ArtifactTransferException: Failure to transfer
- java新建maven项目后pom.xml文件报错:Failure to transfer xpp3:xpp3_min:pom:1.1.4c from...
- POM .xml 报 Missing artifact 异常
- POM .xml 报 Missing artifact 异常
- POM .xml 报 Missing artifact 异常
- 解决jeewx-api在maven update是遇到的pom.xml文件报错问题
- pom.xml 文件报错 Missing artifact com.sun:tools:jar:1.5.0:system
- 认证鉴权与API权限控制在微服务架构中的设计与实现(二)
- /etc/ld.so.conf 和 ldconfig和/etc/ld.so.cache和LD_LIBRARY_PATH的关系
- WKWebView 获取标题+进度条+常用代理方法以及native兼容处理
- 快慢指针-
- [agc003e]Sequential operations on Sequence
- 一招解决maven中的pom.xml文件报错问题 missing artifact failed to transfer等问题
- 记响应式布局vh/vw单位在安卓端微信浏览器以及UC浏览器的坑
- org.apache.cxf.common.i18n.UncheckedException: No operation was found with the name
- 究竟是什么学问?PCB线路板导通孔必须塞孔
- VueI18n插件的简单应用于国际化
- Android 自定义UI组合控件设计方法
- 值得收藏!这是SQL数据库优化的六种方法
- Django安装指南
- zookeeper安装和使用 windows环境