xuinkrbin.
xuinkrbin.

Reputation: 1015

Ant doesn't find org.junit but it's right here(?)

When trying to perform an ant build, I receive a message package org.junit does not exist. However, in build.xml, I have:

    <junit>
      <classpath>
        ... some stuff ...
    <fileset dir="dependlibs" includes="**/*.jar" />
      </classpath>
        ... other stuff ...
    </junit>

Now, in the same directory in which I am trying to run ant (the directory with build.xml), I have an org directory which contains junit.jar. Can Anyone point Me in the direction of information to show Me what I am doing wrong?

Upvotes: 0

Views: 278

Answers (1)

redi_jedi
redi_jedi

Reputation: 100

The problem is that junit.jar is not in ants classpath. Provided your basedir is correct, you should be able to add it to the classpath by adding:

<junit>
   <classpath>
        <fileset dir="org">  
                <include name="**/*.jar" />  
        </fileset>  
   ....
   </classpath>
</junit>

Upvotes: 1

Related Questions