title: testNG Maven problem
body: <p>I am trying to run a build file using Ant. I am using Maven for dependencies. I am having a testNG dependency in my project. </p>
  
  <p>This is the pom.xml file </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;be.anova.abis&lt;/groupId&gt;
      &lt;artifactId&gt;maven-pom&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;My first Maven POM&lt;/name&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;  
        &lt;groupId&gt;org.testng&lt;/groupId&gt;
        &lt;artifactId&gt;testng&lt;/artifactId&gt;
        &lt;version&gt;6.2&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The maven downloads the testNG from mavenrepository, but I am getting an error, it is complaining that it can not find org.testng.Assert and org.testng.annotations.Test. (as below)</p>
  
  <pre><code>Compiling 10 source files to /home/shahin/Files/Development/Ant/ServiceEJBSample3/bin
      [javac] /home/shahin/Files/Development/Ant/ServiceEJBSample3/ejbModule/net/company/test/Service1Test.java:5: package org.testng does not exist
      [javac] import org.testng.Assert;
      [javac]                  ^
      [javac] /home/shahin/Files/Development/Ant/ServiceEJBSample3/ejbModule/net/company/test/Service1Test.java:6: package org.testng.annotations does not exist
      [javac] import org.testng.annotations.Test;
      [javac]                              ^
      [javac] /home/shahin/Files/Development/Ant/ServiceEJBSample3/ejbModule/net/company/test/Service1Test2.java:5: package org.testng does not exist
      [javac] import org.testng.Assert;
      [javac]                  ^
  </code></pre>
  
  <p>If I don't use maven and simply use ant and specify the location where the testNG.jar file is, there is no problem at all. I have used the same .jar file that maven downloaded for Ant to make sure I am using the same source. I also have tried different versions of testNG from maevnrepo. Any insights ? </p>
  
  <p>Do I need to include all dependencies (all different packages? like org.testng.Assert and org.testng.annotationsTest and as such) in the POM file? or just the one is enough? If I need to have all of them listed in POM file, what is the best and fastet way of doing it? </p>