0

While using embedded flapdoodle version < 4 I was using the below method to download .tgz from our Nexus repository:

if(StringUtils.isNotBlank(url) && StringUtils.isNotBlank(archivePath)) {
        Command command = Command.MongoD;
        RuntimeConfig runtimeConfig = Defaults.runtimeConfigFor(command)
                .artifactStore(Defaults.extractedArtifactStoreFor(command)
                        .withDownloadConfig(Defaults.downloadConfigFor(command)
                                .downloadPath((__) -> url)
                                .packageResolver(distribution ->
                                        DistributionPackage.of(
                                                ArchiveType.TGZ,
                                                FileSet.builder().addEntry(FileType.Executable, command.commandName()).build(),
                                                archivePath
                                                ))
                                .build()))
                .build();

However, I want to migrate now to flapdoodle 4.7.0 and when I do,

builder.distributionBaseUrl(Start.to(DistributionBaseUrl.class)
                    .initializedWith(DistributionBaseUrl.of("https://nexus-repo-path/linux/mongodb-linux-x86_64-ubuntu1804-4.4.18tgz")))

It points towards "https://nexus-repo-path/linux/mongodb-linux-x86_64-ubuntu1804-4.4.18tgz/linux/mongodb-linux-x86_64-ubuntu2004-4.4.18tgz" I do not why it appends extra path.

It would be appreciated if someone can help !

0 Answers0