Skip to content

Commit 8020b64

Browse files
committed
[GR-14098] native-image-maven-plugin: Filter out non-jar dependencies from imagecp.
PullRequest: graal/3039
2 parents 34f9dd5 + e2cb58d commit 8020b64

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

substratevm/src/native-image-maven-plugin/src/main/java/com/oracle/substratevm/NativeImageMojo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ private String withExeSuffix(String basename) {
250250
}
251251

252252
private void addClasspath(Artifact artifact) throws MojoExecutionException {
253+
if (!"jar".equals(artifact.getType())) {
254+
getLog().warn("Ignoring non-jar type ImageClasspath Entry " + artifact);
255+
return;
256+
}
253257
File artifactFile = artifact.getFile();
254258
if (artifactFile == null) {
255259
throw new MojoExecutionException("Missing jar-file for " + artifact + ". Ensure " + plugin.getArtifactId() + " runs in package phase.");

0 commit comments

Comments
 (0)