title: Ant, (over)write into a file
body: <p>How to write (or overwrite) the following contents:</p>
  
  <pre><code>            &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;ged.eprom&lt;/groupId&gt;
                  &lt;artifactId&gt;epromx&lt;/artifactId&gt;
                  &lt;version&gt;${version.to.set}&lt;/version&gt;
                  &lt;classifier&gt;stubjava&lt;/classifier&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
  </code></pre>
  
  <p>into file called pom.xml in the current directory.</p>
  
  <p>I have tried the ant script:</p>
  
  <pre><code>        &lt;echo file="pom.xml"&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;ged.eprom&lt;/groupId&gt;
                  &lt;artifactId&gt;epromx&lt;/artifactId&gt;
                  &lt;version&gt;${version.to.set}&lt;/version&gt;
                  &lt;classifier&gt;stubjava&lt;/classifier&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/echo&gt;
  </code></pre>
  
  <p>But I obtained the error message:</p>
  
  <pre><code>echo doesn't support the nested "dependencies" element.
  </code></pre>