s3c3t3
s3c3t3

Reputation: 363

Resources plugin - Resource not found even when the files exists

In grails 2.4.4 I am using the resources plugin version 1.2.13

In ApplicationResources.groovy I have the following entry:

jquery_plugins {
    dependsOn 'jquery'
    defaultBundle 'plugins' // plugins de jquery

    resource url:'js/plugins/placeholder.js', disposition:'head'
    resource url:'jquery-ui/css/flick/jquery-ui-1.9.0.custom.min.css', disposition:'head'
    resource url:'css/plugins/pnotify.css', disposition:'head'
    resource url:'jquery-ui/js/jquery-ui-1.9.0.custom.min.js', disposition:'head'
    resource url:'js/plugins/json.js'
    resource url:'js/plugins/jpnotify120.js'
    resource url:'js/plugins/jnetworkDetection.js'
}

When I run my application I'm getting the following errors:

ERROR resource.ResourceMeta  - Resource not found: /jquery-ui/css/flick/jquery-ui-1.9.0.custom.min.css
ERROR resource.ResourceMeta  - Resource not found: /jquery-ui/js/jquery-ui-1.9.0.custom.min.js

The files jquery-ui-1.9.0.custom.min.css and jquery-ui-1.9.0.custom.min.js exists under web-app/jquery-ui/js and web-app/jquery-ui/css respectively.

Any ideas on why the resources plugin did not found my files?

Should I migrate to the asset-pipeline plugin instead?

Any help will be appreciated.

Upvotes: 1

Views: 963

Answers (1)

s3c3t3
s3c3t3

Reputation: 363

I've solved this by moving the jquery-ui/ folder to js/

And then modified the entry in ApplicationResources.groovy to match the folder changes:

jquery_plugins {
    dependsOn 'jquery'
    defaultBundle 'plugins' // plugins de jquery

    resource url:'js/plugins/placeholder.js', disposition:'head'
    resource url:'js/jquery-ui/css/flick/jquery-ui-1.9.0.custom.min.css', disposition:'head'
    resource url:'css/plugins/pnotify.css', disposition:'head'
    resource url:'js/jquery-ui/js/jquery-ui-1.9.0.custom.min.js', disposition:'head'
    resource url:'js/plugins/json.js'
    resource url:'js/plugins/jpnotify120.js'
    resource url:'js/plugins/jnetworkDetection.js'
}

Upvotes: 1

Related Questions