Hello Hans,

thank you very much for your detailed answer.

As I understand it the following happens in your case. Your Eclipse
> classpath contains src/main/resources and build/classes. In your set up
> build/classes has a higher precedence than src/main/resources. Gradle copies
> the resources into build/classes as part of the build and any changes you do
> to src/main/resources don't have any effect.


That's correct.


> Defining src/main/resources as a source folder would solve the problem? I
> guess you don't like this for performance reasons as you have mentioned
> below? Another solution would be to change the classpath order of the
> classpath folders.


Using src/main/resources as source folder would solve the issue, but I don't
like that (not just for performance reasons, but in Eclipse a class folder
is just conceptually the better option, IMO). Changing the order helps as
well (thought I tried that): classpath entries that are defined last have
the highest priority. I'll add this to the JIRA issue I created.

How is the build/test-classes stuff you mentioned above related to this?


That's the exact same issue.

 A not uncommon use case is that you don't use the src/main/resources folder
> as it is, but apply transformation to it. For example Gradle supports the
> use of filters. You can substitute placeholders in the source-resource files
> with values defined at build time (e.g. version number).


Ah. I've never had this use case, but I see why copying is necessary in this
case.

I don't run manual builds that often, but do most things [testing, running
Jetty, usw ;)] from within Eclipse. So it would be great if that could work
with just a 'gradle eclipse' command.

Regards,
  Levi

Reply via email to