[GRADLE-1600] Plugin Conflict: 'war' and 'eclipse' fail with compile fileTree Created: 08/Jun/11  Updated: 04/Jan/13  Resolved: 15/Mar/12

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-2, 1.0-milestone-3
Fix Version/s: None

Type: Bug
Reporter: Christopher Paulicka Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0

Attachments: File output    


Following is a simple case, with a brand new gradle script:

Strayphs-MacBook-Pro:~ strayph$ mkdir plugin_conflict
Strayphs-MacBook-Pro:~ strayph$ cd plugin_conflict/
Strayphs-MacBook-Pro:plugin_conflict strayph$ cat > build.gradle
apply plugin: 'war'
apply plugin: 'eclipse'


{ compile fileTree (dir: 'lib', includes: ['*.jar']) }

Strayphs-MacBook-Pro:plugin_conflict strayph$ mkdir lib
Strayphs-MacBook-Pro:plugin_conflict strayph$ touch lib/fake_lib.jar
Strayphs-MacBook-Pro:plugin_conflict strayph$ gradle eclipse

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':eclipseWtpComponent'.
    Cause: Cannot cast object '[/Users/strayph/plugin_conflict/lib/fake_lib.jar]' w\
    ith class 'java.util.ArrayList' to class 'java.util.LinkedHashSet' due to: groo\
    vy.lang.GroovyRuntimeException: Could not find matching constructor for: java.u\
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug\
    option to get more log output.


Total time: 3.398 secs

The attachment contains the output of: gradle eclipse --stacktrace --debug

Comment by Szczepan Faber [ 15/Mar/12 ]

I cannot reproduce it using the latest Gradle version.

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