[GRADLE-879] Support separate output folders in eclipse classpath Created: 26/Mar/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Improvement
Reporter: Felix Gnass Assignee: Hans Dockter
Resolution: Fixed Votes: 0


 Description   

Eclipse allows you to specify a separate output folder for each source-folder. This is useful for multi-module projects, where each module has its own META-INF directory, containing service provider configurations or - as in my case - custom Spring namespace handlers.

Spring looks for the resource `classpath*:/META-INF/spring.handlers`, which under the hood invokes ClassLoader.getResources("META-INF/spring.handlers").

With only a single (default) output folder, Eclipse will place all spring.handlers files at the same location, thereby overwriting one another.
Hence it becomes impossible to run integration tests form inside Eclipse.

The solution is to specify separate output folders for each module in Eclipse's .classpath file:

<classpath>
<classpathentry kind="src" path="module-a/src/main/java" output="module-a/build/eclipse/main" />
<classpathentry kind="src" path="module-b/src/main/java" output="module-b/build/eclipse/main" />
<classpathentry kind="output" path="build/eclipse/main"/>
</classpath>

It would be very helpful if Gradle would support this setup.


Generated at Wed Jun 30 11:41:16 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.