Usage of variables for pack content


When defining a pack, you can include files with three different definitions:

  1. <singlefile> for inclusion of a single file to a target file

  2. <file> for inclusion of a single file to a target directory

  3. <fileset> for inclusion of a set of files to a target directory

See the following definition as the starting point for the further investigations:

Inside the "target" / "targetdir" attributs there are variables used already. This variables will be computated during install time later.

It may helpful to use variables or properties for defining the source also, because your build process could produce some artifacts with some variable names (things like a version or a varianbt for example). Therefore variables should be allowed for the "src" and "name"-attributes:

  • Using dynamic variables would not be a reasonable idea, because the value will not be available on compilation, but only later during installation, which is too late.

  • Using static variables (or properties) should be possible. The values are known on compilation already.

So the following definition should work as well:

But the 3 elements behave different when using variables for the source of the file:

  • <singlefile>: both file1.txt and file2.txt do work – fine!

  • <file> does complain during compile: "Source file files\${var} not found"

  • <fileset> the <include> does work, but the dir="${srcDir}" does not find the source dir.




René Krell


Tom Helpstone




Fix versions

Affects versions