tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris ten Den <cten...@itemus.com>
Subject Newbie Question from another Newbie
Date Fri, 26 May 2000 14:03:40 GMT
I am trying to get the build.bat file to work for me.
Everything in the build.xml works up until the call to java denoted by the
*********** line below
The problem i am having is described by the *********** line area as well.
Any help would be appreciated.

------------------------------------------------------
Here is my build.bat
------------------------------------------------------

@ECHO OFF
ECHO Setting Class Paths
set CLASSPATH=.\;c:\jdk1.2.2\lib\tools.jar;c:\jdk1.2.2\jre\lib\rt.jar
ECHO Setting Environment Variables
set JAVA_HOME=c:\jdk1.2.2\
set TOMCAT_HOME=c:\tomcat\
set PATH=c:\jdk1.2.2\bin;c:\tomcat;c:\tomcat\development\itemus\;%PATH%

set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\classes
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\ant.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar

rem Execute ANT to perform the requested build target
ECHO Executing Build - Please Wait
java org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6
%7 %8 %9

pause

------------------------------------------------------
Here is my build.xml
------------------------------------------------------

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

  <property name="app.name"       value="itemus"/>
  <property name="deploy.home"    value="${tomcat.home}/webapps/${app.name}"/>

  <property name="dist.home"      value="${deploy.home}"/>
  <property name="dist.src"       value="${app.name}.jar"/>
  <property name="dist.war"       value="${app.name}.war"/>
  <property name="javadoc.home"   value="${deploy.home}/javadoc"/>

  <target name="prepare" init="init">
    <mkdir dir="${deploy.home}"/>
    <copydir src="web" dest="${deploy.home}"/>
    <mkdir dir="${deploy.home}/WEB-INF"/>
    <copyfile src="etc/web.xml" dest="${deploy.home}/WEB-INF/web.xml"/>
    <mkdir dir="${deploy.home}/WEB-INF/classes"/>
    <mkdir dir="${deploy.home}/WEB-INF/lib"/>
    <copydir src="lib" dest="${deploy.home}/lib"/>
    <mkdir dir="${javadoc.home}"/>
  </target>

  <target name="clean" init="init">
    <deltree dir="${deploy.home}"/>
  </target>

  <target name="compile" depends="prepare" init="init">
******************************************************************
    <javac srcdir="src" destdir="${deploy.home}/WEB-INF/classes"
  classpath="${deploy.home}/WEB-INF/classes"
  debug="on" optimize="off" deprecation="off"/>
******************************************************************
The error returned is that it cannot find the srcdir.  If I use src/*, I get a
message which
shows the path it makes (errored of course because of the *).  The path is
right and the
directory exists where is should.
******************************************************************
  </target>

  <target name="javadoc" depends="prepare" init="init">
    <!-- TODO -->
  </target>

  <target name="all" depends="clean,prepare,compile,javadoc" init="init"/>

  <target name="dist" depends="prepare,compile" init="init">
    <jar jarfile="${dist.home}/${dist.src}"
         basedir="."/>
    <jar jarfile="${dist.home}/${dist.war}"
         basedir="${deploy.home}"/>
  </target>
</project>



Mime
View raw message