Skip to content

Commit

Permalink
--taskid=ID20230905
Browse files Browse the repository at this point in the history
处理:有些版本号声明不规范的问题
  • Loading branch information
xinluke committed Sep 5, 2023
1 parent fb1332b commit e1f5749
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private List<Dependency> getDependencyOfDependencyManagement() {
}
private void processDependency(Dependency d){
String a = d.getArtifactId();
String v = d.getVersion();
String version = d.getVersion();
if(dvService.getHiddenVersionArtifactIdList().contains(a)) {
// 去除版本号相关声明
d.setVersion(null);
Expand All @@ -128,17 +128,17 @@ private void processDependency(Dependency d){
d.setVersion(null);
notifyHasModify();
}
} else if (StringUtils.isNotEmpty(v)) {
} else if (StringUtils.isNotEmpty(version)) {
//这种情况,说明是引用了属性的变量,但是不是很规范
//需要统一规范一下
String realVer;
if (v.contains("$")) {
if (version.contains("$")) {
realVer = getRefVersionValue(d);
} else {
realVer = v;
realVer = version;
}
// 如果是原始的值类型的版本号才进行处理
insertProperty(a, v);
insertProperty(a, realVer);
d.setVersion(getNewVersion(a));
notifyHasModify();
}
Expand Down

0 comments on commit e1f5749

Please sign in to comment.