Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6307

Gradle project fails to identify artifact, if loaded by different NB instance

    XMLWordPrintableJSON

Details

    Description

      Gradle projects have two caches. One stored in project, in .gradle/nbcache directory. This cache stores project information and artifact coordinates. The other cache is in var/cache/gradle and stores artfiact paths and for a binary artifact it registers javadocs and sources.

      When a project is primed for the first time, it is fully loaded and those two caches are populated. Now imagine that the user deletes var/cache for some reason, or starts a new instance of NetBeans.

      Since the project already contains cached data and project is not trusted, it's loaded from the cache to prevent gradle execution in an untrusted source tree. But - the var/cache/gradle/* global cache in this instance of NetBeans is not populated.

      As a result, ModuleDependency objects from GradleConfiguration have proper coordinates, but list no .jar artifact - even though the artifact is already downloaded, and gradle daemon/compiler can work with it.

      // cc: lkishalmi 

      Attachments

        Issue Links

          Activity

            People

              sdedic Svatopluk Dedic
              sdedic Svatopluk Dedic
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m