ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Problem with *.properties generating War
Date Mon, 14 Dec 2009 09:59:05 GMT
Your WAR is build by

<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>

Which fileset/classes/lib should include the properties files? 

Maybe this:
<war...>
  <classes dir="${entornoBase}${salida}/${app}/${WebClassDir}"/>
</war>

This relies on
<javac destdir="${entornoBase}${salida}/${app}/${WebClassDir}"
       includes="**/${path}/${filej}.*,**/${filej}.*"
       excludes="**/*EJB/*.*,**/**ejb/**/*.*"
       classpath="${classpath}" optimize="on" deprecation="on">
  <src path="${entornoBase}/${fuentes}"/>
</javac>

Are the properties files in "${entornoBase}${salida}/${app}/${WebClassDir}"?
Maybe you must copy them to that directory (or include their dir in the war...)


<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}"/>
  <classes dir="${entornoBase}/${fuentes}" includes="**/*.properties"/>
  <lib dir="${entornoBase}/${WebContent}/WEB-INF/lib" />
</war>


Jan



> -----Urspr√ľngliche Nachricht-----
> Von: Koxkorrita [mailto:koxkorrita@laudio.info] 
> Gesendet: Sonntag, 13. Dezember 2009 18:10
> An: 'Ant Users List'
> Betreff: Problem with *.properties generating War
> 
> 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}l
> og4j/log4j-1.2
> .8.jar:${pathLibrerias}correo/mail.jar:${pathLibrerias}jakarta
> /poi/poi-2.5.1
> -final-20040804.jar:${pathLibrerias}servlet-api/servlet-api.ja
> r:${pathLibrer
> ias}jakarta/commons/commons-beanutils.jar:${pathLibrerias}jaka
> rta/commons/co
> mmons-collections-3.1.jar:${pathLibrerias}jakarta/commons/comm
> ons-dbcp-1.2.1
> .jar:${pathLibrerias}jakarta/commons/commons-digester.jar:${pa
> thLibrerias}ja
> karta/commons/commons-el.jar:${pathLibrerias}jakarta/commons/c
> ommons-fileupl
> oad-1.1.jar:${pathLibrerias}jakarta/commons/commons-logging.ja
> r:${pathLibrer
> ias}jakarta/commons/commons-pool-1.2.jar:${pathLibrerias}jakar
> ta/commons/com
> mons-validator.jar:${pathLibrerias}jakarta/jakarta-oro.jar:${p
> athLibrerias}j
> akarta/jakarta-taglibs-standar-1.1.2.jar:${pathLibrerias}jstl/
> jstl.jar:${pat
> hLibrerias}struts/standar.jar:${pathLibrerias}struts/struts.ja
> r:${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="-----&gt;&gt;&gt;&gt;&gt;  USO: ant
> opciones"/>
> 
>                         <echo message="-----&gt;&gt;&gt;&gt;&gt;
 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="-----&gt;&gt;&gt;&gt;&gt;  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="-----&gt;&gt;&gt;&gt;&gt;  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>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message