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

migrate .tld files #4

Open
ghost opened this issue Mar 19, 2015 · 2 comments
Open

migrate .tld files #4

ghost opened this issue Mar 19, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 19, 2015

The migration guide is unclear on what should be done with .tld files in web-app/WEB-INF/tld. It says:

Removed, can be restored in src/main/webapp

I'm confused by the "can be restored" wording. It seems like this may not be necessary, but it's not clear under what circumstances. If it's simply the case that all .tld files should be copied to webapp - but where exactly (e.g. webapp/tld) - then the plugin should be enhanced to perform this task

@lhotari
Copy link

lhotari commented Mar 25, 2015

TLD files can be added to src/main/webapp/WEB-INF/tld . However TLD file scanning is disabled by default.
https://github.com/grails/grails-core/blob/5728b2b/grails-web-jsp/src/main/groovy/org/grails/gsp/jsp/TagLibraryResolverImpl.groovy#L51 is the location where the configuration is read.

Currently it should be possible to enable TLD file scanning with this config in grails-app/conf/application.yml:

---
grails:
    gsp:
        tldScanPattern: /WEB-INF/*.tld

I'm not sure if we want to do TLD scanning by default in Grails 3. Please add a Jira issue for doing that by default if you think so.

@ghost
Copy link
Author

ghost commented Mar 25, 2015

@lhotari thanks for the feedback. In my experience most Grails app have these 4 TLDs. Am I right in assuming that there's no reason why these should be migrated?

If so, then I'll improve this plugin such that any other TLDs found in the Grails 2.x project under web-app/WEB-INF/tld will be copied into src/main/webapp/WEB-INF/tld in the Grails 3.x project, does that make sense?

I'll also add this TLD scanning pattern into application.yml.

grails:
    gsp:
        tldScanPattern: /WEB-INF/tld/*.tld

BTW, can you recommend a Groovy/Java library that I could use for reading/writing YML?

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

No branches or pull requests

1 participant