0

I started my ant-target(tomcat-start) from maven...server is started...war is also deployed. But it is not showing build success after server-startup....it is showing like this...

[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 

I need build success message after this....How can i get that? Anyone please suggest me. Thank you in advance.

elee
  • 43
  • 1
  • 5
  • Does the process (Tomcat) that you're starting with antrun plugin terminate successfully? If it doesn't start Tomcat in a separate process, it doesn't terminate, so antrun build step doesn't finish, so the build itself doesn't progress. This shouldn't matter to you if you're doing this just for manually debugging your web application. What is your use case? – Anton Koscejev May 25 '16 at 11:55
  • Thanks for responding Anton Koscejev...Yes it is terminating successfully....I am stopping the tomcat first and then starting it...after tomcat startup my maven-echo -plugin is not working and i don't understand the reason why it is not going to another plugin after server startup...and for a trail process i removed my maven-echo-plugin also...still it is not showing build successful....everything is fine with tomcat start,stop and deploy also... – elee May 25 '16 at 12:42
  • Normally the build would be hanging like this only if the task is not fully finished, such as when the startup script doesn't return until the server stops. I don't have much experience with antrun plugin itself, so I cannot say for sure what might be the cause. I would recommend trying to use a [maven tomcat plugin](http://tomcat.apache.org/maven-plugin-trunk/tomcat7-maven-plugin/run-mojo.html) to start tomcat. You can set fork=true to make maven continue with the build after tomcat is started. – Anton Koscejev May 25 '16 at 14:26
  • Ok...I tried to start tomcat through maven tomcat plugin but I am not able to start that automatically....we need to start that manually....If you have any idea of starting the tomcat automatically please suggest me...Thank you Anton Koscejev :) – elee May 26 '16 at 09:36
  • Can you elaborate why you're unable to start automatically? What have you tried and what failed? (Sounds like you could submit a separate question for that. ;) – Anton Koscejev May 26 '16 at 10:02
  • I have tried this one. Any corrections in this?org.apache.tomcat.maventomcat7-maven-plugin2.2tomcat-runrun-war-onlypre-integration-testexisting/C:/apache-tomcat-7.0.68http://localhost:8080/manager/textmyserver/${project.artifactId}usernamepassword – elee May 26 '16 at 12:34
  • I've never used Tomcat plugin, but I did set up integration tests using Wildfly plugin that offers similar functionality. Perhaps I (or even someone else) can help you, but unfortunately it would be extremely hard to investigate this when even your configuration doesn't fit into a comment. Please start a new question with the config you're using as a code block, as well as build output that it produces, including any errors that prevent it from running. – Anton Koscejev May 26 '16 at 14:25
  • okk thank you Anton:) – elee May 27 '16 at 04:57

1 Answers1

0

By adding spawn in ant build.xml we can overcome this problem...Spawn will be used to run the commands in background so tomcat startup will run in background and the profiles next to tomcat start will also run....Build success will also be shown.

elee
  • 43
  • 1
  • 5