Skip to content

Commit

Permalink
Merge pull request #329 from aloubyansky/normalize-project-dir
Browse files Browse the repository at this point in the history
Normalize project dir argument value of domino commands
  • Loading branch information
aloubyansky authored Mar 28, 2024
2 parents 1527152 + dc60cd2 commit aa139de
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 aa139de

Please sign in to comment.