java - Create a WAR file with version using ANT -
i have problem trying build war file version number. build.properties
jboss.home=d\:\java\jboss-as-7.1.1.final
version=2.0
and part of ant task
<project name="as2-jboss7" basedir="../" default="deploy"> <!-- configuraciones del proyecto --> <property name="project.distname" value="as2" /> <!-- paths locales del sistema --> <property file="${basedir}/ant/build.properties" /> <property name="webroot.dir" value="${basedir}/webcontent" /> <property name="webinf.dir" value="${webroot.dir}/web-inf" /> <property name="build.dir" value="build" /> <!-- build project --> <target name="build" depends="prepare,compile" /> <target name="rebuild" depends="clean,prepare,compile" /> <!-- crea el war de la aplicacion --> <target name="war" depends="build"> <mkdir dir="${build.dir}" /> <war basedir="${webroot.dir}" warfile="${build.dir}/${project.distname}_${version}.war" webxml="${webinf.dir}/web.xml"> <exclude name="web-inf/${build.dir}/**" /> <exclude name="web-inf/otros/**" /> </war> </target> <!-- despliega el proyecto --> <target name="deploy" depends="war"> <delete file="${deploy.dir}/${project.distname}.war" /> <delete dir="${deploy.dir}/${project.distname}" /> <copy file="${build.dir}/${project.distname}_${version}.war" todir="${deploy.dir}" /> </target> </project>
when build war file name as2_2.0.war , correct, when view site in web browser have write url:
http://localhost:8030/as2_2.0/login.jsf
what want war version as2_2.0 url not contain version number, how that?
this has nothing ant, application server using name of war default. want change "context root" web application. if google phrase, along name of application server (e.g. "tomcat" or "jboss"), i'm sure you'll find answer. or, if tell me server you're using can try , you.
Comments
Post a Comment