Author: olamy
Date: Sat Oct 15 23:08:48 2011
New Revision: 1183764
URL: http://svn.apache.org/viewvc?rev=1183764&view=rev
Log:
fix web.xml use in test and wait indefinitely after container start
Modified:
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
Modified:
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml?rev=1183764&r1=1183763&r2=1183764&view=diff
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
(original)
+++
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/it/simple-war-exec-project/src/main/webapp/web.xml
Sat Oct 15 23:08:48 2011
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,8 +19,7 @@
under the License.
-->
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
Modified:
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
URL:
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java?rev=1183764&r1=1183763&r2=1183764&view=diff
==============================================================================
---
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
(original)
+++
tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
Sat Oct 15 23:08:48 2011
@@ -95,7 +95,7 @@ public class Tomcat7Runner
{
container.setConfig( new File( extractDirectory,
"conf/server.xml" ).getAbsolutePath() );
}
- container.start();
+ container.start();
} else {
tomcat = new Tomcat();
tomcat.getHost().setAppBase(new File(extractDirectory,
"webapps").getAbsolutePath());
@@ -149,10 +149,30 @@ public class Tomcat7Runner
//ajpConnector.setURIEncoding(uriEncoding);
tomcat.getService().addConnector( ajpConnector );
}
+
tomcat.start();
}
+ waitIndefinitely();
+
+ }
+
+ private void waitIndefinitely()
+ {
+ Object lock = new Object();
+
+ synchronized ( lock )
+ {
+ try
+ {
+ lock.wait();
+ }
+ catch ( InterruptedException exception )
+ {
+ System.exit( 1 );
+ }
+ }
}
public void stop()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]