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

Netbeans editor looses dependent gradle module if the name of its jar changes frequently

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Information Provided
    • 11.1
    • None
    • projects - Gradle
    • None

    Description

      Lets say I have the following multi module project:

       

      build.gralde

      def projectVersion = new Date().format("yyyy-MM-dd-HH-mm")
      subprojects {
          apply plugin: 'java'
          
          sourceCompatibility = 11
          group = 'foo'
          version = projectVersion
      }
      

      foo-commons/build.gradle

      // nothing
      

      foo-app/build.gradle

      dependencies {
          compile project(":foo-commons")
      }
      

      This will cause Netbeas to often looses sight of the foo-commons library code and classes from there will be not found when editing source code in foo-app. The project will however  build without any problem in gradle.

       

      I think Netbeans has a problem with the fact that the name of the library jar build from foo-commons changes every time any thing changes in that code as the projects version is part of the name (foo-commons-2019-08-12-15-54.jar)

       

      A workaround to make Netbean never loose sight of the dependancy is to make its jar name constant like so:

       

      foo-commons/build.gradle

      jar.archiveName = 'foo-commons.jar'
      

       

      Attachments

        Activity

          People

            lkishalmi Laszlo Kishalmi
            walczakit Adam Walczak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: