मैं आज इस समस्या से कुछ घंटे बिताए। गुण | | मैं परियोजना के माध्यम से सभी ग्रहण में निर्दिष्ट .jar फ़ाइलें था जावा पथ बिल्ड, लेकिन जब ग्रहण से चींटी चल अभी भी
<classpath> for <junit> must include junit.jar if not in Ant's own classpath
त्रुटि हो रही थी।
कमांड लाइन से चींटी चलाना ठीक काम करेगा (मेरे पास क्लासपाथ पर्यावरण चर में सबकुछ था)।
लेकिन ग्रहण में केवल बात यह है कि काम को स्पष्ट रूप से तत्वों के अंदर classpath राज्य के लिए था, जैसे:
<path id="JUnit 4.libraryclasspath">
<pathelement location="...\plugins\org.junit_4.11.0.v201303080030\junit.jar"/>
<pathelement location="...\plugins\org.hamcrest.core_1.3.0.v201303031735.jar"/>
<pathelement location="...\lib\ant-junit4.jar"/>
</path>
<path id="Ant1.classpath">
<pathelement location="bin"/>
<pathelement location="."/>
<path refid="JUnit 4.libraryclasspath"/>
</path>
... stuff...
<target name="test1" depends="compile">
<junit>
<classpath refid="Ant1.classpath"/>
</junit>
</target>
स्पष्ट JUnit तत्व के भीतर classpath को निर्दिष्ट के बिना, यह ग्रहण में हर बार टूट जाएगा, यहां तक कि सिर्फ एक नंगे
<junit/>
संदर्भ
मैं, कोई विशेषज्ञ हूँ सिर्फ रिपोर्टिंग क्या आज काम किया।
-ctb