Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7888 Apache OFBiz and OPS
  3. OFBIZ-7782

Duplicates of .properties and Label files appear in build/libs.ofbiz.jar

    Details

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

      Description

      With the switch to gradle/gradlew .properties and the label definition files get duplicated into the build folder. See attached screenshot.

      1. Screen Shot 2016-07-13 at 10.05.43.png
        190 kB
        Pierre Smits
      2. OFBIZ-7782-build.gradle.patch
        0.6 kB
        Pierre Smits

        Issue Links

          Activity

          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          How would you prevent that? This is due to Gradle itself, please Google for "Gradle build location"

          Show
          jacques.le.roux Jacques Le Roux added a comment - How would you prevent that? This is due to Gradle itself, please Google for "Gradle build location"
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Tip: Google for "eclipse hide folder from open resource" derived resource is a powerful mean in Eclipse

          Show
          jacques.le.roux Jacques Le Roux added a comment - Tip: Google for "eclipse hide folder from open resource" derived resource is a powerful mean in Eclipse
          Hide
          pfm.smits Pierre Smits added a comment -

          Not only are they in the resources sub folder in the build folder, but they are also packaged into the ofbiz-gradle.jar.

          Show
          pfm.smits Pierre Smits added a comment - Not only are they in the resources sub folder in the build folder, but they are also packaged into the ofbiz-gradle.jar.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Mmm, I see no reasons to have them there indeed, please open a new Jira if you think it's necessary

          Show
          jacques.le.roux Jacques Le Roux added a comment - Mmm, I see no reasons to have them there indeed, please open a new Jira if you think it's necessary
          Hide
          pfm.smits Pierre Smits added a comment -

          It seems to me that this issue should be enough to address this. But if you have other arguments, please share.

          Show
          pfm.smits Pierre Smits added a comment - It seems to me that this issue should be enough to address this. But if you have other arguments, please share.
          Hide
          pfm.smits Pierre Smits added a comment -

          That is easy to say when you don't know the inner workings of Gradle.

          Show
          pfm.smits Pierre Smits added a comment - That is easy to say when you don't know the inner workings of Gradle.
          Hide
          pfm.smits Pierre Smits added a comment -

          FWIW: Gradle is a layer over Ant and Ant IVY and generates Maven download definitions underneath for dependency management.

          Show
          pfm.smits Pierre Smits added a comment - FWIW: Gradle is a layer over Ant and Ant IVY and generates Maven download definitions underneath for dependency management.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I don't know for Ant (and I doubt) but for Ivy it's clear for 2 years already

          Initially, Gradle used Apache Ivy for its dependency management. Later own it moved to its own native dependency resolution engine.

          https://technologyconversations.com/2014/06/18/build-tools/

          Show
          jacques.le.roux Jacques Le Roux added a comment - I don't know for Ant (and I doubt) but for Ivy it's clear for 2 years already Initially, Gradle used Apache Ivy for its dependency management. Later own it moved to its own native dependency resolution engine. https://technologyconversations.com/2014/06/18/build-tools/
          Hide
          pfm.smits Pierre Smits added a comment - - edited

          Clearly the author of the article was misinformed and did not check thorougly...

          This is what
          ./gradlew build --debug produces:

          11:34:44.684 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.default.settings.dir' to 'jar:file:/Users/pierre/.gradle/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings'
          11:34:44.686 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.basedir' to '/Users/pierre/dev/ofbiz/ofbiz-gradle/.'
          11:34:44.686 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.default.conf.dir' to 'jar:file:/Users/pierre/.gradle/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings'
          
          Show
          pfm.smits Pierre Smits added a comment - - edited Clearly the author of the article was misinformed and did not check thorougly... This is what ./gradlew build --debug produces: 11:34:44.684 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy. default .settings.dir' to 'jar:file:/Users/pierre/.gradle/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings' 11:34:44.686 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy.basedir' to '/Users/pierre/dev/ofbiz/ofbiz-gradle/.' 11:34:44.686 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.IvyLoggingAdaper] setting 'ivy. default .conf.dir' to 'jar:file:/Users/pierre/.gradle/wrapper/dists/gradle-2.13-bin/4xsgxlfjcxvrea7akf941nvc7/gradle-2.13/lib/plugins/ivy-2.2.0.jar!/org/apache/ivy/core/settings'
          Hide
          jacques.le.roux Jacques Le Roux added a comment -
          Show
          jacques.le.roux Jacques Le Roux added a comment - You might rather challenge people here https://stackoverflow.com/questions/20464913/does-gradle-use-ivy-internally
          Hide
          pfm.smits Pierre Smits added a comment - - edited

          I leave that up to you. Or to any other OFBiz contributor who is also working on the Apache Groovy project.

          Show
          pfm.smits Pierre Smits added a comment - - edited I leave that up to you. Or to any other OFBiz contributor who is also working on the Apache Groovy project.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I have already given a solution above for the build, bin, youNameIt, folders for Eclipse users: make them a derived resource. For the Gradle generated main jar (named after your local OFBiz root folder) It contains indeed some surprising things but I guess we will find a solution when it will be really needed, or we will forget it...

          BTW apart that it's surprising, what issues did you get from that?

          Show
          jacques.le.roux Jacques Le Roux added a comment - I have already given a solution above for the build, bin, youNameIt, folders for Eclipse users: make them a derived resource. For the Gradle generated main jar (named after your local OFBiz root folder) It contains indeed some surprising things but I guess we will find a solution when it will be really needed, or we will forget it... BTW apart that it's surprising, what issues did you get from that?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          OK, there is though an issue with the derived ressources solution. When the Gradle subfolders are deleted (happened at least to me for build once or two, not sure yet how and when), then you have to make it derived ressource again :/

          Show
          jacques.le.roux Jacques Le Roux added a comment - OK, there is though an issue with the derived ressources solution. When the Gradle subfolders are deleted (happened at least to me for build once or two, not sure yet how and when), then you have to make it derived ressource again :/
          Show
          jacques.le.roux Jacques Le Roux added a comment - On this point: I put an advice about using https://nodj.github.io/AutoDeriv/ at https://cwiki.apache.org/confluence/display/OFBIZ/Eclipse+Tips#EclipseTips-Hidefoldersfromsearches
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Not a problem as long as none have been clearly identified

          Show
          jacques.le.roux Jacques Le Roux added a comment - Not a problem as long as none have been clearly identified
          Hide
          pfm.smits Pierre Smits added a comment -

          Reopening as applying a trick in a development environment to hide some files doesn't remove useless bloatware from a .jar file intended to be used in a production environment.

          Show
          pfm.smits Pierre Smits added a comment - Reopening as applying a trick in a development environment to hide some files doesn't remove useless bloatware from a .jar file intended to be used in a production environment.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I checked, the not classes files in the jar are only 2,5 MB once packed. Even if I agree the properties and labels files should not be there, I think we can definitely wait here for a solution, I mean we are not in a hurry...

          Show
          jacques.le.roux Jacques Le Roux added a comment - I checked, the not classes files in the jar are only 2,5 MB once packed. Even if I agree the properties and labels files should not be there, I think we can definitely wait here for a solution, I mean we are not in a hurry...
          Hide
          pfm.smits Pierre Smits added a comment -

          Or we can just fix the issue, and not forget about it.

          Show
          pfm.smits Pierre Smits added a comment - Or we can just fix the issue, and not forget about it.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Please do

          Show
          jacques.le.roux Jacques Le Roux added a comment - Please do
          Hide
          pfm.smits Pierre Smits added a comment -

          I already provided a solution elsewhere. It was brushed aside.

          Show
          pfm.smits Pierre Smits added a comment - I already provided a solution elsewhere. It was brushed aside.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Could you please refer to it here, having still a lot of more or less related pending Jira issues does not help :/

          Show
          jacques.le.roux Jacques Le Roux added a comment - Could you please refer to it here, having still a lot of more or less related pending Jira issues does not help :/
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          BTW Pierre, I believe OFBIZ-7937 adresses this issue, if you agree please close this one as duplicate (despite history, the other seems more actionnable, see last comment and please check)

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited BTW Pierre, I believe OFBIZ-7937 adresses this issue, if you agree please close this one as duplicate (despite history, the other seems more actionnable, see last comment and please check)
          Hide
          pfm.smits Pierre Smits added a comment -

          This patch addresses the issue, avoiding having following file definitions in the generated ofbiz.jar file:

          • '*.properties'
          • '*.txt'
          • '*.xml'
          • 'README'
          • 'APACHE2_HEADER_FOR_XML'
          Show
          pfm.smits Pierre Smits added a comment - This patch addresses the issue, avoiding having following file definitions in the generated ofbiz.jar file: '*.properties' '*.txt' '*.xml' 'README' 'APACHE2_HEADER_FOR_XML'
          Hide
          taher Taher Alkhateeb added a comment -

          We have extensively, multiple times, the latest of which was less than an hour ago, discussed why:

          • The copy jars task should not be added
          • The exclusion should happen at the sourceset level, not jar generation level.
          Show
          taher Taher Alkhateeb added a comment - We have extensively, multiple times, the latest of which was less than an hour ago, discussed why: The copy jars task should not be added The exclusion should happen at the sourceset level, not jar generation level.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          You mean it should be better handled with OFBIZ-7937, right?

          Show
          jacques.le.roux Jacques Le Roux added a comment - You mean it should be better handled with OFBIZ-7937 , right?
          Hide
          taher Taher Alkhateeb added a comment -

          Part of it (the exclusions) should be handled in OFBIZ-7937. The other (copying jars) was discussed numerous times and I am surprised that it is re-attached as a patch.

          Show
          taher Taher Alkhateeb added a comment - Part of it (the exclusions) should be handled in OFBIZ-7937 . The other (copying jars) was discussed numerous times and I am surprised that it is re-attached as a patch.
          Hide
          pfm.smits Pierre Smits added a comment -

          Hmm. My apologies that this happened. Goes to show (partly, at least) what I have to reinsert into a checkout after every adjustment by the project to be able to do my stuff.

          Show
          pfm.smits Pierre Smits added a comment - Hmm. My apologies that this happened. Goes to show (partly, at least) what I have to reinsert into a checkout after every adjustment by the project to be able to do my stuff.
          Hide
          taher Taher Alkhateeb added a comment -

          Would you kindly elaborate on what you mean by this point and what is it that we should do?

          Show
          taher Taher Alkhateeb added a comment - Would you kindly elaborate on what you mean by this point and what is it that we should do?
          Hide
          pfm.smits Pierre Smits added a comment -

          I have to include changes into build.gradle to have it working for me.

          The copyToLib piece is one of those. Having it in OFBiz trunk would help. Not only me, but also others. It is unfortunate that you find it a waste of space.

          Show
          pfm.smits Pierre Smits added a comment - I have to include changes into build.gradle to have it working for me. The copyToLib piece is one of those. Having it in OFBiz trunk would help. Not only me, but also others. It is unfortunate that you find it a waste of space.
          Hide
          taher Taher Alkhateeb added a comment -

          I'm sorry I still don't understand. Do you mean the community pushed for something and I stopped it? And why is it unfortunate for me to form an opinion exactly?

          Show
          taher Taher Alkhateeb added a comment - I'm sorry I still don't understand. Do you mean the community pushed for something and I stopped it? And why is it unfortunate for me to form an opinion exactly?
          Hide
          pfm.smits Pierre Smits added a comment -

          No one is tackling OFBIZ-7937. Until then the exclusion part of the patch can be implemented as a temporary solution.

          Show
          pfm.smits Pierre Smits added a comment - No one is tackling OFBIZ-7937 . Until then the exclusion part of the patch can be implemented as a temporary solution.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          This has been fixed with OFBIZ-8321, thanks for the report Pierre

          Show
          jacques.le.roux Jacques Le Roux added a comment - This has been fixed with OFBIZ-8321 , thanks for the report Pierre

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              pfm.smits Pierre Smits
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development