asciidoctor / asciidoctor-maven-plugin

A Maven plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
http://asciidoctor.org
Apache License 2.0
317 stars 122 forks source link

Replace use of `baseDir` with `docdir` attribute #776

Closed abelsromero closed 7 months ago

abelsromero commented 7 months ago

Thank you for taking your time to talk with us!

What is this issue about?

Description

base_dir option has some quirks and it would be recommended to use docdir attribute. For context https://asciidoctor.zulipchat.com/#narrow/stream/279642-users/topic/Base.20directory.20and.20IDE

Tagging as 4.0.x since this is a breaking change involving rename of removal of current options baseDir and `relativeBaseDir'.

mojavelinux commented 7 months ago

I don't think that the base_dir option should be removed entirely. However, I could see a new option like setDocDir that sets the docdir attribute under the covers. The only time you need to set docdir is when the input is not a file, since the docdir is computed automatically if the input is a file.

There are cases when base_dir might still be used, but it should only be done by someone who very clearly understands why it is being used since it does have side effects. I'm not denying that there are flaws in the design, but since we're not removing it from Asciidoctor itself yet, I wouldn't remove it outright from the Maven plugin. A strong warning would be appropriate though.

abelsromero commented 7 months ago

The only time you need to set docdir is when the input is not a file, since the docdir is computed automatically if the input is a file.

That to me means we don't need to handle it. The maven plugin only deals with files.

mojavelinux commented 7 months ago

Great point.