From e1f574987646567aae07614882e8ea2bd87c7803 Mon Sep 17 00:00:00 2001 From: wangym Date: Tue, 5 Sep 2023 19:07:11 +0800 Subject: [PATCH] =?UTF-8?q?--taskid=3DID20230905=20=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E6=9C=89=E4=BA=9B=E7=89=88=E6=9C=AC=E5=8F=B7=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=E4=B8=8D=E8=A7=84=E8=8C=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job/impl/MavenDependencyVersionReplaceJob.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/wangym/lombok/job/impl/MavenDependencyVersionReplaceJob.java b/src/main/java/com/wangym/lombok/job/impl/MavenDependencyVersionReplaceJob.java index 382881c..f36970f 100644 --- a/src/main/java/com/wangym/lombok/job/impl/MavenDependencyVersionReplaceJob.java +++ b/src/main/java/com/wangym/lombok/job/impl/MavenDependencyVersionReplaceJob.java @@ -113,7 +113,7 @@ private List 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); @@ -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(); }