Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8036611

Cleanup of handling of properties and other java resources in the build

XMLWordPrintable

    • b06

      After the conversion to the new build, a lot of cleanup was left undone. One such area is how java resource files are handled, and more specifically properties files. By java resource files I mean files that end up inside one of the jar files in the built product, but that aren't class-files. This bug aims at bringing some order to this.

      Properties files:
      In the old build, properties files were treated in three different ways and these were kept in the new build:
      1. Copied as is
      2. Cleaned from comments and extra whitespace
      3. Converted to and compiled as java classes

      Depending on which repository the source file was in, 2 is performed in different ways. There are two slightly different java implementations of StripProperties (one in corba and one in jdk) and in jaxp and jaxws, a completely broken simple regexp is used to just remove comments. Ideally we should probably move as many files as possible to 3, but that will not be covered in this bug. In the new build, a new clean implementation using "sed" was implemented and is available in SetupJavaCompilation.

      What this bug aims to do regarding properties is:
      * replace all instances of 1 and 2 with the new clean functionality in SetupJavaCompilation.
      * Cleanup jdk/make/GensrcProperties.gmk to make it more readable and maintainable.
      * Move some properties files that are currently not in the same package in source and build
      * Delete the StripProperties implementations

      Other resource files are currently handled by jdk/make/CopyIntoClasses.gmk and are currently listed as a pretty long list of explicit files to be copied. I would like to convert this into a few common patterns and instead explicitly list the exceptions to these.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: