Skip to content

Commit

Permalink
[MSHADE-462] 3.5.1 not compatible with 3.4.1: The version cannot be e…
Browse files Browse the repository at this point in the history
…mpty.

Signed-off-by: crazyhzm <crazyhzm@apache.org>
  • Loading branch information
CrazyHZM authored and hboutemy committed Jan 31, 2024
1 parent bd982e7 commit cb7b10d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.Exclusion;
Expand Down Expand Up @@ -808,7 +809,9 @@ private File resolveArtifactForClassifier(Artifact artifact, String classifier)
org.eclipse.aether.artifact.Artifact coordinate = RepositoryUtils.toArtifact(new DefaultArtifact(
artifact.getGroupId(),
artifact.getArtifactId(),
artifact.getVersionRange(),
artifact.getVersionRange() == null
? VersionRange.createFromVersion(artifact.getVersion())
: artifact.getVersionRange(),
artifact.getScope(),
artifact.getType(),
classifier,
Expand Down

0 comments on commit cb7b10d

Please sign in to comment.