title: Question about maven
body: <p>I read some useful posts here on SO about previous maven questions, I'm currently very interested in learning maven(cause I like it and because my boss requires me to). I'm currently reading [this][1] book and I'm working my way trough examples. Its a straightforward book but its has some errors inside(trivial ones), yet for a newbie like me can be hard to spot, once spotted it can be easily fixed. Is there any other book better to understand maven from top to bottom?</p>
  
  <p>Second part of the question is relating an example in this book, maybe a simple explanations would resolve my doubts. </p>
  
  <p>Here is the thing, I made a <code>simple-weather</code> project in java which retrieves the weather conditions from yahoo weather server, given the particular zip code it returns weather information. </p>
  
  <p>Then I made an 'simple-webapp'(with maven as well as the one above I forgot to mention that), which is basicaly a web project which has some default servlet already there with maven and it does nothing.</p>
  
  <p>And I have some <code>parent-project</code> I wanna merge those two projects into one, so I made a pom.xml which has 2 modules , 1 to retrieve info(java project) and other to display it on the web (web app). </p>
  
  <p>I made everything work at the end, but here is the odd thing .. if I make webapp display any string "name" lets say then build it independently, it does exactly print that string. But when I put the webapp in the "parent-project" and change this string to "name1" and build it as sa partent-project sub module.. nothing changes ..</p>
  
  <p>So I go back to the point, because simple-webapp is dependent on simple-weather I can't build it anymore on its own, so now if I wanna make some changes to the webapp.. modify the webapp outside the "parent-project" build it there then paste it back to the parent-project and then the changes will apply, why is that, why can't I directly change the servlet content/or add another one in the webapp as the part of the "parent-project"?</p>
  
  <p>Thank you.. I know its a long and boring question, but I'm just trying to learn things and there is no better place to ask than here :D</p>
  
  <p><strong>EDIT - HERE ARE POM FILES FOR EACH PROJECT :</strong></p>
  
  <p><strong>1. simple-parent pom.xml</strong></p>
  
  <pre><code> &lt;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"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;org.sonatype.mavenbook.multi&lt;/groupId&gt;
      &lt;artifactId&gt;simple-parent&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;name&gt;Multi Chapter Simple Parent Project&lt;/name&gt;
  &lt;modules&gt;
  &lt;module&gt;simple-weather&lt;/module&gt;
  &lt;module&gt;simple-webapp&lt;/module&gt;
  &lt;/modules&gt;
  &lt;build&gt;
  &lt;pluginManagement&gt;
  &lt;plugins&gt;
  &lt;plugin&gt;
  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  &lt;configuration&gt;
  &lt;source&gt;1.5&lt;/source&gt;
  &lt;target&gt;1.5&lt;/target&gt;
  &lt;/configuration&gt;
  &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/pluginManagement&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;junit&lt;/groupId&gt;
  &lt;artifactId&gt;junit&lt;/artifactId&gt;
  &lt;version&gt;3.8.1&lt;/version&gt;
  &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>2. simple-weather pom.xml</strong></p>
  
  <pre><code>&lt;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"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
  &lt;groupId&gt;org.sonatype.mavenbook.multi&lt;/groupId&gt;
  &lt;artifactId&gt;simple-parent&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;simple-weather&lt;/artifactId&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  &lt;name&gt;Multi Chapter Simple Weather API&lt;/name&gt;
  &lt;build&gt;
  &lt;pluginManagement&gt;
  &lt;plugins&gt;
  &lt;plugin&gt;
  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
  &lt;configuration&gt;
  &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
  &lt;/configuration&gt;
  &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/pluginManagement&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;log4j&lt;/groupId&gt;
  &lt;artifactId&gt;log4j&lt;/artifactId&gt;
  &lt;version&gt;1.2.14&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;dom4j&lt;/groupId&gt;
  &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
  &lt;version&gt;1.6.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;jaxen&lt;/groupId&gt;
  &lt;artifactId&gt;jaxen&lt;/artifactId&gt;
  &lt;version&gt;1.1.1&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;velocity&lt;/groupId&gt;
  &lt;artifactId&gt;velocity&lt;/artifactId&gt;
  &lt;version&gt;1.5&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
  &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
  &lt;version&gt;1.3.2&lt;/version&gt;
  &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>3. simple-webapp pom.xml</strong></p>
  
  <pre><code>&lt;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"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;parent&gt;
  &lt;groupId&gt;org.sonatype.mavenbook.multi&lt;/groupId&gt;
  &lt;artifactId&gt;simple-parent&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;/parent&gt;
  &lt;artifactId&gt;simple-webapp&lt;/artifactId&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;simple-webapp Maven Webapp&lt;/name&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
  &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
  &lt;version&gt;2.4&lt;/version&gt;
  &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
  &lt;groupId&gt;org.sonatype.mavenbook.multi&lt;/groupId&gt;
  &lt;artifactId&gt;simple-weather&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;build&gt;
  &lt;finalName&gt;simple-webapp&lt;/finalName&gt;
  &lt;plugins&gt;
  &lt;plugin&gt;
  &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
  &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
  &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>