Hello.
I have you paste my build.xml file for building one war application.
This is one struts application and when i build it i have one great problem:
the *.properties files doesn't place them into the war file. my struts
*.properties doent's appears into the war file.
Can you help me for solving this problem?
thnaks
My build.xml file:
<project name="build-app" default="info" basedir=".">
<description>VeniveNicaragua</description>
<property name="app" value="myApp"/>
<property name="pathLibrerias" value="C:\LibreriasJava\"/>
<property name="entornoBase" value="C:\ProyectosJava\MyApp"/>
<property name="entornoBaseServidor"
value="C:\jakarta-tomcat-5.0.28\webapps"/>
<property name="proyectoBase" value=""/>
<property name="salida" value="/dist"/>
<property name="build" value="build"/>
<property name="logs"
value="${entornoBase}${salida}/${app}/${build}/logs"/>
<property name="fuentes" value="${proyectoBase}/src"/>
<property name="WebContent" value="${proyectoBase}/WebRoot"/>
<property name="WEB-INF" value="${WebContent}/WEB-INF"/>
<property name="classes" value="${WEB-INF}/classes"/>
<property name="WebClassDir" value="compilados"/>
<property name="filej" value="*"/>
<property name="path" value="*"/>
<property name="libreriasjar"
value="${pathLibrerias}correo/activation.jar:${pathLibrerias}log4j/log4j-1.2
.8.jar:${pathLibrerias}correo/mail.jar:${pathLibrerias}jakarta/poi/poi-2.5.1
-final-20040804.jar:${pathLibrerias}servlet-api/servlet-api.jar:${pathLibrer
ias}jakarta/commons/commons-beanutils.jar:${pathLibrerias}jakarta/commons/co
mmons-collections-3.1.jar:${pathLibrerias}jakarta/commons/commons-dbcp-1.2.1
.jar:${pathLibrerias}jakarta/commons/commons-digester.jar:${pathLibrerias}ja
karta/commons/commons-el.jar:${pathLibrerias}jakarta/commons/commons-fileupl
oad-1.1.jar:${pathLibrerias}jakarta/commons/commons-logging.jar:${pathLibrer
ias}jakarta/commons/commons-pool-1.2.jar:${pathLibrerias}jakarta/commons/com
mons-validator.jar:${pathLibrerias}jakarta/jakarta-oro.jar:${pathLibrerias}j
akarta/jakarta-taglibs-standar-1.1.2.jar:${pathLibrerias}jstl/jstl.jar:${pat
hLibrerias}struts/standar.jar:${pathLibrerias}struts/struts.jar:${pathLibrer
ias}struts/struts-el.jar:${pathLibrerias}jsp/jsp-api.jar"/>
<property name="classpath.jdk"
value="C:\j2sdk1.4.2_12\lib\tools.jar"/>
<property name="classpath.app" value=""/>
<property name="classpath"
value=".;${classpath.jdk};${libreriasjar}"/>
<target name="info">
<echo message=""/>
<echo message="----->>>>> USO:
ant
opciones"/>
<echo message="----->>>>> Las
opciones son: compile, compile-War, war, warServidor"/>
<echo message=""/>
</target>
<target name="init">
<tstamp>
<format property="FECHA"
pattern="yyyyMMdd-HH.mm"/>
</tstamp>
<mkdir
dir="${entornoBase}${salida}/${app}/${WebClassDir}"/>
<mkdir
dir="${entornoBase}${salida}/${app}/${build}"/>
<mkdir dir="${logs}"/>
</target>
<target name="compile-War" depends="init" if="app">
<record name="${logs}/${FECHA}_log.txt" action="start"/>
<echo message=""/>
<echo message="----->>>>> Compilando
: ${entornoBase}/${fuentes}/${path}/${filej}.java [compile]"/>
<echo message=""/>
<javac
destdir="${entornoBase}${salida}/${app}/${WebClassDir}"
includes="**/${path}/${filej}.*,**/${filej}.*"
excludes="**/*EJB/*.*,**/**ejb/**/*.*" classpath="${classpath}"
optimize="on" deprecation="on">
<src path="${entornoBase}/${fuentes}"/>
</javac>
<echo message=""/>
<echo message="----->>>>> Fin
de
compilacion"/>
<record name="${logs}/${FECHA}_log.txt"
action="stop"/>
</target>
<target name="warServidor" depends="init,compile-War"
description="WAR file">
<record name="${logs}/${FECHA}_log.txt"
action="start"/>
<delete includeemptydirs="true">
<fileset
dir="${entornoBaseServidor}/${app}" includes="**/*"/>
</delete>
<mkdir
dir="${entornoBase}${salida}/${app}/${build}/${FECHA}"/>
<war
destfile="${entornoBase}${salida}/${app}/${build}/${FECHA}/${app}.war"
webxml="${entornoBase}/${WebContent}/WEB-INF/web.xml">
<fileset
dir="${entornoBase}/${WebContent}">
<exclude name="**/*class*"/>
<exclude name="**/*jar*"/>
<exclude name="**/web.xml"/>
<exclude
name="**/material/**"/>
<exclude
name="**/material**"/>
</fileset>
<classes
dir="${entornoBase}${salida}/${app}/${WebClassDir}"/>
<lib
dir="${entornoBase}/${WebContent}/WEB-INF/lib" />
</war>
<delete includeemptydirs="true">
<fileset
dir="${entornoBase}${salida}/${app}/${WebClassDir}" includes="**/*"/>
</delete>
<copy todir="${entornoBaseServidor}">
<fileset
dir="${entornoBase}${salida}/${app}/${build}/${FECHA}"/>
</copy>
<record name="${logs}/${FECHA}_log.txt"
action="stop"/>
</target>
</project>
|