Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Also consider maven-metadata-local.xml when creating manifest #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
public class CreateManifestFromRepoCommand implements Callable<Integer> {

private static final String MAVEN_METADATA_XML = "maven-metadata.xml";
private static final String MAVEN_METADATA_XML_LOCAL = "maven-metadata-local.xml";

@CommandLine.Parameters(index = "0",
description = "Local Maven repository path to generate the manifest from.",
Expand All @@ -36,7 +37,9 @@ public Integer call() throws Exception {
ArrayList<Stream> streams = new ArrayList<>();

try (java.util.stream.Stream<Path> stream = Files.walk(repositoryPath)) {
List<Path> metadataFiles = stream.filter(p -> MAVEN_METADATA_XML.equals(p.getFileName().toString()))
List<Path> metadataFiles = stream.filter(
p -> MAVEN_METADATA_XML.equals(p.getFileName().toString()) || MAVEN_METADATA_XML_LOCAL.equals(p.getFileName().toString())
)
.toList();

for (Path metadataFile : metadataFiles) {
Expand All @@ -52,6 +55,8 @@ public Integer call() throws Exception {
}
}
}


}

ChannelManifest manifest = new ChannelManifest("generated manifest", null, null, streams);
Expand Down