title: Using ant script within maven ant plugin
body: <p>I am using the ant maven plugin to call a legacy target inside a maven build. When I run the pom file, it throws an error on a missing ant file:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (clear-generated-javascripts) on project documentation: An Ant BuildException has occured: The following error occurred while executing this line:
  [ERROR] C:\Development\documentation\build.xml:308: Problem: failed to create task or type propertyfile
  [ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.PropertyFile was not found.
  [ERROR] This looks like one of Ant's optional components.
  [ERROR] Action: Check that the appropriate optional JAR exists in
  [ERROR] -ANT_HOME\lib
  [ERROR] -the IDE Ant configuration dialogs
  [ERROR]
  [ERROR] Do not panic, this is a common problem.
  [ERROR] The commonest cause is a missing JAR.
  [ERROR]
  </code></pre>
  
  <p>I have tried to add the necessary dependency as follows:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;ant&lt;/groupId&gt;
      &lt;artifactId&gt;ant-optional&lt;/artifactId&gt;
      &lt;version&gt;1.5.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I looked into the ant-optional jar file and the class org.apache.tools.ant.taskdefs.optional.PropertyFile is indeed there. I tried to add the jar into the lib directory inside $ANT_HOME with no luck. Any light would be apreciated.</p>