Instalirao sam:
apache-ant-1.8.2,
Apache Tomcat 6.0.26,
operativni sistem je XP,
bfg je ime foldera koji ce biti smesten u webapp tomcat-ovom direktorijumu.
Build file (build.xml) koji koristim izgleda ovako:
Code:
<project name="BfgWebsite" default="dist" basedir=".">
<property name="tomcatdir" value="/tomcat"/>
<property name="appdir" value="${tomcatdir}/webapps/bfg"/>
<property name="jarfile" value="bfgclasses.jar"/>
<target name="init">
<tstamp/>
</target>
<target name="compile" depends="init">
<javac srcdir="src">
<classpath>
<pathelement path="${classpath} "/>
<fileset dir="${tomcatdir} \lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${appdir}/WEB-INF/lib"/>
<jar jarfile="${appdir}/WEB-INF/lib/${jarfile}">
<fileset dir="src" includes="**/*.class"/>
<fileset dir="props" includes="**/*.properties"/>
</jar>
<mkdir dir="${appdir}/jsp"/>
<copy todir="${appdir}/jsp">
<fileset dir="jsp"/>
</copy>
</target>
<target name="javadoc">
<mkdir dir="javadoc"/>
<javadoc sourcepath="src" destdir="javadoc" author="true"
version="true" use="true" packagenames="com.bfg.*">
<classpath>
<pathelement path="${classpath} "/>
<fileset dir="${tomcatdir}\lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<target name="start">
<exec dir="${tomcatdir}/bin" executable="startup.bat"
os="Windows 2000" vmlauncher="false">
</exec>
</target>
<target name="stop">
<exec dir="${tomcatdir}/bin" executable="shutdown.bat"
os="Windows 2000" vmlauncher="false">
</exec>
</target>
<target name="restart" depends="stop,start">
</target>
</project>
<project name="BfgWebsite" default="dist" basedir=".">
<property name="tomcatdir" value="/tomcat"/>
<property name="appdir" value="${tomcatdir}/webapps/bfg"/>
<property name="jarfile" value="bfgclasses.jar"/>
<target name="init">
<tstamp/>
</target>
<target name="compile" depends="init">
<javac srcdir="src">
<classpath>
<pathelement path="${classpath} "/>
<fileset dir="${tomcatdir} \lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="dist" depends="compile">
<mkdir dir="${appdir}/WEB-INF/lib"/>
<jar jarfile="${appdir}/WEB-INF/lib/${jarfile}">
<fileset dir="src" includes="**/*.class"/>
<fileset dir="props" includes="**/*.properties"/>
</jar>
<mkdir dir="${appdir}/jsp"/>
<copy todir="${appdir}/jsp">
<fileset dir="jsp"/>
</copy>
</target>
<target name="javadoc">
<mkdir dir="javadoc"/>
<javadoc sourcepath="src" destdir="javadoc" author="true"
version="true" use="true" packagenames="com.bfg.*">
<classpath>
<pathelement path="${classpath} "/>
<fileset dir="${tomcatdir}\lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<target name="start">
<exec dir="${tomcatdir}/bin" executable="startup.bat"
os="Windows 2000" vmlauncher="false">
</exec>
</target>
<target name="stop">
<exec dir="${tomcatdir}/bin" executable="shutdown.bat"
os="Windows 2000" vmlauncher="false">
</exec>
</target>
<target name="restart" depends="stop,start">
</target>
</project>
Ono sto sam ja promenio u ovom build file-u jeste 2. linija koda, koja sad izgleda ovako:
Code:
<property name="tomcatdir" value="C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0.26"/>
<property name="tomcatdir" value="C:/Program Files/Apache Software Foundation/Apache Tomcat 6.0.26"/>
Evo u cemu je problem:
Kada u command prompt ukucam komandu ant na izlazu dobijem sledeci rezultat:
init:
compile:
[javac] C:\Documents and Settings\Zoran\Desktop\bfg\build.xml:11: warning: '
includeantruntime' was not set, defaulting to build.sysclasspath=last; set to fa
lse for repeatable builds
[javac] Compiling 1 source file
dist:
[copy] Copying 1 file to C:\Program Files\Apache Software Foundation\Apache
Tomcat 6.0.26\webapps\bfg\jsp
BUILD SUCCESSFUL
Total time: 0 seconds
Sledece sto ja zelim jeste da pokrenem apache tomcat server, i to pokusavam da uradim sa komandom ant start.
Rezultat je:
Buildfile: C:\Documents and Settings\Zoran\Desktop\bfg\build.xml
start:
BUILD SUCCESSFUL
Total time: 0 seconds
Problem je sto se nakon ovoga Apache Tomcat server uopste ne pokrene.
Da li neko ima ideju gde gresim?