Skip to content

Commit

Permalink
Normalize project dir argument value of domino commands
Browse files Browse the repository at this point in the history
  • Loading branch information
aloubyansky committed Mar 28, 2024
1 parent 4849d8e commit dc60cd2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.domino.cli;

import io.quarkus.bootstrap.resolver.maven.BootstrapMavenException;
import io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver;
import io.quarkus.bootstrap.resolver.maven.options.BootstrapMavenOptions;
import io.quarkus.devtools.messagewriter.MessageWriter;
Expand Down Expand Up @@ -245,7 +244,7 @@ protected void initConfig(ProjectDependencyConfig.Mutable config) {
if (!projectDir.isDirectory()) {
throw new RuntimeException(projectDir + " is not a directory");
}
config.setProjectDir(projectDir.toPath());
config.setProjectDir(projectDir.toPath().normalize().toAbsolutePath());
}

final Set<ArtifactKey> excludeKeys;
Expand Down Expand Up @@ -346,11 +345,11 @@ protected MavenArtifactResolver getArtifactResolver() {
return artifactResolver = MavenArtifactResolver.builder().setWorkspaceDiscovery(false).build();
}
return MavenArtifactResolver.builder()
.setCurrentProject(projectDir.getAbsolutePath())
.setCurrentProject(projectDir.getCanonicalPath())
.setEffectiveModelBuilder(true)
.setPreferPomsFromWorkspace(true)
.build();
} catch (BootstrapMavenException e) {
} catch (Exception e) {
throw new RuntimeException("Failed to initialize Maven artifact resolver", e);
}
}
Expand Down

0 comments on commit dc60cd2

Please sign in to comment.