Thanks for your reply. I made the changes that you suggested but tomcat:deploy still fails with the same error.
tomcat:run works, but it was already working before. My POM file is attached, if you could have a look at it, it would be great. It's a small POM, I've only just started my App. Thanks in advance, Op 27 april 2012 12:14 schreef Olivier Lamy <ol...@apache.org> het volgende: > Hello, > > That's something which has been fixed in trunk (I will probably > release a 2.0 next week). > > > 2012/4/27 Henrique Ordine <hord...@gmail.com>: > > Hi everybody, > > > > I'm trying to deploy my Maven Web App on my local Tomcat using the > > tomcat:deploy maven plugin, but the Manager application fails with a > > response code 401. > > > > I have Tomcat 6 installed on Mac OS Leopard, with Java 1.5. I manage to > > access my Tomcat/manager app with the user "hordine", that I configured > and > > deploy > > > > I've configured my tomcat-users.xml, settings.xml, and POM files, like > this: > > > > I've added this user to my tomcat-users.xml: > > <role rolename="tomcat"/> > > <role rolename="manager"/> > > <role rolename="manager-script"/> > > <user username="tomcat" password="tomcat" roles="tomcat"/> > > <user username="maventomcat" password="maventomcat" roles="manager"/> > > <user username="hordine" password="hordine" roles="manager, > > manager-script"/> > > > > > > I've added this server to my settings.xml: > > <servers> > > <server> > > <id>hordineLocalTomcat</id> > > <username>hordine</username> > > <password>hordine</password> > > </server> > > </servers> > > > > And I've configured my POM like this: > > > > <build> > > > > <finalName>hTask-web</finalName> > > > > <pluginManagement> > > > > <plugins> > > > > <plugin> > > > > <groupId>org.apache.tomcat.maven</groupId> > > > > <artifactId>tomcat-maven-plugin</artifactId> > > > > <version>1.1</version> > > Sure of that ???? > > But to test if your issue is fixed in trunk try > <version>2.0-SNAPSHOT</version> > > see mojo declaration and repositories here: > http://tomcat.apache.org/maven-plugin-2.0-SNAPSHOT/snapshot-test.html > > > > > <configuration> > > > > <url>http://localhost:8080/manager</url> > > > > <server>hordineLocalTomcat</server> > > > > <path>/hTask-web</path> > > > > </configuration> > > > > </plugin> > > > > </plugins> > > > > </pluginManagement> > > > > </build> > > > > > > I'd appreciate any help. > > > > This is the entire error's stack trace: > > > > Embedded error: Server returned HTTP response code: 401 for URL: > > http://localhost:8080/manager/deploy?path=%2FhTask-web&war= > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] Trace > > org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke > > Tomcat manager > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:592) > > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke > > Tomcat manager > > at > > > org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:149) > > at > > > org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:70) > > at > > > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) > > at > > > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) > > ... 17 more > > Caused by: java.io.IOException: Server returned HTTP response code: 401 > for > > URL: http://localhost:8080/manager/deploy?path=%2FhTask-web&war= > > at > > > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1196) > > at org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:604) > > at > org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:662) > > at org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:295) > > at > > > org.codehaus.mojo.tomcat.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:85) > > at > > > org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:85) > > at > > > org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:141) > > ... 20 more > > > > > > -- > > Henrique Ordine > > > > http://hordine.wordpress.com/ > > > > -- > Olivier Lamy > Talend: http://coders.talend.com > http://twitter.com/olamy | http://linkedin.com/in/olamy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Henrique Ordine http://hordine.wordpress.com/
<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.hordine</groupId> <artifactId>hTask-web</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>hTask-web Maven Webapp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <spring.version>3.0.0.RELEASE</spring.version> </properties> <repositories> <repository> <id>people.apache.snapshots</id> <url>http://repository.apache.org/content/groups/snapshots-group/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.hordine</groupId> <artifactId>htask-api</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> <build> <finalName>hTask-web</finalName> <pluginManagement> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat6-maven-plugin</artifactId> <version>2.0-SNAPSHOT</version> <configuration> <url>http://localhost:8080/manager</url> <server>hordineLocalTomcat</server> <path>/</path> </configuration> </plugin> </plugins> </pluginManagement> </build> </project>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org