The user has the option of choosing between 2 databases. If database parameter is "A" a database is installed, and the connection properties are set in the post-installation actions.

If database parameter is "B" the user is prompted for the connection properties.

I have set the database parameters to be required, because they are. However, when I run from the command line, and specify "A" for the database parameter, the installer stops because those required parameters are not specified at the beginning of the install - in this case, they will be configured in the post-installation actions of component A.

How do I get around this?

asked 23 Mar '12, 12:41

wildcatz's gravatar image

accept rate: 0%

From where are the connection properties obtained? How are you launching the installer?

(23 Mar '12, 12:54) juanjo ♦♦

If the user chooses database A, the value of the parameter "database" is "A". Component A is then dynamically set to be installed. As part of the postInstall actions for that component, the connection properties are set - they are hardcoded into the install using "setinstallervariable".

So, in the command line version, I want the "required" property of those variables to not be inforced, unless the database parameter is set to "B".

(23 Mar '12, 12:58) wildcatz

Instead of defining the parameters as required, you could validate them in the <preInstallationActionList> if the user selected B and is executing in text mode:

            <text>Required parameter 'someParameter' must be provided</text>
                <compareText text="${someParameter}" logic="equals" value=""/>
           <compareText text="${database}" logic="equals" value="B"/>
           <compareText text="${installer_ui}" logic="equals" value="text"/>

answered 24 Mar '12, 19:03

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 23 Mar '12, 12:41

Seen: 1,842 times

Last updated: 24 Mar '12, 19:03