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

Assets from plugin are not packaged by default, need to add packagePlugin = true in build.gradle file #197

Closed
2 of 4 tasks
jebabarit opened this issue Sep 18, 2023 · 2 comments · Fixed by #199
Closed
2 of 4 tasks
Assignees

Comments

@jebabarit
Copy link

jebabarit commented Sep 18, 2023

Description

Assets from plugin are not packaged by default, need to add packagePlugin = true in build.gradle file

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

Using grails cli

  1. Create a web-plugin
  2. Add a asset in web-plugin : web-plugin/grails/assets/images/example.svg
  3. Add a asset in web-app : web-app/grails/assets/images/example-2.svg
  4. Run app :

Expected Behaviour

Both assets should be found

Actual Behaviour

the asset from the plugin : localhost:8080/assets/example.svg is found
but :
the asset from the app : localhost:8080/assets/example-2.svg is not found

unless :
assets {
...
packagePlugin = true
...
}
is added to the buld.gradle of the plugin

Environment Information

  • Operating System: ubuntu
  • Grails Version: 6
  • JDK Version: 11

Example Application

  • TODO: Sorry can't push to github at work at the moment
@ianroberts
Copy link

https://start.grails.org still generates plugins without packagePlugin = true in the build.gradle - when will this fix go live on there?

@puneetbehl
Copy link
Contributor

This is will be resolved with Grails 6.1.0 or you can test with 6.1.0-SNAPSHOT.

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 a pull request may close this issue.

3 participants