title: Example of a multi-module web application with the rpm-maven-plugin?
body: <p>Does anyone know of any web applications that are built with Maven to an RPM?  The <a href="http://mojo.codehaus.org/rpm-maven-plugin/" rel="noreferrer">RPM Maven Plugin</a> provides the functionality to build to an RPM, but it's documentation is lacking.</p>
  
  <p>Specifically, I'm looking for an example that would include multiple modules, i.e. <a href="http://www.sonatype.com/books/mvnex-book/reference/multimodule.html" rel="noreferrer">Chapter 8. A Multi-module Project</a>, from the "Maven by Example" series.</p>
  
  <p>An example with only a single module would be:</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;com.mycompany.app&lt;/groupId&gt;
    &lt;artifactId&gt;my-webapp&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1.0-SOME-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;my-webapp&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
    &lt;properties&gt;
      &lt;rpm.install.basedir&gt;/opt/tomcat6&lt;/rpm.install.basedir&gt;
      &lt;rpm.install.webapps&gt;${rpm.install.basedir}/webapps&lt;/rpm.install.webapps&gt;
      &lt;rpm.install.config&gt;${rpm.install.basedir}/lib&lt;/rpm.install.config&gt;
    &lt;/properties&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;!-- Servlet --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
          &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet.jsp.jstl&lt;/groupId&gt;
          &lt;artifactId&gt;jstl-api&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.web&lt;/groupId&gt;
          &lt;artifactId&gt;jstl-impl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;!-- Jackson JSON Processor --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
          &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
          &lt;version&gt;1.8.1&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
    &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;rpm-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.1-alpha-1&lt;/version&gt;
          &lt;extensions&gt;true&lt;/extensions&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;goals&gt;
                &lt;goal&gt;attached-rpm&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;copyright&gt;My Company&lt;/copyright&gt;
            &lt;distribution&gt;My Distribution&lt;/distribution&gt;
            &lt;group&gt;Applications/Internet&lt;/group&gt;
            &lt;packager&gt;${user.name}&lt;/packager&gt;
            &lt;changelogFile&gt;CHANGELOG&lt;/changelogFile&gt;
            &lt;defaultDirmode&gt;500&lt;/defaultDirmode&gt;
            &lt;defaultFilemode&gt;400&lt;/defaultFilemode&gt;
            &lt;defaultUsername&gt;tomcat6&lt;/defaultUsername&gt;
            &lt;defaultGroupname&gt;tomcat6&lt;/defaultGroupname&gt;
            &lt;requires&gt;
              &lt;require&gt;apache-tomcat &amp;gt;= 6.0.20-2&lt;/require&gt;
            &lt;/requires&gt;
            &lt;mappings&gt;
  
              &lt;!-- webapps deployment --&gt;
              &lt;mapping&gt;
                &lt;directory&gt;${rpm.install.webapps}/${project.artifactId}&lt;/directory&gt;
                &lt;sources&gt;
                  &lt;source&gt;
                    &lt;location&gt;target/${project.artifactId}-${project.version}&lt;/location&gt;
                  &lt;/source&gt;
                &lt;/sources&gt;
              &lt;/mapping&gt;
  
              &lt;!-- configuration files --&gt;
              &lt;mapping&gt;
                &lt;directory&gt;${rpm.install.config}&lt;/directory&gt;
                &lt;configuration&gt;true&lt;/configuration&gt;
                &lt;sources&gt;
                  &lt;source&gt;
                    &lt;location&gt;src/main/resources/my-webapp.jdbc.properties.sample&lt;/location&gt;
                  &lt;/source&gt;
                  &lt;source&gt;
                    &lt;location&gt;src/main/resources/my-webapp.runtime.properties&lt;/location&gt;
                    &lt;destination&gt;my-webapp.runtime.properties.sample&lt;/destination&gt;
                  &lt;/source&gt;
                &lt;/sources&gt;
              &lt;/mapping&gt;
  
              &lt;!-- (Optional) Create other necessary directory structure --&gt;
              &lt;mapping&gt;
                &lt;directory&gt;${rpm.install.basedir}/my-webapp-workspace&lt;/directory&gt;
                &lt;filemode&gt;750&lt;/filemode&gt;
                &lt;username&gt;tomcatuser&lt;/username&gt;
                &lt;groupname&gt;tomcatuser&lt;/groupname&gt;
              &lt;/mapping&gt;
  
            &lt;/mappings&gt;
  
            &lt;!-- (Optional) --&gt;
            &lt;preinstallScriptlet&gt;
              &lt;scriptFile&gt;src/main/scripts/rpm/pre-install.sh&lt;/scriptFile&gt;
            &lt;/preinstallScriptlet&gt;
            &lt;!-- (Optional) --&gt;
            &lt;postinstallScriptlet&gt;
              &lt;script&gt;echo "WARNING: Restart tomcat to ensure changes take effect."&lt;/script&gt;
            &lt;/postinstallScriptlet&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>Thanks for any/all help!  </p>