8000 [MSHADE-462] 3.5.1 not compatible with 3.4.1: The version cannot be e… · apache/maven-shade-plugin@cb7b10d · GitHub
[go: up one dir, main page]

Skip to content

Commit cb7b10d

Browse files
CrazyHZMhboutemy
authored andcommitted
[MSHADE-462] 3.5.1 not compatible with 3.4.1: The version cannot be empty.
Signed-off-by: crazyhzm <crazyhzm@apache.org>
1 parent bd982e7 commit cb7b10d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import org.apache.maven.RepositoryUtils;
4040
import org.apache.maven.artifact.Artifact;
4141
import org.apache.maven.artifact.DefaultArtifact;
42+
import org.apache.maven.artifact.versioning.VersionRange;
4243
import org.apache.maven.execution.MavenSession;
4344
import org.apache.maven.model.Dependency;
4445
import org.apache.maven.model.Exclusion;
@@ -808,7 +809,9 @@ private File resolveArtifactForClassifier(Artifact artifact, String classifier)
808809
org.eclipse.aether.artifact.Artifact coordinate = RepositoryUtils.toArtifact(new DefaultArtifact(
809810
artifact.getGroupId(),
810811
artifact.getArtifactId(),
811-
artifact.getVersionRange(),
812+
artifact.getVersionRange() == null
813+
? VersionRange.createFromVersion(artifact.getVersion())
814+
: artifact.getVersionRange(),
812815
artifact.getScope(),
813816
artifact.getType(),
814817
classifier,

0 commit comments

Comments
 (0)
0