Skip to content

Commit 0df8908

Browse files
authored
Merge pull request #789 from ascopes/task/war-ear-dependencies
Update ProtoSourceResolver.java to handle WAR and EAR dependencies
2 parents 1e065cb + 074cf4b commit 0df8908

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

protobuf-maven-plugin/src/main/java/io/github/ascopes/protobufmavenplugin/sources/ProtoSourceResolver.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
@Named
5555
final class ProtoSourceResolver {
5656

57-
private static final Set<String> POM_FILE_EXTENSIONS = Set.of(".pom", ".xml");
58-
private static final Set<String> ZIP_FILE_EXTENSIONS = Set.of(".jar", ".zip");
57+
private static final Set<String> XML_FILE_EXTENSIONS = Set.of(".pom", ".xml");
58+
private static final Set<String> ZIP_FILE_EXTENSIONS = Set.of(".ear", ".jar", ".war", ".zip");
5959

6060
private static final Logger log = LoggerFactory.getLogger(ProtoSourceResolver.class);
6161

@@ -179,12 +179,12 @@ private Optional<SourceListing> resolveSourcesWithinFile(
179179
return resolveSourcesWithinArchive(rootPath, filter);
180180
}
181181

182-
if (fileExtension.filter(POM_FILE_EXTENSIONS::contains).isPresent()) {
183-
log.debug("Ignoring invalid dependency on POM artifact at \"{}\"", rootPath);
182+
if (fileExtension.filter(XML_FILE_EXTENSIONS::contains).isPresent()) {
183+
log.debug("Ignoring invalid dependency on XML artifact at \"{}\"", rootPath);
184184
return Optional.empty();
185185
}
186186

187-
log.warn("Ignoring unknown archive type at \"{}\"", rootPath);
187+
log.warn("Ignoring unknown artifact type at \"{}\"", rootPath);
188188
return Optional.empty();
189189
}
190190

0 commit comments

Comments
 (0)