title: mvn exec:exec with '<' in commandlineArgs
body: <p>I need to run a command that contains '&lt;' in it.</p>
  
  <p>I can run it from the command line, but it throws error when I put it into mvn exec.</p>
  
  <p>The command:</p>
  
  <pre><code>c:\apps\putty\plink.exe myuser@myhost -T -ssh -2 $SHELL /dev/stdin 'a b c d' &lt; test.sh
  </code></pre>
  
  <p>test.sh:</p>
  
  <pre><code>#!/bin/bash
  echo "execution parameters: $@"
  </code></pre>
  
  <p>Command line output:</p>
  
  <blockquote>
    <p>execution parameters: a b c d</p>
  </blockquote>
  
  <p>pom.xml:</p>
  
  <pre><code>&lt;plugin&gt; 
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; 
                  &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt; 
                  &lt;version&gt;1.4.0&lt;/version&gt; 
                  &lt;executions&gt; 
                      &lt;execution&gt;
                          &lt;id&gt;test&lt;/id&gt;
                          &lt;phase&gt;pre-integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;exec&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;&lt;executable&gt;c:\apps\putty\plink.exe&lt;/executable&gt;
                              &lt;commandlineArgs&gt;"myuser@myhost -T -ssh -2 $SHELL /dev/stdin 'a b c d' &lt; test.sh"&lt;/commandlineArgs&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
              &lt;/executions&gt; 
          &lt;/plugin&gt; 
  </code></pre>
  
  <p><strong>I tried to change '&lt;' to '&amp;lt;', putting commandlineArgs into CDATA, put doubleqoutes (") everywhere but could not get this to work.</strong></p>
  
  <pre><code>[DEBUG] Executing command line: [c:\apps\putty\plink.exe, &gt; myuser@myhost -T -ssh -2 -pw tomcat  $SHELL /dev/stdin 'a b c d' &amp;lt; test.sh] 
  Unable to open connection: Host does not exist[INFO]
  ------------------------------------------------------------------------ 
  [INFO] BUILD FAILURE
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>[DEBUG] Executing command line: [c:\apps\putty\plink.exe, myuser@myhost, -T, -ssh, -2, -pw, tomcat, $SHELL /dev /stdin 'a b c d' &amp;lt; test.sh] 
  bash: test.sh: No such file or directory [INFO]
  ------------------------------------------------------------------------ 
  [INFO] BUILD FAILURE
  </code></pre>
  
  <p>I'm suspecting the '&lt;' parameter, but I'm not sure what is the real problem.</p>
  
  <p>Any tips?</p>
  
  <p>UPDATE: when I say "<strong>I tried to change '&lt;' to '&amp;lt;', putting commandlineArgs into CDATA, put doubleqoutes (") everywhere but could not get this to work.</strong>" - I mean it!</p>