Tomcat-Maven-401-Fehler: Cannot invoke Tomcat-manager

Ging durch die meisten der Fehler werden in StackOverFlow und konnte immer noch nicht lösen. Ich versuche zum bereitstellen einer SpringMVC Anwendung. Aber, ich kann einfach nicht damit es funktioniert.

Maven-Deploy-Fehler:

[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:redeploy (default-cli) on project productmgmt: Cannot invoke Tomcat manager: Server returned HTTP response code: 401 for URL: http://localhost:8080/manager/text/deploy?path=%2Fproductmgmt&war=&update=true -> [Help 1]

Pom.xml:

<build>
        <finalName>productmgmt</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>tomcat-maven-plugin</artifactId>
                <configuration>
                    <url>http://localhost:8080/manager/text</url>
                    <path>/productmgmt</path>
                    <username>admin</username>
                    <password>password</password>
                </configuration>
            </plugin>
        </plugins>
    </build>

Tomcat-Users.xml

<role rolename="admin"/>
  <role rolename="manager"/>
  <user username="admin" password="admin" roles="admin,manager"/>
</tomcat-users>

Mehr Informationen:

[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Dieser arbeitete für mich

<role rolename="manager-script"/>
<role rolename="admin-script"/>
<user password="password" roles="manager-script,admin-script" username="admin"/>
</tomcat-users>
  • admin-Skript-Dingens hat es für mich. Hatte keine Ahnung von dieser Rolle. Danke, Lebensretter !
InformationsquelleAutor AppSensei | 2012-10-05
Schreibe einen Kommentar