2013-02-18 8 views
0

J'ai une erreur quand j'exécute dans ma fourmi et je ne comprends pas pourquoi la fourmi ne peut pas reconnaître la tâche classpath:classpath Tâche en fourmi: Java

<?xml version="1.0"?> 

<project default="task"> 

<target name="task"> 
    <classpath> 
     <pathelement path="." /> 
    </classpath> 
</target> 

</project> 

J'ai le message d'erreur:

task: 

BUILD FAILED 
C:\way\build.xml:6: Problem: failed to create task or type classpath 
Cause: The name is undefined. 
Action: Check the spelling. 
Action: Check that any custom tasks/types have been declared. 
Action: Check that any <presetdef>/<macrodef> declarations have taken place. 

Est-ce que quelqu'un sait d'où vient l'erreur?

Répondre

0

Il n'y a pas de tâche classpath dans Ant (même si certaines tâches ne pas vous permettent de spécifier un classpath Vous peut tester un build Ant de base en utilisant la tâche path, comme une alternative.

<?xml version="1.0"?> 

<project default="task"> 

<target name="task"> 
    <path id = "class.dirs.path"> 
     <dirset dir = "${build}" includes = "class.dir.list" /> 
    </path> 
</target> 
</project>