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

Logic change in how paths are validated #545

Closed
1 of 3 tasks
liampuk opened this issue Jul 23, 2021 · 7 comments · Fixed by #546 or #547
Closed
1 of 3 tasks

Logic change in how paths are validated #545

liampuk opened this issue Jul 23, 2021 · 7 comments · Fixed by #546 or #547
Labels

Comments

@liampuk
Copy link

liampuk commented Jul 23, 2021

Thank you for taking your time to talk with us!

What is this issue about?

  • Bug report
  • Feature request
  • Question

Description

I'm having some issues with AsciiDoctor not being able to find generated-docs during my Jenkins build. This seems to be as Jenkins sometimes truncates the workspace folder in the path to start with _. Previously this was not a problem as asciiDoctor only checks the file name for an _ prefix, but after #535 every part of the path is checked for for _ prefixes.

old code vs new code

an example path from a failed build:
/var/lib/jenkins/workspace/_service_name_develop/service-name-service/src/docs/asciidoc

Was this intentional? If not can this be reverted to the previous logic?

Environment information

  • asciidoctor-maven-plugin version: 2.2.0
@abelsromero
Copy link
Member

an example path from a failed build:
/var/lib/jenkins/workspace/_service_name_develop/service-name-service/src/docs/asciidoc

Was this intentional? If not can this be reverted to the previous logic?

Resources outside of the project path is something we should not check. In the meantime is perfectly safe to use v2.1.0 of the plugin with latest Asciidoctorj v2.5.1.

abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
abelsromero added a commit to abelsromero/asciidoctor-maven-plugin that referenced this issue Jul 24, 2021
@abelsromero
Copy link
Member

Since it can affect Jenkins users I am going to do a quick 2.2.1 release.

@abelsromero abelsromero mentioned this issue Jul 24, 2021
8 tasks
@mojavelinux
Copy link
Member

Is it accurate to say that the Maven plugin excludes files that begin with underscore by default? If so, perhaps this should be mentioned in the docs. I looked for it, but I couldn't find anything that clearly stated what the default behavior is. (This is related to this issue I came across this week: asciidoctor/asciidoctor.org#800).

@abelsromero
Copy link
Member

For the maven plugin we have a note in the sourceDirectory https://docs.asciidoctor.org/maven-tools/latest/plugin/goals/process-asciidoc/#configuration
We can improve it for sure, for instance check if "." is also ignored and refer as them as "hidden" if that's the recommended teminology. Anything else you see could be improved here?

image

@mojavelinux
Copy link
Member

Aha. I see it now.

I think this is so central to how the plugin (specifically the process-asciidoc goal) works that I think it should be in a non-normative section. That means either putting this information in the preamble, or a section above "Setup" named "How files are processed". There, it can say that this plugin looks for all AsciiDoc files in the specified directory, but ignores files that are considered non-public, such as internal include files and hidden files.

Do you think we should start a separate issue to track it?

@abelsromero
Copy link
Member

Do you think we should start a separate issue to track it?

Sure! Just created it

@mojavelinux
Copy link
Member

#549

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