Boa tarde,
Estou rodando o projeto da aula 2, customizei o build.xml com as modificações propostas só que na hora de rodar surge o seguinte erro:
Testsuite: br.com.caelum.agenda.controller.ContatosControllerTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
Caused an ERROR
junit/framework/JUnit4TestAdapterCache
java.lang.NoClassDefFoundError: junit/framework/JUnit4TestAdapterCache
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Meu build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="agenda" default="compilar">
<target name="limpar">
<delete dir="build" />
<mkdir dir="build" />
<mkdir dir="build/classes" />
<mkdir dir="build/classes-teste" />
</target>
<target name="compilar" depends="limpar">
<javac destdir="build/classes" srcdir="src">
<classpath>
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="compilar-teste" depends="compilar">
<javac destdir="build/classes-teste" srcdir="src-teste" >
<classpath>
<pathelement location="build/classes" />
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<fileset dir="lib-teste">
<include name="*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="executar-teste" depends="compilar-teste">
<mkdir dir="relatorio-teste" />
<junit haltonfailure="true" showoutput="true" printsummary="true">
<batchtest todir="relatorio-teste">
<formatter type="plain" />
<fileset dir="src-teste">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<classpath>
<pathelement location="build/classes" />
<pathelement location="build/classes-teste" />
<fileset dir="WebContent/WEB-INF/lib">
<include name="*.jar" />
</fileset>
<fileset dir="lib-teste">
<include name="*.jar" />
</fileset>
</classpath>
</junit>
</target>
</project>
Vendo o vídeo não falhou o teste, alguém sabe o que pode estar acontecendo?