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 8780495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:03:52+00:00 2026-06-13T20:03:52+00:00

Im using cargo to deploy a war file to a tomcat server. I’m unable

  • 0

Im using cargo to deploy a war file to a tomcat server. I’m unable to login to the manager however as conf/tomcat-users.xml is rewritten when I start the container ie

mvn cargo:run

how I can supply user/password creds to access the manager?

cheers!

Edit: Cargo configuration

<plugins>
    <!-- Start's the plugin tag for Cargo! -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
  <wait>false</wait>
  <container>
    <containerId>tomcat${tomcat.major}x</containerId>
    <zipUrlInstaller>
      <url>http://archive.apache.org/dist/tomcat/tomcat-${tomcat.major}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz</url>
      <extractDir>${project.build.directory}/extract/</extractDir>
      <downloadDir>${project.build.directory}/download/</downloadDir>
    </zipUrlInstaller>
    <output>${project.build.directory}/tomcat${tomcat.major}x.log</output>
    <log>${project.build.directory}/cargo.log</log>
  </container>
  <configuration>
    <home>${project.build.directory}/tomcat-${tomcat.version}/container</home>
    <properties>
      <cargo.logging>high</cargo.logging>
      <cargo.servlet.port>9080</cargo.servlet.port>
      <cargo.tomcat.ajp.port>9008</cargo.tomcat.ajp.port>
    </properties>
  </configuration>
</configuration>
<executions>
  <execution>
    <id>start-container</id>
    <phase>pre-integration-test</phase>
    <goals>
      <goal>start</goal>
      <goal>deploy</goal>
    </goals>
    <configuration>
      <deployer>
        <deployables>
          <deployable>
            <groupId>${project.groupId}</groupId>
            <artifactId>mod-war</artifactId>
            <type>war</type>
            <pingURL>http://localhost:9080/mod-war</pingURL>
            <pingTimeout>30000</pingTimeout>
            <properties>
              <context>mod-war</context>
            </properties>
          </deployable>
        </deployables>
      </deployer>
    </configuration>
  </execution>
  <execution>
    <id>stop-container</id>
    <phase>post-integration-test</phase>
    <goals>
      <goal>stop</goal>
    </goals>
  </execution>
</executions>

  • 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-06-13T20:03:53+00:00Added an answer on June 13, 2026 at 8:03 pm

    Found it. You can supply custom configuration through the following xml (link to cargo docs in the above comments)

          <files>
            <copy>
              <file>tomcat-users.xml</file>
              <tofile>conf/tomcat-users.xml</tofile>
              <configfile>true</configfile>
              <overwrite>true</overwrite>
            </copy>
          </files>
    

    So you can specify your own conf/*.xml or anything else and it will be copied before the container starts. I can login to the manager now 🙂

    Cheers

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

Sidebar

Related Questions

I am trying to deploy a webapplication using maven cargo plugin into tomcat server.
I was trying to deploy a WAR file using the Cargo Ant task version
I'm using the Cargo Maven plugin to deploy a WAR to a remote server,
I'm using Maven 3.0.3. I want to deploy my WAR file to a remote
I'm using the maven cargo plugin to remotely deploy a servlet in tomcat. When
I have Maven2 war project built, I'm using the cargo start plugin, and it
How can i start/stop remote tomcat using maven. I am using cargo plugin which
When I'm using Maven with the cargo plug-ing to handle hot deployments to tomcat,
I want to copy a resource file from src/main/resources to Cargo Tomcat in /target/tomcat6x/container/webapps
I am using the cargo-maven2-plugin to start and stop a tomcat container from my

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.