Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12813

Refactor groovy folder structure and add package declaration

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 22.01.01, Upcoming Branch
    • Upcoming Branch
    • None
    • None

    Description

      Due to the upgrade to jdk17 all groovy Classes need a package declaration. 

      To get a distinct package naming a consistent folder structure is needed.

      For example, under framework -> base -> src there is a distinction between main and test. Within the test folder there is again a distinction between groovy and Java.

      This scheme should be applied everywhere. So a src folder contains main, test, ... within these folders there is again a distinction between groovy and java.

       

      For more information visit:

      http://groovy-lang.org/releasenotes/groovy-3.0.html#Groovy3.0releasenotes-Splitpackages

      “The Java Platform Module System requires that classes in distinct modules have distinct package names. Groovy has its own "modules" but these haven’t historically been structured according to the above requirement. For this reason, Groovy 2.x and 3.0 should be added to the classpath not module path when using JDK9+. This places Groovy’s classes into the unnamed module where the split package naming requirement is not enforced.“

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mbrohl Michael Brohl
            wpaetzold Wiebke Paetzold
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment