Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6084175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:29:26+00:00 2026-05-23T11:29:26+00:00

I’m trying to setup maven cargo plugin. I have the following requirements: tomcat 6

  • 0

I’m trying to setup maven cargo plugin. I have the following requirements:

  • tomcat 6
  • custom server.xml
  • custom context.xml
  • log4j jar deployed to tomcat lib
  • install tomcat on the machine if it’s not there already
  • tie to maven’s install lifecycle phase to deploy a war and restart the container
  • make the deployed war be ROOT.war

I’ve followed the following: http://www.java-tutorial.ch/maven/maven-tomcat-deployment-using-cargo. This isn’t the complete feature set I want, and even it doesn’t work entirely. This is what I get:

Can't load log handler "4host-manager.org.apache.juli.FileHandler"
[INFO] [talledLocalContainer] java.lang.ClassNotFoundException: 4host-manager.org.apache.juli.FileHandler

And then when mvn install returns I do ps -ef and there’s no tomcat process.

Also it copies the war to ROOT.war but the old ROOT/ directory is not replaced so the new ROOT.war doesn’t actually get deployed.

For the “install tomcat if not already there” requirement, it seems like this should be absolutely straightforward, yet when I provide

 <zipUrlInstaller>
     <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</url>
     <extractDir>/usr/local</extractDir>
  </zipUrlInstaller>

and run mvn cargo:install, it throws this:

org.codehaus.cargo.container.ContainerException: Failed to get container installation home as the container has not yet been installed. Please call install() first.

Which is puzzling. It wants me to call install first, but I AM calling install.

Ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:29:26+00:00Added an answer on May 23, 2026 at 11:29 am

    Link you followed has given demo for cargo 1.0.6. Recent version available is 1.1.1 so I suggest you to use recent and there is certain changes in child tags

    As described in post http://cargo.codehaus.org/Deploying+to+a+running+container. There are ceratin changes in child tags of ZipUrlInstaller.

     <!--
            Careful: As described in the ZipUrlInstaller documentation,
            Cargo versions older than 1.1.0 accept only installDir, you therefore
            need to set installDir instead of downloadDir and extractDir.
            -->
    

    Try to use maven archetype to create cargo sample project following post http://cargo.codehaus.org/Maven2+Archetypes. I suggest you to user “Single Webapp Module Archetype”

    After setting up maven project, You can install tomcat 6 running mvn cargo:install -P tomcat6x command.

    pom.xml snippet of “single webapp module archetype” which can be useful for you.

    <profiles>
        <profile>
            <id>tomcat6x</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.codehaus.cargo</groupId>
                            <artifactId>cargo-maven2-plugin</artifactId>
                            <configuration>
                            <wait>true</wait>
                                <container>
                                    <containerId>tomcat6x</containerId>
    
                                    <!-- download zip url -->
                                    <zipUrlInstaller>
                                        <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</url>
                                        <downloadDir>${project.build.directory}/downloads</downloadDir>
                                        <extractDir>${project.build.directory}/extracts</extractDir>
                                    </zipUrlInstaller>
                                </container>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
    

    where wait parameter true will give you option to check whether server is running or not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.