Skip to content

Commit

Permalink
Fix baseDir pathing in site converter
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Oct 6, 2024
1 parent b8bb3d2 commit 7361083
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected OptionsBuilder defaultOptions(File siteDirectory) {
return Options.builder()
.backend("xhtml")
.safe(SafeMode.UNSAFE)
.baseDir(new File(siteDirectory, ROLE_HINT));
.baseDir(new File(siteDirectory, ROLE_HINT).getAbsoluteFile());
}

protected AttributesBuilder defaultAttributes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ public SiteConversionConfiguration processAsciiDocConfig(Xpp3Dom siteConfig,

private File resolveProjectDir(MavenProject project, String path) {
final File filePath = new File(path);
return !filePath.isAbsolute() ? new File(project.getBasedir(), filePath.toString()) : filePath;
return !filePath.isAbsolute() ? new File(project.getBasedir(), filePath.toString()).getAbsoluteFile() : filePath;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ void should_convert_to_html_with_a_preprocessor() throws MojoFailureException, M
mojo.resources = excludeAll();
mojo.outputDirectory = outputDir;
mojo.standalone = true;
// mojo.extensions = Arrays.asList(extensionConfiguration(ChangeAttributeValuePreprocessor.class));
mojo.extensions = Arrays.asList(extensionConfiguration(ChangeAttributeValuePreprocessor.class));
mojo.execute();
// then
String absolutePath = outputDir.getAbsolutePath();
Expand Down

0 comments on commit 7361083

Please sign in to comment.