Skip to content

Commit ca62977

Browse files
committed
Fixed apidocs test problem with reflections 0.9.9 which caused travis to timeout
Added timeout to URLConnection in LibvirtConsoleProxyLoadCommandWrapper to speed up failed state detection Added surefire options to maven to greatly speed up tests (especially on VMs). Some tests were idle for many minutes before completing. Fix another apidocs build issue, jenkins should be happy now :) Moved tomcat version control to parent pom, fixed minor maven warning about module version Fix master was not building centos63 Fix master was not building deb Cleanups Remove tomcat dependency for debian Fix apidocs tests
1 parent 024a774 commit ca62977

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+167
-3201
lines changed

client/pom.xml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,23 @@
407407
</execution>
408408
</executions>
409409
</plugin>
410+
<plugin>
411+
<groupId>com.googlecode.todomap</groupId>
412+
<artifactId>maven-jettygzip-plugin</artifactId>
413+
<version>0.0.4</version>
414+
<configuration>
415+
<webappDirectory>${project.build.directory}/generated-webapp</webappDirectory>
416+
<outputDirectory>${project.build.directory}/generated-webapp</outputDirectory>
417+
</configuration>
418+
<executions>
419+
<execution>
420+
<phase>prepare-package</phase>
421+
<goals>
422+
<goal>process</goal>
423+
</goals>
424+
</execution>
425+
</executions>
426+
</plugin>
410427
<plugin>
411428
<groupId>org.apache.maven.plugins</groupId>
412429
<artifactId>maven-war-plugin</artifactId>
@@ -451,7 +468,7 @@
451468
<webAppSourceDirectory>${project.build.directory}/generated-webapp</webAppSourceDirectory>
452469
<webAppConfig>
453470
<contextPath>/client</contextPath>
454-
<extraClasspath>${project.build.directory}/utilities/scripts/db/;${project.build.directory}/utilities/scripts/db/db/</extraClasspath>
471+
<extraClasspath>${project.build.directory}/conf/;${project.build.directory}/utilities/scripts/db/;${project.build.directory}/utilities/scripts/db/db/</extraClasspath>
455472
</webAppConfig>
456473

457474
<systemProperties>
@@ -501,22 +518,6 @@
501518
<copy todir="${basedir}/target/generated-webapp">
502519
<fileset dir="${basedir}/../ui"/>
503520
</copy>
504-
<copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes">
505-
<fileset dir="${basedir}/tomcatconf">
506-
<include name="*.in"/>
507-
</fileset>
508-
<globmapper from="*.in" to="*"/>
509-
<filterchain>
510-
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
511-
<param type="propertiesfile" value="${cs.replace.properties}"/>
512-
</filterreader>
513-
</filterchain>
514-
</copy>
515-
<copy overwrite="true" todir="${basedir}/target/generated-webapp/WEB-INF/classes">
516-
<fileset dir="${basedir}/tomcatconf">
517-
<exclude name="*.in"/>
518-
</fileset>
519-
</copy>
520521
<copy overwrite="true" todir="${basedir}/target/utilities/bin">
521522
<fileset dir="${basedir}/../setup/bindir">
522523
<include name="*.in"/>

