El prorgrama no es mío, me lo han pasado y por lo que he ido viendo en internet parece que necesita alguna libreria del tomcat. He probado a copiar todas las librerias del tomcat 7.0 en una carpeta que he llamado /WEB-INF/lib dentro del proyecto y nada.
A ver si me podéis echar 1 mano con ello para que compile. Os pego el código:
Cita:
Y aquí el mensaje de error:<project default="war">
<property name="src.dir" location="src"/>
<property name="webroot.dir" location="webroot"/>
<property name="lib_build.dir" location="lib/build"/>
<!-- TARGET: clean -->
<target name="clean">
<delete>
<fileset dir="." includes="**/*.war" casesensitive="no"/>
</delete>
<delete>
<fileset dir="." includes="**/*.class" casesensitive="no"/>
</delete>
</target>
<!-- TARGET: compile -->
<target name="compile" depends="clean">
<!-- Compile java files to class files -->
<javac srcdir="${src.dir}" destdir="${webroot.dir}/WEB-INF/classes">
<compilerarg line="-Xlint:deprecation -Xlint:unchecked" />
<classpath>
<fileset dir="${webroot.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</javac>
<!-- Convert jsp to java files -->
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath id="jspc.classpath">
<fileset dir="${webroot1.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</taskdef>
<copy file="${webroot.dir}/WEB-INF/app_web.xml" toFile="${webroot.dir}/WEB-INF/web.xml"/>
<jasper2 validateXml="false"
uriroot="${webroot.dir}"
package="jsp"
trimSpaces="true"
webXmlFragment="${webroot.dir}/WEB-INF/jsp_web.xml"
outputDir="${webroot.dir}/WEB-INF/classes"/>
<!-- Compile jsp/java files to class files -->
<javac srcdir="${webroot.dir}/WEB-INF/classes" destdir="${webroot.dir}/WEB-INF/classes">
<compilerarg line="-Xlint:deprecation -Xlint:unchecked" />
<classpath>
<fileset dir="${webroot.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</javac>
<!-- Merge app_web.xml and jsp_web.xml to web.xml -->
<filter token="app_name" value="${app_name}"/>
<loadfile srcFile="${webroot.dir}/WEB-INF/jsp_web.xml" property="jsp_web.xml"/>
<filter token="jsp_web.xml" value="${jsp_web.xml}"/>
<delete file="${webroot.dir}/WEB-INF/web.xml"/>
<copy file="${webroot.dir}/WEB-INF/app_web.xml" toFile="${webroot.dir}/WEB-INF/web.xml" filtering="true"/>
<!-- Clean un-needed files -->
<delete file="${webroot.dir}/WEB-INF/jsp_web.xml"/>
<delete>
<fileset dir="${webroot.dir}" includes="**/*.java" casesensitive="no"/>
</delete>
<!-- Process app_context.xml to produce context.xml -->
<delete file="${webroot.dir}/META-INF/context.xml"/>
<copy file="${webroot.dir}/META-INF/app_context.xml" toFile="${webroot.dir}/META-INF/context.xml" filtering="true"/>
</target>
<!-- TARGET: war -->
<target name="war" depends="compile">
<jar destfile="${app_name}.war" basedir="${webroot.dir}" excludes="**/*.jsp,**/*.java,**/.cvsignore,**/app_*.xml"/>
</target>
</project>
<property name="src.dir" location="src"/>
<property name="webroot.dir" location="webroot"/>
<property name="lib_build.dir" location="lib/build"/>
<!-- TARGET: clean -->
<target name="clean">
<delete>
<fileset dir="." includes="**/*.war" casesensitive="no"/>
</delete>
<delete>
<fileset dir="." includes="**/*.class" casesensitive="no"/>
</delete>
</target>
<!-- TARGET: compile -->
<target name="compile" depends="clean">
<!-- Compile java files to class files -->
<javac srcdir="${src.dir}" destdir="${webroot.dir}/WEB-INF/classes">
<compilerarg line="-Xlint:deprecation -Xlint:unchecked" />
<classpath>
<fileset dir="${webroot.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</javac>
<!-- Convert jsp to java files -->
<taskdef classname="org.apache.jasper.JspC" name="jasper2" >
<classpath id="jspc.classpath">
<fileset dir="${webroot1.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</taskdef>
<copy file="${webroot.dir}/WEB-INF/app_web.xml" toFile="${webroot.dir}/WEB-INF/web.xml"/>
<jasper2 validateXml="false"
uriroot="${webroot.dir}"
package="jsp"
trimSpaces="true"
webXmlFragment="${webroot.dir}/WEB-INF/jsp_web.xml"
outputDir="${webroot.dir}/WEB-INF/classes"/>
<!-- Compile jsp/java files to class files -->
<javac srcdir="${webroot.dir}/WEB-INF/classes" destdir="${webroot.dir}/WEB-INF/classes">
<compilerarg line="-Xlint:deprecation -Xlint:unchecked" />
<classpath>
<fileset dir="${webroot.dir}/WEB-INF/lib"><include name="*.jar"/></fileset>
<fileset dir="${lib_build.dir}"><include name="*.jar"/></fileset>
</classpath>
</javac>
<!-- Merge app_web.xml and jsp_web.xml to web.xml -->
<filter token="app_name" value="${app_name}"/>
<loadfile srcFile="${webroot.dir}/WEB-INF/jsp_web.xml" property="jsp_web.xml"/>
<filter token="jsp_web.xml" value="${jsp_web.xml}"/>
<delete file="${webroot.dir}/WEB-INF/web.xml"/>
<copy file="${webroot.dir}/WEB-INF/app_web.xml" toFile="${webroot.dir}/WEB-INF/web.xml" filtering="true"/>
<!-- Clean un-needed files -->
<delete file="${webroot.dir}/WEB-INF/jsp_web.xml"/>
<delete>
<fileset dir="${webroot.dir}" includes="**/*.java" casesensitive="no"/>
</delete>
<!-- Process app_context.xml to produce context.xml -->
<delete file="${webroot.dir}/META-INF/context.xml"/>
<copy file="${webroot.dir}/META-INF/app_context.xml" toFile="${webroot.dir}/META-INF/context.xml" filtering="true"/>
</target>
<!-- TARGET: war -->
<target name="war" depends="compile">
<jar destfile="${app_name}.war" basedir="${webroot.dir}" excludes="**/*.jsp,**/*.java,**/.cvsignore,**/app_*.xml"/>
</target>
</project>
Cita:
BUILD FAILED
C:\x\build.xml:32: C:\x\${webroot1.dir}\WEB-INF\lib not found.
C:\x\build.xml:32: C:\x\${webroot1.dir}\WEB-INF\lib not found.