title: How to do input task in maven antrun plugin
body: <p>I created a maven project and i'm trying to run an external script.
  In this external script, i use read command to ask a question and get an answer.</p>
  
  <p>It works if i do a <strong>sudo mvn package</strong> with <a href="http://www.mojohaus.org/exec-maven-plugin/" rel="nofollow noreferrer">exec-maven-plugin</a></p>
  
  <p>But, but, but :</p>
  
  <ul>
  <li>If i do a <strong>sudo mvn package</strong>, my script doesn't stop at read command.</li>
  <li>If i do a <strong>sudo mvn release:prepare</strong> with exec-maven-plugin, my script doesn't stop at read command.</li>
  <li>If i do a <strong>sudo mvn release:prepare</strong> with maven-antrun-plugin, my script doesn't stop at read command.</li>
  </ul>
  
  <p>And obviously, i need to do a release :)</p>
  
  <p>I tried to to change the first line of my script (#/usr/bin/bash, sh, ...) with other syntaxes for read command...</p>
  
  <p>Is anyone have a solution to help me ???</p>
  
  <p>Here the concerned part of my pom.xml</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
    &lt;version&gt;1.8&lt;/version&gt;
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;id&gt;initialisation&lt;/id&gt;
        &lt;phase&gt;initialize&lt;/phase&gt;
        &lt;configuration&gt;
          &lt;tasks&gt;
          &lt;exec dir="${project.basedir}" executable="${project.basedir}/livraison/outils/0_init_livraison.ksh" failonerror="true"&gt;
            &lt;arg line="${project.name} ${project.version} ${ancienneVersion}" /&gt;
          &lt;/exec&gt;
         &lt;/tasks&gt;
        &lt;/configuration&gt;
        &lt;goals&gt;
          &lt;goal&gt;run&lt;/goal&gt;
        &lt;/goals&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Here the concerned part of my 0_init_livraison.ksh</p>
  
  <pre><code>#!/bin/ksh
  
  echo -e "| EXECUTION DU SCIPT generation_livrable.ksh \n"
  
  echo "SHELL : $SHELL"
  boucle="boucler"
  while [ $boucle -eq "boucler" ]
  do
      echo -ne "  Souhaitez-vous forcer la procedure (oui/non)? "
      read rep1
  
      case "$rep1" in
      o|O|y|Y|oui|Oui|OUI|yes|Yes|YES)
      echo ""
      break
      ;;
  
      n|N|non|Non|NON|no|No|NO)
      echo -e "  Abandon de la procedure..."
      boucle=""
      exit 1
      ;;
      *) 
      echo -e "  Reponse incomprehensible.\c"
      esac
  done
  </code></pre>
  
  <p>The last lines of my console when i do a sudo mvn package ( And then, nothing happens. It seems blocked because of an infinite while loop)</p>
  
  <pre><code>[INFO] --- maven-antrun-plugin:1.8:run (initialisation) @ MyProject---
  [WARNING] Parameter tasks is deprecated, use target instead
  [INFO] Executing tasks
  
  main:
     [exec] | EXECUTION DU SCIPT generation_livrable.ksh
     [exec]
     [exec] SHELL : /bin/bash
  </code></pre>
  
  <p>Thanks for the reading :)</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>I tried to use  property with maven-antrun-plugin.
  But i have a similar problem: <a href="https://stackoverflow.com/questions/31981482/antrun-input-task-doesnt-work-during-mvn-releaseprepare-operation">antrun input task doesn't work during mvn release:prepare operation</a></p>