public function main()
    {
        if ($this->propertyName === null) {
            throw new BuildException("You must specify a value for propertyName attribute.");
        }

        if ($this->message === "") {
            throw new BuildException("You must specify a message for input task.");
        }

        if ($this->validargs !== null) {
            $accept = preg_split('/[\s,]+/', $this->validargs);

            // is it a boolean (yes/no) inputrequest?
            $yesno = false;
            if (count($accept) == 2) {
                $yesno = true;
                foreach ($accept as $ans) {
                    if (!StringHelper::isBoolean($ans)) {
                        $yesno = false;
                        break;
                    }
                }
            }
            if ($yesno) {
                $request = new YesNoInputRequest($this->message, $accept);
            } else {
                $request = new MultipleChoiceInputRequest($this->message, $accept);
            }
        } else {
            $request = new InputRequest($this->message);
        }

        // default default is curr prop value
        $request->setDefaultValue($this->project->getProperty($this->propertyName));
        $request->setPromptChar($this->promptChar);
        $request->setHidden($this->hidden);

        // unless overridden...
        if ($this->defaultValue !== null) {
            $request->setDefaultValue($this->defaultValue);
        }

        $this->project->getInputHandler()->handleInput($request);

        $value = $request->getInput();

        if ($value !== null) {
            $this->project->setUserProperty($this->propertyName, $value);
        }
    }