Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Build Success #668

Open
micheljung opened this issue Mar 28, 2023 · 4 comments
Open

Fatal Build Success #668

micheljung opened this issue Mar 28, 2023 · 4 comments

Comments

@micheljung
Copy link

build.gradle.kts:

plugins {
  id("org.asciidoctor.jvm.convert") version "3.3.2"
}

src/docs/asciidoc/index.adoc:

[[index]]
include::attributes.adoc[]

src/docs/asciidoc/attributes.adoc

:doctype: book

Output:

09:12:55: Executing 'asciidoctor'...


> Task :my-project-docs:asciidoctor
include file not found: C:/foo/my-project/my-project-docs/attributes.adoc :: index.adoc :: C:/foo/my-project/my-project-docs/C:/foo/my-project/my-project-docs/src/docs/asciidoc/index.adoc:2 (uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb:preprocess_include_directive)
M�rz 28, 2023 9:12:58 VORM. uri:classloader:/gems/asciidoctor-2.0.10/lib/asciidoctor/reader.rb preprocess_include_directive
FATAL: index.adoc: line 2: include file not found: C:/foo/my-project/my-project-docs/attributes.adoc

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 3s
1 actionable task: 1 executed
09:12:58: Execution finished 'asciidoctor'.

Let's ignore that I don't get yet why it searches attributes.adoc at the wrong place, I would never expect the Gradle build to be successful in case of a FATAL error.

@micheljung
Copy link
Author

FYI the error was fixed using:

tasks {
  "asciidoctor"(org.asciidoctor.gradle.jvm.AsciidoctorTask::class) {
    setBaseDir(sourceDir)
  }
}

@ascheman
Copy link

I stumbled into this very same error (and it took me some hours to come here, as I expected the problem to be sitting in front of the computer ...).

Unfortunately, the workaround does not work if applied literally, @micheljung.
Will try to figure out how this could work.

@ascheman
Copy link

By chance I found that you could add baseDirFollowsSourceFile() to the asciidoctor task definition to resolve this:

...
asciidoctor {
    ...
    baseDirFollowsSourceFile()
    ...
}
...

Please provide at least some documentation about it, @mojavelinux. Thanks!

@mojavelinux
Copy link
Member

Don't tell me to add documentation. If you want documentation added, you can step up and contribute it. This project relies on community contributions. It's not my job to handle everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants