I am trying to use the eclipse maven plugin but when using the command:
tomcat7:deploy I am getting build successful with lots of html output explaining about adding users, I have added the user to tomcat with only manager-script. and added that to the user of settings.xml in maven.
What am I doing wrong?
From the tomcat logs
127.0.0.1 - - [29/Aug/2012:23:50:34 +0100] "PUT /manager/text/deploy?path=%2F HTTP/1.1" 401 2486
my cofigurations
pom.xml
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<server>tomcat_7</server>
<port>8180</port>
<path>/</path>
<url>http://localhost:8180/manager/text</url>
</configuration>
</plugin>
</plugins>
settings.xml
<server>
<id>tomcat_7</id>
<username>admin</username>
<password>secret</password>
</server>
tomcat-users.xml
<user username="admin" password="secret" roles="manager-script" />
OK so I managed to fix the problem.
I checked where the eclipse thought the maven settings.xml file was. This was the main problem, there was no settings.xml file therefore no authentication. I coppied the file to the path specified in eclipse.
The build is now successful.