You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by xiaomin <xi...@126.com> on 2013/04/27 09:12:24 UTC

How to start tomcat with ant in linux OS

  Hi,dear friends,I hve a problem now and need your warm help.
  I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to
find solvent on the Internet,but got nothing. 
follow is two methods(build.xml files) that I have used,but none of them are
successful. 
1. <?xml version="1.0" encoding="GBK"?> 
<project name="startup_tomcat">
<property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/>
<target name="start-tomcat" description="tomcat starting.....">    
        <exec executable="${tomcat.home}/bin/startup.sh" spawn="true"
vmlauncher="false">    
        <env key="CATALINA_HOME" value="${tomcat.home}"/>    
        <arg line="-c start ${tomcat.home}/bin/startup.sh"/>    
      </exec>
   </target>  
</project>

2.<?xml version="1.0" encoding="GBK"?> 
<project name="startup_tomcat">
<property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/>
<target name="startup">
<exec dir="${tomcat.home}" executable="startup.sh">
<arg line="-c start ${tomcat.home}/startup.sh">
</arg>
</exec>
</target>
</project>

When I run above build.xml files,it prompt : 
"Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml 
BUILD SUCCESSFUL 
Total time: 0 seconds" 
but Tomcat haven't been started,I don't know how to do it,can you help me.
Thank you very much! 
 



--
View this message in context: http://ant.1045680.n5.nabble.com/How-to-start-tomcat-with-ant-in-linux-OS-tp5714092.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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


Re: How to start tomcat with ant in linux OS

Posted by wolfgang häfelinger <wh...@gmail.com>.
Try this variant:

3 .

<?xml version="1.0" encoding="GBK"?>
<project name="how_should_ant_know_which_target_to_run?">
<property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/>
<target name="startup">
<exec dir="${tomcat.home}" executable="startup.sh">
<arg line="-c start ${tomcat.home}/startup.sh">
</arg>
</exec>
</target>
</project>


On Sat, Apr 27, 2013 at 9:12 AM, xiaomin <xi...@126.com> wrote:

>   Hi,dear friends,I hve a problem now and need your warm help.
>   I try to start Tomcat use ant in Linux OS,but I failed.Then I attempt to
> find solvent on the Internet,but got nothing.
> follow is two methods(build.xml files) that I have used,but none of them
> are
> successful.
> 1. <?xml version="1.0" encoding="GBK"?>
> <project name="startup_tomcat">
> <property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2"/>
> <target name="start-tomcat" description="tomcat starting.....">
>         <exec executable="${tomcat.home}/bin/startup.sh" spawn="true"
> vmlauncher="false">
>         <env key="CATALINA_HOME" value="${tomcat.home}"/>
>         <arg line="-c start ${tomcat.home}/bin/startup.sh"/>
>       </exec>
>    </target>
> </project>
>
> 2.<?xml version="1.0" encoding="GBK"?>
> <project name="startup_tomcat">
> <property name="tomcat.home" value="/usr/local/Ehr_linux_2.7.2/bin"/>
> <target name="startup">
> <exec dir="${tomcat.home}" executable="startup.sh">
> <arg line="-c start ${tomcat.home}/startup.sh">
> </arg>
> </exec>
> </target>
> </project>
>
> When I run above build.xml files,it prompt :
> "Buildfile: /usr/local/rhio/apache-ant-1.9.0/case/build.xml
> BUILD SUCCESSFUL
> Total time: 0 seconds"
> but Tomcat haven't been started,I don't know how to do it,can you help me.
> Thank you very much!
>
>
>
>
> --
> View this message in context:
> http://ant.1045680.n5.nabble.com/How-to-start-tomcat-with-ant-in-linux-OS-tp5714092.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Wolfgang Häfelinger