java - Ant: javac cannot find class even though it's in the classpath -


our build.xml file contains following:

<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> 

when run ant fortify, following output:

fortify:  compile:  [echo] classpath=<a long list of jar files snipped>:/home/ouruser/fortify/core/lib/sourceanalyzer.jar  build failed /home/ouruser/build.xml:542: following error occurred while executing line: /home/ouruser/build.xml:230: class not found: com.fortify.dev.ant.scacompiler 

as can see echo output, sourceanalyzer.jar file in classpath used javac task.

when run jar -tvf /home/ouruser/fortify/core/lib/sourceanalyzer.jar | grep scacompiler.class, scacompiler class listed:

8408 fri apr 04 11:17:26 edt 2014 com/fortify/dev/ant/scacompiler.class 

so why ant class not found: com.fortify.dev.ant.scacompiler?


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -