• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

${src_web_java} does not exist during Ant Build failure

 
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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

 
Saloon Keeper
Posts: 15727
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you using Ant, and not Maven or Gradle?
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:Why are you using Ant, and not Maven or Gradle?



I think im posting my questions in ant forum but not the gradle or maven forum. Im using ant as a build tool.

Can you answer to my ant question ?

Regards,
Deepak Lal
 
Deepak Lal
Ranch Hand
Posts: 603
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Stephan van Hulst
Saloon Keeper
Posts: 15727
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Deepak Lal wrote:I think im posting my questions in ant forum but not the gradle or maven forum. Im using ant as a build tool.


These forums are not there to just give you a direct answer to your question and nothing more. A lot of discussions on these boards exist to improve software development in general. Ant is outdated, and most build systems have moved on to Maven or Gradle for a reason. I asked you the question because maybe you have a good reason to stick with an outdated build system, or maybe you just haven't considered something more modern.

Can you answer to my ant question ?


No, sorry. Good luck.
 
Dinner will be steamed monkey heads with a side of tiny ads.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic