我从maven启动了我的ant-target(tomcat-start)...服务器启动...也部署了war。但它并没有在服务器启动后显示构建成功......它显示如下......
[java] touko 25, 2016 9:07:37 AP. org.apache.catalina.core.AprLifecycleListener init
[java] INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\jdk1.7.0_17\jre\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jre1.8.0_92/bin/client;C:/Program Files/Java/jre1.8.0_92/bin;C:/Program Files/Java/jre1.8.0_92/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath\;C:\Windows\System32\;C:\jdk1.7.0_17\bin\;C:\apache-maven-3.3.9\bin\;C:\ANT\apache-ant-1.8.2\bin;C:\eclipse-jee-mars-2-win32\eclipse;;.
[java] touko 25, 2016 9:07:38 AP. org.apache.coyote.AbstractProtocol init
[java] INFO: Initializing ProtocolHandler ["http-bio-8060"]
[java] touko 25, 2016 9:07:38 AP. org.apache.coyote.AbstractProtocol init
[java] INFO: Initializing ProtocolHandler ["ajp-bio-28009"]
[java] touko 25, 2016 9:07:38 AP. org.apache.catalina.startup.Catalina load
[java] INFO: Initialization processed in 1454 ms
[java] touko 25, 2016 9:07:38 AP. org.apache.catalina.core.StandardService startInternal
[java] INFO: Starting service Catalina
[java] touko 25, 2016 9:07:38 AP. org.apache.catalina.core.StandardEngine startInternal
[java] INFO: Starting Servlet Engine: Apache Tomcat/7.0.50
[java] touko 25, 2016 9:07:38 AP. org.apache.catalina.startup.HostConfig deployWAR
[java] INFO: Deploying web application archive C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\Kantayhteystesti.war
[java] touko 25, 2016 9:07:39 AP. org.apache.catalina.util.SessionIdGenerator createSecureRandom
[java] INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [160] milliseconds.
[java] touko 25, 2016 9:07:39 AP. org.apache.catalina.startup.HostConfig deployWAR
[java] INFO: Deploying web application archive C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\log4jtest.war
[java] touko 25, 2016 9:07:40 AP. org.apache.catalina.startup.HostConfig deployDirectory
[java] INFO: Deploying web application directory C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\docs
[java] touko 25, 2016 9:07:40 AP. org.apache.catalina.startup.HostConfig deployDirectory
[java] INFO: Deploying web application directory C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\examples
[java] touko 25, 2016 9:07:43 AP. org.apache.catalina.startup.HostConfig deployDirectory
[java] INFO: Deploying web application directory C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\host-manager
[java] touko 25, 2016 9:07:43 AP. org.apache.catalina.startup.HostConfig deployDirectory
[java] INFO: Deploying web application directory C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\manager
[java] touko 25, 2016 9:07:44 AP. org.apache.catalina.startup.HostConfig deployDirectory
[java] INFO: Deploying web application directory C:\personaltitaniaTomcat\apache-tomcat-7.0.50\webapps\ROOT
[java] touko 25, 2016 9:07:44 AP. org.apache.coyote.AbstractProtocol start
[java] INFO: Starting ProtocolHandler ["http-bio-8060"]
[java] touko 25, 2016 9:07:44 AP. org.apache.coyote.AbstractProtocol start
[java] INFO: Starting ProtocolHandler ["ajp-bio-28009"]
[java] touko 25, 2016 9:07:44 AP. org.apache.catalina.startup.Catalina start
[java] INFO: Server startup in 6425 ms
[java] touko 25, 2016 9:07:54 AP. org.apache.catalina.sta
我需要在此之后建立成功消息....我怎么能得到它?任何人请建议我。提前谢谢。
答案 0 :(得分:0)
通过在ant build.xml中添加spawn,我们可以解决这个问题...... Spawn将用于在后台运行命令,因此tomcat启动将在后台运行,而tomcat启动旁边的配置文件也将运行....建立成功也将显示出来。