Ant:javac找不到类,即使它';它在类路径中

Ant:javac找不到类,即使它';它在类路径中,java,ant,classpath,Java,Ant,Classpath,我们的build.xml文件包含以下内容: <path id="our.classpath"> <fileset dir="${in.libs}"/> <fileset file="/home/ouruser/fortify/Core/lib/sourceanalyzer.jar"/> </path> <target name="compile"> <pathconvert property="test"

我们的build.xml文件包含以下内容:

<path id="our.classpath">
    <fileset dir="${in.libs}"/>
    <fileset file="/home/ouruser/fortify/Core/lib/sourceanalyzer.jar"/>
</path>

<target name="compile">
    <pathconvert property="test" refid="our.classpath"/>
    <echo message="CLASSPATH=${test}"/>

    <javac debug="true"
           debuglevel="source,lines,vars"
           destdir="${out.classes}"
           includeAntRuntime="no"
           fork="false"
           source="1.7" target="1.7">
        <src path="${src1.dir}"/>
        <src path="${src2.dir}"/>
        <classpath refid="our.classpath"/>
        <compilerarg value="-Xlint:-path"/>
        <compilerarg line="-proc:none"/>
        <compilerarg line="-s &quot;${out.classes}&quot;"/>
    </javac>
</target>

<target name="fortify">
     <antcall target="compile">
         <param name="build.compiler" value="com.fortify.dev.ant.SCACompiler"/>
     </antcall>
</target>
echo
输出中可以看到,sourceanalyzer.jar文件位于
javac
任务使用的类路径中

当我运行
jar-tvf/home/ouruser/fortify/Core/lib/sourceanalyzer.jar | grep SCACompiler.class
时,SCACompiler类将列出:

8408 Fri Apr 04 11:17:26 EDT 2014 com/fortify/dev/ant/SCACompiler.class

那么,为什么Ant说找不到
类:com.fortify.dev.Ant.SCACompiler

com/fortify/dev/Ant/SCACompiler.Class
Class来代替

com.fortify.dev.ant.SourceanalyzerTask

我也面临同样的问题。有什么解决方案吗?@kiranunna试着运行
ant-lib path/to/sourceanalyzer.jar fortify
我不是想提出一个死胡同,但我也有这个问题-库已设置
com.fortify.dev.ant.SourceanalyzerTask