ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject RE: war deploy
Date Tue, 11 May 2004 16:16:50 GMT
Hi, Vinod,
can you tell me what db you are using and how exactly
your procedure fails. Also did you try starting ant
with verbose -v option? What does it output?

--- vinod.nayak@iflexsolutions.com wrote:
> Thanks for your reply.
> 
> Actually there are absolutely no comments in the
> file.
> if the procedure.sql is a collection db
> insert/update statements
> it works fine. but if it is a db procedure it fails.
> 
> Rgds,
> Vinod
> 
> -----Original Message-----
> From: Ivan Ivanov
> [mailto:rambiusparkisanius@yahoo.com]
> Sent: Tuesday, May 11, 2004 6:52 PM
> To: Ant Users List
> Subject: RE: war deploy
> 
> 
> Hi Vinod,
> 
> I also had small difficulties with <sql> task -
> syntactically correct statements were not executed.
> The problem was fixed when I removed sql comments
> from
> my *.sql files. You can try these:
> - remove comments from your sql files with
> <striplinecomments>
> - add keepformat="yes" attribute to <sql> task
> HTH
> Ivan
> 
> P.S. There was some discussion in the list about
> comment symbols in sql files and ant developers
> opened
> bug 'Add "commentchars" attribute to Sql task'
>
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=28394)
> If you want you can vote for this.
> 
> 
> --- vinod.nayak@iflexsolutions.com wrote:
> > 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"/>
> 
=== message truncated ===



	
		
__________________________________
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


Mime
View raw message