Ignored <os> element within archive <file> when <archivefileset> present

Description

The element <os> is ignored within archive <file> where <archivefileset> is present.

In the following example:

the files are installed regardless on the running OS as the <os> element (a child of <file>) is not considered when evaluating <archivefileset>. Instead, <os> elements within <archivefileset> are evaluated independent of the <file>.

I see this behaviour as unexpected as I would expect propagation of the restrictions related to the whole archive (<file>) to its subset (<archivefileset>).

Probably, this is not critical since there is a workaround:

I could resolve this such that <os> is propagated into <archivefileset>. However, this could break existing installers where the <os> restrictions within <file>-s did not have any effect. I suggest to:

  • emit an info when considering parent <file>'s OS restrictions,

  • emit a warning when there is an empty intersection of <file>'s and <archivefileset>'s OS restrictions.

What do you think?

Environment

Windows 10 x64, Oracle JDK 9.0.4

Status

Assignee

Adam Jurcik

Reporter

Adam Jurcik

Impact

Functional - may break existing environments

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure