Improve handling of the "--app-content" and "--input" options in jpackage

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 27
    • Affects Version/s: 27
    • Component/s: tools
    • master
    • generic
    • generic

      The "--app-content", "--input", and "--mac-dmg-content" options specify directories that jpackage should include in the output bundle.

      Currently, the values of these options are stored in the model, and directory traversal occurs during the packaging phase.

      This approach caused JDK-8325089: if the value of any of these options matches that of any output option (--dest, --temp), jpackage would get stuck in recursive directory tree creation. Back then, the issue was fixed by filtering out output directories from the list of directories being added to the output bundle. This was a suboptimal solution, as it added extra complexity to the implementation and didn't eliminate the possibility that JDK-8325089 would never happen again.

      The better solution would be to traverse the input directories at the configuration phase until jpackage produces any output, and store the list of files in the input directories in the model instead of storing paths to these directories. This would simplify the implementation (no need for additional filtering of the contents of the input directories) and eliminate the possibility that jpackage would ever run into the infinite loop of creating files.

            Assignee:
            Alexey Semenyuk
            Reporter:
            Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: