Where to put non-compiled resources that should be in classpath

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where to put non-compiled resources that should be in classpath

longwa
Upgrading to Grails 3.0.9 and wasn't sure where non-compiled items that need to be accessible via the classpath. I know the grails-app/conf directory isn't compiled anymore. Previously one trick was to put .groovy or .properties files in the src/java path as those items were just copied directly into the classes/ directory.

Is there a better place in Grails 3/Gradle world? Somewhere meant for that type of thing?

Thanks,
Aaron

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/5ca55373-10fe-459d-940b-24db11e072f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put non-compiled resources that should be in classpath

longwa
To answer my own question, I think maybe:

src/main/resources
src/test/resources

Seem to be the 'gradle way' of adding things to the classpath. I moved my TestDataConfig.groovy there for build-test-data and it seemed to work. Still validating if that's a good spot for .properties files and the like.

-Aaron

On Thursday, October 22, 2015 at 3:13:26 PM UTC-4, Aaron wrote:
Upgrading to Grails 3.0.9 and wasn't sure where non-compiled items that need to be accessible via the classpath. I know the grails-app/conf directory isn't compiled anymore. Previously one trick was to put .groovy or .properties files in the src/java path as those items were just copied directly into the classes/ directory.

Is there a better place in Grails 3/Gradle world? Somewhere meant for that type of thing?

Thanks,
Aaron

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put non-compiled resources that should be in classpath

Graeme Rocher-2
That is correct yes


On 27 Oct 2015, at 18:28, Aaron <[hidden email]> wrote:

To answer my own question, I think maybe:

src/main/resources
src/test/resources

Seem to be the 'gradle way' of adding things to the classpath. I moved my TestDataConfig.groovy there for build-test-data and it seemed to work. Still validating if that's a good spot for .properties files and the like.

-Aaron

On Thursday, October 22, 2015 at 3:13:26 PM UTC-4, Aaron wrote:
Upgrading to Grails 3.0.9 and wasn't sure where non-compiled items that need to be accessible via the classpath. I know the grails-app/conf directory isn't compiled anymore. Previously one trick was to put .groovy or .properties files in the src/java path as those items were just copied directly into the classes/ directory.

Is there a better place in Grails 3/Gradle world? Somewhere meant for that type of thing?

Thanks,
Aaron

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/688E5B90-DBD6-4FA4-B1B5-1349E6950CFB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Where to put non-compiled resources that should be in classpath

longwa
Actually, it looks like the stuff in grails-app/conf is automatically copied as-is to the build/resources/main directory (and included in the classpath).

-Aaron

On Saturday, October 31, 2015 at 8:19:25 AM UTC-4, Graeme Rocher wrote:
That is correct yes


On 27 Oct 2015, at 18:28, Aaron <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="C9AqmVXFDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">lon...@...> wrote:

To answer my own question, I think maybe:

src/main/resources
src/test/resources

Seem to be the 'gradle way' of adding things to the classpath. I moved my TestDataConfig.groovy there for build-test-data and it seemed to work. Still validating if that's a good spot for .properties files and the like.

-Aaron

On Thursday, October 22, 2015 at 3:13:26 PM UTC-4, Aaron wrote:
Upgrading to Grails 3.0.9 and wasn't sure where non-compiled items that need to be accessible via the classpath. I know the grails-app/conf directory isn't compiled anymore. Previously one trick was to put .groovy or .properties files in the src/java path as those items were just copied directly into the classes/ directory.

Is there a better place in Grails 3/Gradle world? Somewhere meant for that type of thing?

Thanks,
Aaron

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="C9AqmVXFDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="C9AqmVXFDgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/562a11e5-6761-4c37-9052-58eb23b66721%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/71b57adf-091c-4c80-91f6-2de453e4b233%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.