I created a new "Configuration form" screen which contains several text inputs. My goal is to use these inputs variables and merge them into a properties file.
I'm using version 6.1.6 - so I created "Modify a ZIP file" action for that purpose and placed it under the installer's Install files. In the "Modification actions" property of the action I created new "Write properties to file" action and inside it under the "Source of property definitions" I choose the Installer variable option. It then let me bound the variables I defined earlier which makes sense.
My problem is after running the installer the properties file won't get update. When opening the installation.log I have the next message:
[ERROR] com.install4j.runtime.beans.actions.properties.WritePropertiesFileAction [ID 1540]: Properties source variable db.database is not an instance of java.util.Map
UPDATE:
I set my variable name to be: "${installer:db.database}" which should place it within a Map and now I'm still getting an error:
[ERROR] com.install4j.runtime.beans.actions.properties.WritePropertiesFileAction [ID 1540]: Properties source variable postgres has not been set
under the "Source of property definitions" I choose the Installer variable option.
In that case you would have to set an installer variable to a map with all variable definitions that should be saved to the property file.
I would rather set the "Source of property definitions" property to "Direct entry". In the "Property definitions" child property add definitions for all properties like this:
A=${installer:A}
B=${installer:B}
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With