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

  • Home
  • SEARCH
  • 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 6591583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:26:30+00:00 2026-05-25T17:26:30+00:00

I am trying to deploy a war to a remote tomcat server from maven,

  • 0

I am trying to deploy a war to a remote tomcat server from maven, but I get the following error in NetBeans:

Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli)
on project noca: Cannot invoke Tomcat manager:
Server returned HTTP response code: 401 for URL:
http://12.34.56.78/manager/html/deploy?path=%2Fnoca&war= -> [Help 1]

I find it strange that there is no value for war and I don’t know why.

When I browse this URL, I get the following in Tomcat’s manager:

FAIL - Invalid context path null was specified

Here is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.test</groupId>
    <artifactId>noca</artifactId>
    <version>1.0.0</version>
    <packaging>war</packaging>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>6.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <configuration>
                    <server>Plasma01</server>
                    <url>http://12.34.56.78/manager/html</url>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>

The server is properly defined in my maven setting.xml.

What am I doing wrong?

P.S.: I have seen this similar question, but it does not answer the issue I have.

SOLUTION

For the record, I modified my pom.xml as following following Alexey’s suggestion and it works:

    <!-- plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <configuration>
            <server>Plasma01</server>
            <url>http://12.34.56.78/manager/html</url>
        </configuration>
    </plugin -->

    <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
            <container>
                <containerId>tomcat6x</containerId>
                <type>remote</type>
            </container>
        <configuration>
        <type>runtime</type>
        <properties>
            <cargo.tomcat.manager.url>
                http://12.34.56.78/manager
            </cargo.tomcat.manager.url>
            <cargo.remote.username>xxxx</cargo.remote.username>
            <cargo.remote.password>yyyy</cargo.remote.password>
        </properties>
        </configuration>
            <deployer>
                <type>remote</type>
                <deployables>
                    <deployable>
                        <groupId>net.test</groupId>
                        <artifactId>noca</artifactId>
                        <type>war</type>
                    </deployable>
                </deployables>
            </deployer>
        </configuration>
    </plugin>
  • 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-25T17:26:35+00:00Added an answer on May 25, 2026 at 5:26 pm

    Try to user cargo to control tomcat and deployment, it’s easy and worked.

    • 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 WAR on the mentioned tomcat application server. However
I'm trying to deploy a war to a Apache Tomcat server (Build 6.0.24) using
I'm trying to deploy a war file onto my server which is tomcat 6
I am trying to deploy a webapplication using maven cargo plugin into tomcat server.
I'm using the Cargo Maven plugin to deploy a WAR to a remote server,
Hi I'm trying to build/deploy war to websphere process server 7.0. and I run
I am trying to deploy a war file to tomcat 6.0.27. This war file
I am trying to deploy the sample-app war file that comes with PushSDK.But was
I'm trying to deploy simple Rails app on glassfish v3 and get the following
I am trying to deploy and run my webapplication using maven and its tomcat

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.