Allow attribute condition for <fileset> inside <executable> and <parsable>

Description

The <executable> and <parsable> use one or more <fileset> elements for defining the targets, which should be executable or parsable.

In this child elements only a subset of their attributes is allowed. This is intended, e.g. defining a source would not make sense here. But the attribute condition would make sense here: See the following example:

Actually the condition is not allowed inside <executable>. Without the condition you'll get an error during installation.

File execution failed
com.izforge.izpack.api.exception.IzPackException: An error occured- in com.izforge.izpack.installer.bootstrap.Installer.main() at Installer.java:71

A valid workaround is to use two <executable> elements with the condition as attribute of executable. But I think it would be useful, if the condition would be allowed on the fileset element also.

Environment

None

Activity

Show:
Tom Helpstone
June 13, 2016, 2:23 PM

Quick examination of the code:

  • attribute condition must be added to the xsd (no surprise)

  • attribute must be read by CompilerConfig.processExecutableChildren() (not much suprise)

  • ExecutableFile does contain "only" one condition, which is actually used for the condition of the <executable>. It would need to contain two conditions and probalby a new call for evaluating both conditions.

(similar for <parsable>)

Tom Helpstone
June 13, 2016, 2:31 PM

My initial guess, when opening this issue: The condition only has to be scanned and put into the installer.

But with the knowledge of the neccessary steps I would withdraw my issue. The improvement IMHO is to small to justify the needed changes.

(unfortunately this jira does not provide this type of solution, so I've choosen "Won't Do")

Won't Do

Assignee

Unassigned

Reporter

Tom Helpstone

Impact

None

Affects versions

Priority

Lowest
Configure