Tim Holloway wrote:Apparently there is no definition in the Ant build.xml file for the property named "src_web_java". It's not something that's built into Ant, so you have to define it yourself.
Build Tools » Ant with Ivy
${src_web_java} does not exist during Ant Build failure
Deepak Lal , Ranch Hand
Jun 03, 2022 11:53:21
Quote
Hi Everyone,
Im running a ant's build.xml file and im getting an errorMessage as below. Could you please tell me why ${src_web_java} does not exist and Ant build.xml is failing
<javac classpathref="web.classpath" executable="${javacompiler}" fork="yes" srcdir="${src_web_java}" destdir="${build_dir_war}/WEB-INF/classes/"> <classpath> <fileset dir="${external_jar_classpath}"> <include name="**/*.jar"/> </fileset> </classpath> <include name="com/**/*.java"/> </javac>
warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
BUILD FAILED D:\MyProject\build.xml:33: srcdir "D:\ MyProject\${src_web_java}" does not exist!
what is the reason of failing build.?
Please help me with this ?
Regards,
Deepak Lal
Tim Holloway , Saloon Keeper staff
Jun 03, 2022 14:17:49
+1 -1 Quote Report
Apparently there is no definition in the Ant build.xml file for the property named "src_web_java". It's not something that's built into Ant, so you have to define it yourself.
Deepak Lal , Ranch Hand
Jun 06, 2022 01:16:37
Quote
Currently build.xml file is showing Build Unsuccessful
Could you tell me what properties to be set for property tag for $ related fields in the below build.xml file
So that build.xml file builds successfully.
<property name="build_dir_war" value="${build_dir}/MyProject_WAR"/>
<pathelement location="${java_home}/lib/tools.jar"/>
<mkdir dir="${build_dir_war}"/>
<mkdir dir="${build_dir_war}/WEB-INF"/>
<mkdir dir="${build_dir_war}/WEB-INF/classes"/>
<javac classpathref="web.classpath" executable="${javacompiler}" fork="yes" srcdir="${src_web_java}" destdir="${build_dir_war}/WEB-INF/classes/"> <classpath> <fileset dir="${external_jar_classpath}">
<copy todir="${build_dir_war}/" preservelastmodified="true"> <fileset dir="${src_web_jsp}">
<copy toDir="${build_dir_war}${web_apps_property_destination}"> <fileset dir="${web_apps_property_source}" includes="*.properties"/></copy>
<!-- make the war-->
<jar destfile="${build_dir_war}/tess_new.war">
<fileset dir="${build_dir_war}" includes="**/*.*"/> </jar> </target>
<!-- Delete the ${build_dir_war} used by jsp compilation --> <target name="compile_clean_jsp" description="compile clean for jsp build" > <delete dir="${build_dir_war}/"/> <mkdir dir="${build_dir_war}"/> </target>
<!-- Delete the ${build_dir} directory -->
<target name="buildclean" description="compileclean up" > <delete dir="${build_dir}/"/> </target>
Regards,
Deepak Lal