多くの異なるソース ファイルを含む大きな jar を含む問題に取り組んでいます。これらのソース ファイルの 1 つはテスト クラスであり、そのテスト クラスを別のプロジェクトから実行したいと考えています。このテスト クラスにはメイン クラスがあり、ant から渡された引数を使用して動作する必要があります。問題はクラスパスのようですが。このエラーが発生し続けます:
Exception in thread "main" java.lang.NoClassDefFoundError: junit.framework.TestCase
これが私のターゲットです。
<target name="lookup-excute" description="Runs a Look up on all event files in the input folder.">
<java classname="com.testing.LookupTest" failonerror="true" fork="yes">
<arg value="${events.location}"/>
<classpath>
<pathelement path="..${file.separator}jars${file.separator}testing.jar"/>
</classpath>
</java>
</target>