I ran into an issue of server timeouts with embedded Tomcat in my Maven build once I moved to my Linux Build Server.

I defined the cargo plugin as that is starting my embedded Tomcat during the build:

<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0-alpha-4</version>
<configuration>
<wait>${cargo.wait}</wait>
<container>
<containerId>${cargo.container}</containerId>
<output>${project.build.directory}/${cargo.container}.log</output>
<log>
${project.build.directory}/${cargo.container}-cargo.log
</log>
<zipUrlInstaller>
<url>${cargo.container.url}</url>
<installDir>${installDir}</installDir>
</zipUrlInstaller>
</container>
...
</plugin>
<cargo.container>tomcat5x</cargo.container>
<cargo.container.home>${env.CATALINA_HOME}</cargo.container.home>
<cargo.container.url>
http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip
</cargo.container.url>
<cargo.host>localhost</cargo.host>
<cargo.port>8888</cargo.port>
<cargo.logging>high</cargo.logging>
<!-- ThisĀ  setting holds the container at your prompt -->
<cargo.wait>false</cargo.wait>

The issue stemmed from:
<cargo.container.url>
    http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip
</cargo.container.url>

The server would not seem to get the zip downloaded sometimes.
My solution was to add an entry in my settings.xml on the build machine to point to a local copy of my tomcat binaries like:
<cargo.container.url>
    file:////var/www/html/apache-tomcat-5.5.26.zip
</cargo.container.url>

So I did manually download apache-tomcat-5.5.26.zip and add it to my file system, but I have not had any issues with timeouts since.

Mick Knutson

Java, JavaEE, J2EE, WebLogic, WebSphere, JBoss, Tomcat, Oracle, Spring, Maven, Architecture, Design, Mentoring, Instructor and Agile Consulting. http://www.baselogic.com/blog/resume

View all posts

Java / JavaEE / Spring Boot Channel

BLiNC Supporters

BLiNC Adsense

Archives

Newsletter