kelemen / netbeans-gradle-project

This project is a NetBeans plugin able to open Gradle based Java projects. The implementation is based on Geertjan Wielenga's plugin.
173 stars 57 forks source link

Duplicate dependencies -- Same Gradle sub-project shown twice #418

Open aplatypus opened 5 years ago

aplatypus commented 5 years ago

Hi I'm using Netbeans 8.2 with Gradle

O/S name: Linux Gradle version: 4.10.3 Groovy version: 2.4.15

nb-Gradle-plugin: v1.4.4

In the screen shot herewithin you will see that the Dependencies tree shows two versions of the TestingSupport sub-project. Every peer sub-project under the root project shows-up twice.

image

On the file shown, LoopbackDrone class I can use as an example of strange things that happen with Netbeans and project dependencies.

These symptoms are not just on one file. From time to time such events can occure at odd times on any file from another dependency. Sometimes blowing away the Gradle caches and .gradle directory fixes things for about an hour or so.

In general that can be ignroed or worked past. On this lower-level task used on testing that's not the case since this is exercising a core part of my build and we need to ensure that it is working correctly. Which it isn't -- that's why I'm debugging it ;)

Hope someone can suggest a fix for this.

kelemen commented 5 years ago

Can I see your build scripts? My current guess is that somehow your intTest source set has the output of main twice in its dependencies but through different paths.

aplatypus commented 5 years ago

Hi, I have attached the test-config script it is apply-ed to our root project build.gradle file.

test-config.gradle.zip

Unfortunately the duplication of dependencies pre-dates our use of this file. It happens in every project. It just wasn't seeming to be causing trouble unilt I wanted to debug that file I mentioned. Apart from loading src-jar files when I wanted to use the original.

I wonder if it is something with Gradle I saw this on Windows more than i see it on Linux. That was a major reason to dump Windows for development, I was wasting too much time chasing ghosts like this.