title: Issues excluding transitive dependency of project reference from eclipse class path
body: <p>I have several gradle projects in my eclipse workspace.  For the sake of simplicity I'm only really interested in 2 of them, let's just use A and B for this.</p>
  
  <p>So the problem I'm having is that Project A has an included dependency on JBoss, which pulls in javax validation-api 1.0.0.GA, and Project B has a dependency on javax validation-api 1.1.0.Final.  Since Gradle itself resolves the conflict by using the newer library first, B is happy when built by gradle.  But Eclipse itself includes errors which are very distracting while editing.</p>
  
  <p>The correct version of the validation-api jar ends up in B's class path but the problem is that the Gradle IDE plugin changes the project(':A') dependency to a project reference, and Eclipse seems to give the project reference precedence over the external jar.  So the old jar is preferred by extension.</p>
  
  <p>I tried adding <code>{ exclude module: 'validation-api' }</code> in B's build.gradle for the dependency on A which works according to the output of 'gradle dependencies', however since Eclipse just gets as far as making it a project reference, it won't exclude the jar and the problem remains.</p>
  
  <p>Also per <a href="https://stackoverflow.com/questions/18720565/ignore-gradle-transitive-project-dependencies-using-eclipse-wtp">this question</a> I tried adding <code>{ transitive = false }</code> and the same thing happens.  I don't think even the hack posed there would work for me since the .classpath contains a single reference to the Gradle container so there's nothing to remove.</p>
  
  <p>I've managed to get around this by explicitly including a reference to the correct version of the jar from my gradle cache and then moving it above the Gradle Classpath Container so that eclipse sees that version first.</p>
  
  <p>My question is:  Is there a better/more generic way to do this?  Preferably one that I can commit to source control without breaking other people's builds or requiring them to manually modify paths or properties somewhere?  There is another project with what appears to be a similar issue so something I can fix in the build.gradle file would be awesome.</p>
  
  <p>Worst case scenario, I could probably switch to IntelliJ if that behaves itself better than the Eclipse-Gradle integration?</p>