title: Using Maven ant task to install jar to local repository
body: <p>At the end of my ant build id like it to call the equivalent of the command line call</p>
  
  <pre><code>mvn install:install-file -Dfile=my.jar -DgroupId=com.company.project -DartifactId=my_project -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true
  </code></pre>
  
  <p>so that it will add the newly built jar to a maven repository which another project will rely on.  </p>
  
  <p>Ive tried using the <a href="http://maven.apache.org/ant-tasks/" rel="noreferrer">maven-ant-task</a> and have added the maven-ant-task jar to the ant built project and the following code to the build.xml:</p>
  
  <pre><code>&lt;target name ="minstall" depends="jar"&gt;
    &lt;artifact:pom id="maven_install" file="maven_install.xml" /&gt;
    &lt;artifact:install file="${out.dir}/my_project.jar"&gt;
        &lt;pom refid="maven_install"/&gt;
    &lt;/artifact:install&gt; 
  &lt;/target&gt;
  </code></pre>
  
  <p>but seem to be missing something as it wont work for me.  To begin with i get the error in the build.xml (ant build file) saying </p>
  
  <p><strong>The prefix "artifact" for element "artifact:pom" is not bound.</strong></p>
  
  <p>What am I doing wrong.  I am fairly new to ant?</p>
  
  <p>On a realted question what is the purpose of the associated POM file?  I would not normally have a POM in this project as it is an ant build</p>