• 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

exception wile running build.xml

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
while running the build.xml (while installing) the below is the exception

java.io.FileNotFoundException: D



below is the build.xml fil
----------------------------------------------

<project name="boomerang" default="compile" basedir="." >

<!-- Global properties for this script -->
<property file="build.properties" />
<property file="${user.home}/build.properties" />
<property name="app.name" value="boomerang" />
<property name="app.version" value="0.1-dev" />
<property name="app.path" value="/${app.name}" />
<property name="build.home" value="${basedir}/build" />
<property name="dist.home" value="${basedir}/dist" />
<property name="manager.url" value="http://localhost:6060/manager" />
<property name="src.home" value="${basedir}/src" />
<property name="web.home" value="${basedir}/webapp" />
<property name="compile.debug" value="true" />
<property name="compile.deprecation" value="false" />
<property name="compile.optimize" value="true" />
<property name="config" value="${basedir}/config" />
<property name="context" value="${catalina.home}/conf/Catalina/localhost" />

<path id="catalina-ant.class.path" >
<fileset dir="${catalina.home}/server/lib" >
<include name="catalina-ant.jar" />
</fileset>
</path>

<path id="compile.classpath" >
<fileset dir="${catalina.home}/common/lib" >
<include name="servlet-api.jar" />
</fileset>
<fileset dir="${basedir}/lib" >
<include name="**/*.jar" />
</fileset>
</path>

<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" classpathref="catalina-ant.class.path"/>
<!--<taskdef name="install" classname="org.apache.catalina.ant.InstallTask" classpathref="catalina-ant.class.path" />-->
<taskdef name="list" classname="org.apache.catalina.ant.ListTask" classpathref="catalina-ant.class.path" />
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask" classpathref="catalina-ant.class.path" />
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask" classpathref="catalina-ant.class.path" />

<target name="all" depends="clean, compile" description="clean build and dist directories then compile" />

<target name="clean" description="delete old build and dist directories" >
<delete dir="${build.home}" />
<delete dir="${dist.home}" />
</target>

<target name="compile" depends="prepare" description="Compile Java Sources" >
<javac srcdir="${src.home}" destdir="${build.home}/WEB-INF/classes" debug="${compile.debug}" deprecation="${compile.deprecation}"
optimize="${compile.optimize}" >
<classpath refid="compile.classpath" />
</javac>

<copy todir="${build.home}/WEB-INF/classes" >
<fileset dir="${config}" excludes="**/*.xml" />
</copy>
</target>

<target name="dist" depends="compile" description="Create binary distribution" >
<!-- Create application WAR file -->
<jar jarfile="${dist.home}/${app.name}-${app.version}.war" basedir="${build.home}" />
</target>

<target name="install" depends="compile" description="Install application to servlet container" >
<echo message="Installing app...."/>

<deploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}"
war="file:${build.home}${app.path}.war" />

<!-- <copy todir="${catalina.home}/conf/Catalina/localhost" >
<fileset dir="${basedir}/Config" excludes="struts-config.xml" />
</copy> -->
<echo message="Copied context xml. Check the log for deployment errors" />
</target>

<target name="list" description="List installed applications on servlet container">
<list url="${manager.url}" username="${manager.username}" password="${manager.password}"/>
</target>

<target name="prepare">
<!-- Create build directories as needed -->
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/WEB-INF"/>
<mkdir dir="${build.home}/WEB-INF/classes"/>
<!-- Copy static content of this web application -->
<copy todir="${build.home}">
<fileset dir="${web.home}"/>
</copy>
<!-- Copy libs -->
<mkdir dir="${build.home}/WEB-INF/lib"/>

<copy todir="${build.home}/WEB-INF/lib">
<fileset dir="${basedir}/lib" includes="**/*.jar">

</fileset>
</copy>

<!--ir dir="${build.home}/jsp" />
<copy todir="${build.home}/pages" >
<fileset dir="${web.home}/WEB-INF/pages" includes="**/*" />
</copy> -->


<!-- Copy other properties, conf files -->
<copy todir="${build.home}/WEB-INF">
<fileset dir="${basedir}/config" includes="**/*"/>
</copy>

<!-- Externalised property files -->
<!--<mkdir dir="${user.home}/resources"/>
<copy todir="${build.home}/WEB-INF/classes">
<fileset dir="${basedir}/config" includes="*.properties"/>
</copy>-->
</target>

<target name="reload" depends="compile" description="Reload application on servlet container">
<reload url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}"/>
</target>

<target name="remove" description="Remove application on servlet container">
<remove url="${manager.url}" username="${manager.password}" password="${manager.password}" path="${app.path}" />
<delete file="${context}/boomerang.xml" />
<!--<undeploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}"/> -->
</target>

</project>
 
author & internet detective
Posts: 42200
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Srinus,
Which line throws the exception? Build failure messages come with a line number.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also try running Ant using the -v or even -d option to get more info on what's happening.
 
srinus reddyy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<deploy url="${manager.url}" username="${manager.username}" password="${manager.password}" path="${app.path}"
war="file:${build.home}${app.path}.war" />

the above is throwing exception
 
Jeanne Boyarsky
author & internet detective
Posts: 42200
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by srinus reddyy:
file:${build.home}${app.path}.war"


This looks like a problem. In Ant, files don't begin with "file:". They begin with a drive and path "c:\program ..." on Windows or the root "/test/..." on UNIX. Either can use a relative path.
 
and POOF! You're gone! But look, this tiny ad is still here:
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic