ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vinod.na...@iflexsolutions.com>
Subject RE: war deploy
Date Tue, 11 May 2004 13:07:48 GMT
Hi All,

I have similar task like this in my build.xml

    <target name="initdb" description="Re-Compiles a procedure">
        <sql driver="${jdbc.mysql.driver}"
            classpathref="jdbc.driver.cp"
            url="${install.dburl}"
            userid="" password=""
            print="yes">
            <transaction src="procdure.sql"/>
        </sql>
    </target>

Though the procedure successfully gets compiled in the SQL plus window
it does not through this Ant task.

Am I missing anything here.
It gives the SQL error at CURSOR declaration of the procedure.

Regards,
Vinod.

-----Original Message-----
From: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com]
Sent: Tuesday, May 11, 2004 2:55 PM
To: Ant Users List; pvalle@eprocess.fr
Subject: Re: war deploy


Hello Philippe,

a month ago I created a web app installion script,
which creates db for the app and deploys the war. I am
sending you the whole script (it is small). "deploy"
target will be of interest of you. I do not use tomcat
ant tasks, since deploying in tomcat is a matter of
single <copy>. 

Note also that my "deploy" target should be invoked
when tomcat is _started_. Of course, you can start
tomcat via your ant script too. If you want this
message me and I will send you more scripts.

Regards Ivan

----  install.xml ----
<!DOCTYPE project [<!ENTITY package "iatinstall">]>
<project name="iatinstall" default="usage"
basedir=".">
    <description>IAT installation script; installs IAT
distribution</description>

    <target name="usage">
    </target>

    <target name="-init" depends=""
description="Initializes the neccessary properties">
        <property environment="env"/>
        <!-- Servlet Container Property -->
        <property name="catalina.home"
value="${env.CATALINA_HOME}"/>
        <property name="jdbc.mysql.driver.lib"
value="mysql-connector-java-3.0.6-stable-bin.jar"/>
        <property name="jdbc.mysql.driver"
value="org.gjt.mm.mysql.Driver"/>
        <property name="install.lib"
value="${basedir}/lib"/>
        <property name="install.sql"
value="${basedir}/sql"/>
        <property name="install.dbname"
value="iatbonea"/>
        <property name="install.dburl"
value="jdbc:mysql://localhost:3306/${install.dbname}"/>
        <property name="install.context"
value="iatbonea"/>
        <property name="install.port" value="8080"/>
        <property name="install.httpurl"
value="http://localhost:${install.port}/${install.context}/index.jsp"/>
        <property name="project.name"
value="iatbonea"/>
        <path id="jdbc.driver.cp">
            <pathelement
location="${install.lib}/${jdbc.mysql.driver.lib}"/>
        </path>
    </target>

    <target name="initdb" depends="-init"
description="Creates and populates iat tables">
        <sql driver="${jdbc.mysql.driver}"
            classpathref="jdbc.driver.cp"
            url="${install.dburl}"
            userid="" password=""
            print="yes">
            <transaction
src="${install.sql}/create.sql"/>
            <transaction
src="${install.sql}/insert.sql"/>
        </sql>
    </target>

    <target name="deploy" depends="-init"
description="Deploys the IAT war">
        <copy file="${basedir}/${project.name}.war"
todir="${catalina.home}/webapps"/>
        <waitfor timeoutproperty="time.out.property">
            <http url="${install.httpurl}"/>
        </waitfor>
        <fail if="time.out.property"
message="Deployment failed. Check whether Tomcat
Service is started and if not start it."/>
        <echo message="Deployment finished. IAT
application is ready to be accessed"/>
    </target>

</project>



--- Philippe Valle <pvalle@eprocess.fr> wrote:
> HI,
> 
> 
> how to deploy WAR file with ant 1.6.1 ( i use tomcat
> 4.1.29 ) :
> 
> 
> this lines in build.xml file doesnt works :
> 
> <-- Configure the custom Ant tasks for the Manager
> application -->
>    <taskdef name="deploy"    
> classname="org.apache.catalina.ant.DeployTask"/>
>    <taskdef name="install"   
> classname="org.apache.catalina.ant.InstallTask"/>
>    <taskdef name="list"     
> classname="org.apache.catalina.ant.ListTask"/>
>    <taskdef name="reload"    
> classname="org.apache.catalina.ant.ReloadTask"/>
>    <taskdef name="remove"    
> classname="org.apache.catalina.ant.RemoveTask"/>
>    <taskdef name="resources" 
> classname="org.apache.catalina.ant.ResourcesTask"/>
>    <taskdef name="roles"     
> classname="org.apache.catalina.ant.RolesTask"/>
>    <taskdef name="start"     
> classname="org.apache.catalina.ant.StartTask"/>
>    <taskdef name="stop"     
> classname="org.apache.catalina.ant.StopTask"/>
>    <taskdef name="undeploy"  
> classname="org.apache.catalina.ant.UndeployTask"/>
> 
> 
> Thanks , for sample code .
> 
> Philip
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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


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


Mime
View raw message