client/tomcatconf/catalina.properties.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache
4444
# "foo/*.jar": Add all the JARs of the specified folder as class
4545
# repositories
4646
# "foo/bar.jar": Add bar.jar as a class repository
47-
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/usr/share/java/mysql-connector-java.jar,/usr/share/cloudstack-mysql-ha/lib/*jar
47+
common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,/usr/share/java/mysql-connector-java.jar,/usr/share/cloudstack-mysql-ha/lib/*jar,${catalina.base}/conf
4848

4949
#
5050
# List of comma-separated paths defining the contents of the "server"
File renamed without changes.

client/tomcatconf/context.xml.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
limitations under the License.
1717
-->
1818
<!-- The contents of this file will be loaded for each web application -->
19-
<Context allowLinking="true" useHttpOnly="true">
19+
<Context>
2020

21-
<!-- Default set of monitored resources -->
21+
<!-- Default set of monitored resources. If one of these changes, the -->
22+
<!-- web application will be reloaded. -->
2223
<WatchedResource>WEB-INF/web.xml</WatchedResource>
23-
24+
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
25+
2426
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
2527
<!--
2628
<Manager pathname="" />
@@ -31,5 +33,4 @@
3133
<!--
3234
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
3335
-->
34-
3536
</Context>

client/tomcatconf/logging.properties.in

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,33 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
16+
handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
1717

18-
.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
18+
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
1919

2020
############################################################
2121
# Handler specific properties.
2222
# Describes specific configuration info for Handlers.
2323
############################################################
2424

25-
1catalina.org.apache.juli.FileHandler.level = FINE
26-
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
27-
1catalina.org.apache.juli.FileHandler.prefix = catalina.
25+
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
26+
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
27+
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
2828

29-
2localhost.org.apache.juli.FileHandler.level = FINE
30-
2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
31-
2localhost.org.apache.juli.FileHandler.prefix = localhost.
29+
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
30+
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
31+
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
3232

33-
3manager.org.apache.juli.FileHandler.level = FINE
34-
3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
35-
3manager.org.apache.juli.FileHandler.prefix = manager.
33+
3manager.org.apache.juli.AsyncFileHandler.level = FINE
34+
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
35+
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
3636

37-
4host-manager.org.apache.juli.FileHandler.level = FINE
38-
4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
39-
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
37+
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
38+
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
39+
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
4040

4141
java.util.logging.ConsoleHandler.level = FINE
42-
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
42+
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
4343

4444

4545
############################################################
@@ -48,17 +48,17 @@ java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
4848
############################################################
4949

5050
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
51-
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
51+
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler
5252

5353
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
54-
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
54+
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler
5555

5656
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
57-
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
57+
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler
5858

59-
# For example, set the com.xyz.foo logger to only log SEVERE
60-
# messages:
61-
#org.apache.catalina.startup.ContextConfig.level = FINE
62-
#org.apache.catalina.startup.HostConfig.level = FINE
63-
#org.apache.catalina.session.ManagerBase.level = FINE
64-
#org.apache.catalina.core.AprLifecycleListener.level=FINE
59+
# For example, set the org.apache.catalina.util.LifecycleBase logger to log
60+
# each component that extends LifecycleBase changing state:
61+
#org.apache.catalina.util.LifecycleBase.level = FINE
62+
63+
# To see debug messages in TldLocationsCache, uncomment the following line:
64+
#org.apache.jasper.compiler.TldLocationsCache.level = FINE

client/tomcatconf/server-nonssl.xml.in

100755100644
Lines changed: 27 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
Documentation at /docs/config/server.html
2121
-->
2222
<Server port="8005" shutdown="SHUTDOWN">
23-
23+
<!-- Security listener. Documentation at /docs/config/listeners.html
24+
<Listener className="org.apache.catalina.security.SecurityListener" />
25+
-->
2426
<!--APR library loader. Documentation at /docs/apr.html -->
2527
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
2628
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
27-
<Listener className="org.apache.catalina.core.JasperListener" />
28-
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
29-
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
29+
<!-- <Listener className="org.apache.catalina.core.JasperListener" /> -->
30+
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
31+
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
3032
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
33+
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
3134

3235
<!-- Global JNDI resources
3336
Documentation at /docs/jndi-resources-howto.html
@@ -43,107 +46,36 @@
4346
pathname="conf/tomcat-users.xml" />
4447
</GlobalNamingResources>
4548

46-
<!-- A "Service" is a collection of one or more "Connectors" that share
47-
a single "Container" Note: A "Service" is not itself a "Container",
48-
so you may not define subcomponents such as "Valves" at this level.
49-
Documentation at /docs/config/service.html
50-
-->
51-
<Service name="Catalina">
52-
53-
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
54-
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
55-
maxThreads="150" minSpareThreads="25"/>
56-
57-
58-
<!-- A "Connector" represents an endpoint by which requests are received
59-
and responses are returned. Documentation at :
60-
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
61-
Java AJP Connector: /docs/config/ajp.html
62-
APR (HTTP/AJP) Connector: /docs/apr.html
63-
Define a non-SSL HTTP/1.1 Connector on port 8080
64-
-->
65-
<!--
66-
<Connector port="8080" protocol="HTTP/1.1"
67-
connectionTimeout="20000"
68-
redirectPort="8443" />
69-
-->
70-
<!-- A "Connector" using the shared thread pool-->
71-
<Connector executor="tomcatThreadPool" URIEncoding="UTF-8"
72-
port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
73-
connectionTimeout="20000" disableUploadTimeout="true"
74-
acceptCount="150" enableLookups="false" maxThreads="150"
75-
maxHttpHeaderSize="8192" redirectPort="8443" />
76-
77-
78-
<!-- Define a SSL HTTP/1.1 Connector on port 8443
79-
This connector uses the JSSE configuration, when using APR, the
80-
connector should be using the OpenSSL style configuration
81-
described in the APR documentation -->
82-
<!--
83-
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
84-
maxThreads="150" scheme="https" secure="true"
85-
clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1"
86-
keystoreType="PKCS12"
87-
keystoreFile="conf/cloud-localhost.pk12"
88-
keystorePass="password"
89-
/>
90-
-->
91-
92-
<!-- Define an AJP 1.3 Connector on port 20400 -->
93-
<Connector port="20400" protocol="AJP/1.3" redirectPort="8443" />
49+
<Service name="CloudStackManagement">
9450

51+
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
52+
maxThreads="150" minSpareThreads="25"/>
9553

96-
<!-- An Engine represents the entry point (within Catalina) that processes
97-
every request. The Engine implementation for Tomcat stand alone
98-
analyzes the HTTP headers included with the request, and passes them
99-
on to the appropriate Host (virtual host).
100-
Documentation at /docs/config/engine.html -->
54+
<Connector executor="tomcatThreadPool"
55+
port="8080" protocol="HTTP/1.1"
56+
connectionTimeout="20000"
57+
acceptCount="150"
58+
enableLookups="false"
59+
maxThreads="150"
60+
maxHttpHeaderSize="8192"
61+
redirectPort="8443" />
10162

102-
<!-- You should set jvmRoute to support load-balancing via AJP ie :
103-
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
104-
-->
10563
<Engine name="Catalina" defaultHost="localhost">
10664

107-
<!--For clustering, please take a look at documentation at:
108-
/docs/cluster-howto.html (simple how to)
109-
/docs/config/cluster.html (reference documentation) -->
110-
<!--
111-
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
112-
-->
113-
114-
<!-- The request dumper valve dumps useful debugging information about
115-
the request and response data received and sent by Tomcat.
116-
Documentation at: /docs/config/valve.html -->
117-
<!--
118-
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
119-
-->
65+
<Realm className="org.apache.catalina.realm.LockOutRealm">
66+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
67+
resourceName="UserDatabase"/>
68+
</Realm>
12069

121-
<!-- This Realm uses the UserDatabase configured in the global JNDI
122-
resources under the key "UserDatabase". Any edits
123-
that are performed against this UserDatabase are immediately
124-
available for use by the Realm. -->
125-
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
126-
resourceName="UserDatabase"/>
127-
128-
<!-- Define the default virtual host
129-
Note: XML Schema validation will not work with Xerces 2.2.
130-
-->
13170
<Host name="localhost" appBase="webapps"
132-
unpackWARs="true" autoDeploy="true"
133-
xmlValidation="false" xmlNamespaceAware="false">
134-
135-
<!-- SingleSignOn valve, share authentication between web applications
136-
Documentation at: /docs/config/valve.html -->
137-
<!--
138-
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
139-
-->
71+
unpackWARs="true" autoDeploy="true">
14072

141-
<!-- Access log processes all example.
142-
Documentation at: /docs/config/valve.html -->
143-
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
144-
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
73+
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
74+
prefix="localhost_access_log." suffix=".txt"
75+
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
14576

14677
</Host>
14778
</Engine>
14879
</Service>
80+
14981
</Server>

0 commit comments

Comments
 (0)