diff --git a/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/deployment/GrpcCodeGen.java b/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/deployment/GrpcCodeGen.java index f69f5fcf01d5b..e497a629f1cbb 100644 --- a/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/deployment/GrpcCodeGen.java +++ b/extensions/grpc/codegen/src/main/java/io/quarkus/grpc/deployment/GrpcCodeGen.java @@ -286,8 +286,15 @@ private void extractProtosFromArtifact(Path workDir, Collection protoFiles protoDirectories.add(path.getParent().normalize().toAbsolutePath().toString()); } else { // archive Path relativePath = path.getRoot().relativize(path); + String uniqueName = artifact.getGroupId() + ":" + artifact.getArtifactId(); + if (artifact.getVersion() != null) { + uniqueName += ":" + artifact.getVersion(); + } + if (artifact.getClassifier() != null) { + uniqueName += "-" + artifact.getClassifier(); + } Path protoUnzipDir = workDir - .resolve(HashUtil.sha1(root.normalize().toAbsolutePath().toString())) + .resolve(HashUtil.sha1(uniqueName)) .normalize().toAbsolutePath(); try { Files.createDirectories(protoUnzipDir);