I'm using modules to handle resource dependencies and bundling in a Grails application:

```
'module1' {
    resource url: '/path/to/resource1-1.js';
    resource url: '/path/to/resource1-2.js';
}

'module2' {
    dependsOn 'module1';

    resource url: '/path/to/resource2-1.js';
    resource url: '/path/to/resource2-2.js';
}

```

This will create 2 bundles for the example above, one for each module (note: the exact bundle name may vary according to some configurations):

```
/app/static/bundle-bundle_module1_defer.js
/app/static/bundle-bundle_module2_defer.js

```

Now, I'm implementing a Web Worker which uses `module2`. When constructing a Worker, one needs to specify the URL of the JS files it will use, so if I knew which the generated bundles' names, it would be something like:

```
var worker = new Worker('/app/static/bundle-bundle_module1_defer.js', '/app/static/bundle-bundle_module2_defer.js');

```

**The question is: how to programmatically obtain these 2 URLs corresponding to 'module2' (and its dependencies)?** I'm looking for something like the [r:require](http://grails-plugins.github.io/grails-resources/ref/Tags/require.html "r:require tag") tag, with the difference that the `require` tag generates complete `<script>` tags

```
<script src="/app/static/bundle-bundle_module1_defer.js" type="text/javascript" ></script>
<script src="/app/static/bundle-bundle_module2_defer.js" type="text/javascript" ></script>

```

and I just need the 2 URLs above.

**UPDATE** Added some examples on the Web Worker part.