Some Questions and Answers for my book "Developing Enterprise Java Applications with
Spring Frameworks: An End-to-End Approach"

Q1: How do I enable deploying SOBA and MyNotes samples straight from Maven  to Tomcat 7

Step 1: Add the following <plugin> element within the <plugins> section of the pom.xml file (replace soba with mn
for the MyNotes sample):

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>        
<version>2.0-beta-1</version>
<configuration>
<url>http://localhost:8080/manager/html</url>
<server>myTomcat</server>
<path>/soba</path>
</configuration>
</plugin>

Step 2: Locate the Maven settings.xml file (in C:\Users\<yourLoginID>\.m2 on Windows) and add the following
element (assuming that you have followed the instructions in the book to configure your tomcat with the following
username and password):

<server>
<id>myTomcat</id>
<username>tomcat</username>
<password>s3cret</password>
</server>

Step 3: Make sure your Tomcat server is running

Step 4: cd to your project directory and execute mvn -DskipTests tomcat:deploy to deploy or mvn -DskipTests
tomcat:redeploy
to redeploy.
Counter

Books are my best friends ...