Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7534 Migrate OFBiz from Apache Ant to Gradle build system
  3. OFBIZ-7937

Shortlist the needed resources to start OFBiz in the sourcesets block in Gradle

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: Gradle
    • Labels:
      None

      Description

      In gradle we must define both the java sources and resources (non-java files) that allow the system to start correctly.

      Currently, the sources are defined as the folders for each component in /src/main/java and the resources are defined as the /config directory in each component. However, this is not necessary because many components have a config directory which is not related to the runtime resources needed for OFBiz to run. So we need to identify and shortlist the resources essential for the system to actually run. We should do that in the sourcesets block.

        Issue Links

          Activity

          Hide
          jacopoc Jacopo Cappellato added a comment -

          Jacques Le Roux, when creating a new ticket, it would be useful to invest a bit more time to make it easier to read:

          • the title of this ticket doesn't provide a summary of the issue you are addressing.
          • the description is simply a quote taken from another conversation and out of its context is not clear enough.

          Also please note that there is a typo in the title of this ticket: "Tine tune the sourcesets block".

          Show
          jacopoc Jacopo Cappellato added a comment - Jacques Le Roux , when creating a new ticket, it would be useful to invest a bit more time to make it easier to read: the title of this ticket doesn't provide a summary of the issue you are addressing. the description is simply a quote taken from another conversation and out of its context is not clear enough. Also please note that there is a typo in the title of this ticket: "Tine tune the sourcesets block".
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Agreed, I created it in a hurry while trying to organise things. I'll come back to it later (it's minor for now)

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Agreed, I created it in a hurry while trying to organise things. I'll come back to it later (it's minor for now)
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          For now I make this task a sub-task of OFBIZ-7534, it's easier (for me at least) to follow issues and organise my work

          Show
          jacques.le.roux Jacques Le Roux added a comment - For now I make this task a sub-task of OFBIZ-7534 , it's easier (for me at least) to follow issues and organise my work
          Hide
          taher Taher Alkhateeb added a comment -

          I updated the name of the JIRA and the description to something more clear and focused on the objective

          Show
          taher Taher Alkhateeb added a comment - I updated the name of the JIRA and the description to something more clear and focused on the objective
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Tnanks Taher!

          Show
          jacques.le.roux Jacques Le Roux added a comment - Tnanks Taher!
          Hide
          taher Taher Alkhateeb added a comment -

          The reference to the exact location where we need to fine tune:

              main {
                  java {
                      srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java')
                      exclude excludedJavaSources
                  }
                  resources {
                      srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java')
                      srcDirs += getDirectoryInActiveComponentsIfExists('config')
                      exclude excludedJavaSources
                  }
              }
          
          
          Show
          taher Taher Alkhateeb added a comment - The reference to the exact location where we need to fine tune: main { java { srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java') exclude excludedJavaSources } resources { srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java') srcDirs += getDirectoryInActiveComponentsIfExists('config') exclude excludedJavaSources } }
          Hide
          taher Taher Alkhateeb added a comment -

          Since Pierre Smits already did the work of excluding the files, we can reuse those files in the above mentioned sourceset block. Just as more exclude expressions with a pattern to match whatever. It's pretty well documented in sourceset documentation

          Show
          taher Taher Alkhateeb added a comment - Since Pierre Smits already did the work of excluding the files, we can reuse those files in the above mentioned sourceset block. Just as more exclude expressions with a pattern to match whatever. It's pretty well documented in sourceset documentation
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Fixed at revision: 1764280

          Apart a bunch of files and directories present in config directories which should not have been included in ofbiz.jar, I removed all properties files but some, and the entityengine config xml file. They are needed for unit tests run by Gradle and integration tests. The list of these not excluded files may need to be augmented when new unit tests will be added...

          I also removed the DTDs from the resources, they are useless there.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Fixed at revision: 1764280 Apart a bunch of files and directories present in config directories which should not have been included in ofbiz.jar, I removed all properties files but some, and the entityengine config xml file. They are needed for unit tests run by Gradle and integration tests. The list of these not excluded files may need to be augmented when new unit tests will be added... I also removed the DTDs from the resources, they are useless there.

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              jacques.le.roux Jacques Le Roux
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development