I have a tomcat7. Access to manager app (http://localhost:7777/manager/html) works fine with the credentials defined in tomcat-users.xml.
Now I want to deploy an application with maven3. I configured the tomcat maven plugin:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<url>http://localhost:7777/manager</url>
<server>localhost7777</server>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<url>http://localhost:7777/manager</url>
<server>localhost7777</server>
</configuration>
</plugin>
In mavens setting.xml I added the entry for the server:
<servers>
<server>
<id>localhost7777</id>
<username>manager</username>
<password>secret</password>
</server>
</servers>
Now application will be build successful. But the goal tomcat7:deploy leads to a access denied error message from the tomcat:
...
[INFO] Deploying war to http://localhost:7777/workload-monitor
Uploading: http://localhost:7777/manager/deploy?path=%2Fworkload-monitor&update=true
Uploaded: http://localhost:7777/manager/deploy?path=%2Fworkload-monitor&update=true (2329 KB at 55435.1 KB/sec)
[INFO] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
[INFO] <html>
[INFO] <head>
[INFO] <title>403 Access Denied</title>
[INFO] <style type="text/css">
[INFO] <!--
...
Could somebody give me a hint?
To follow up on this question I actually ran into this issue setting up my ubuntu box recently and my solution, instead of /html was actually to point at /text: Code:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<url>http://localhost:8080/manager/text</url>
<username>admin</username>
<password>admin</password>
</configuration>
</plugin>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With