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

Fix publishGuide task #29

Open
wants to merge 1 commit into
base: 6.0.x
Choose a base branch
from
Open

Conversation

tylervz
Copy link

@tylervz tylervz commented Jun 5, 2024

Fix the publishGuide task so that it succeeds for guides that are generated using Java 11, Grails 6.2.0 and Gradle 7.6.4.

Before this fix, I had to create a src/main/resources/img directory (in my Grails guide project) with an image file in it in order for ./gradlew publishGuide to work. Otherwise I'd get this error:

> Task :publishGuide FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':publishGuide' (type 'PublishGuide').
  - Type 'grails.doc.gradle.PublishGuide' property 'resourcesDir' specifies directory '/Users/tylervanzanten/src/grails_docs/adding-build-info/adding-build-info/build/resources/grails-guides-6.0.x/src/main/resources' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the directory exists before the task is called.
      2. Make sure that the task which produces the directory is declared as an input.
    
    Please refer to https://docs.gradle.org/7.6.4/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.

Creating a src/main/resources/img directory (in my Grails guide project) with an image file in it is a temporary workaround because then the copyLocalGuideImgResources task gets executed beforehand and creates the directory build/resources/grails-guides-6.0.x/src/main/resources.

@@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath "org.grails:grails-docs:6.0.0-RC1"
classpath "org.grails:grails-docs:6.2.0"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading grails-docs is not necessary for the fix to work. I just figured I might as well update it to the latest version.

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

Successfully merging this pull request may close these issues.

None yet

1 participant