提交 f367d168 编写于 作者: J jurgen

Resolve fix

Former-commit-id: 49c890ac
上级 27906992
......@@ -242,14 +242,6 @@ public class MavenArtifactVersion {
log.warn("Broken dependency reference: " + groupId + ":" + artifactId);
continue;
}
String version = evaluateString(XMLUtils.getChildElementBody(dep, "version"));
if (version == null) {
version = findDependencyVersion(monitor, groupId, artifactId);
}
if (version == null) {
log.error("Can't resolve artifact [" + groupId + ":" + artifactId + "] version. Skip.");
continue;
}
MavenArtifactDependency.Scope scope = MavenArtifactDependency.Scope.COMPILE;
String scopeName = XMLUtils.getChildElementBody(dep, "scope");
if (!CommonUtils.isEmpty(scopeName)) {
......@@ -259,6 +251,15 @@ public class MavenArtifactVersion {
// TODO: maybe we should include some of them
if (depManagement || (!optional && includesScope(scope))) {
String version = evaluateString(XMLUtils.getChildElementBody(dep, "version"));
if (version == null) {
version = findDependencyVersion(monitor, groupId, artifactId);
}
if (version == null) {
log.error("Can't resolve artifact [" + groupId + ":" + artifactId + "] version. Skip.");
continue;
}
MavenArtifactDependency dependency = new MavenArtifactDependency(
evaluateString(groupId),
evaluateString(artifactId),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册