title: maven plugin dependency scope in pom.xml
body: <p>I use maven to package my web application, but I found that a lot of maven jars are in my war's lib directory. I do not  think they are useful for my web application under tomcat, so how can I exclude them?</p>
  
  <p><img src="https://i.stack.imgur.com/d3c9d.jpg" alt="some jars"></p>
  
  <pre><code>      &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
        &lt;version&gt;1.9.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&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.9.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-jaxrs&lt;/artifactId&gt;
        &lt;version&gt;1.9.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-xc&lt;/artifactId&gt;
        &lt;version&gt;1.9.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&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;com.whalin&lt;/groupId&gt;
        &lt;artifactId&gt;Memcached-Java-Client&lt;/artifactId&gt;
        &lt;version&gt;3.0.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.imgscalr&lt;/groupId&gt;
        &lt;artifactId&gt;imgscalr-lib&lt;/artifactId&gt;
        &lt;version&gt;4.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.core&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-media-multipart&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
        &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
        &lt;version&gt;1.5.4&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
        &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
        &lt;version&gt;1.5.4&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;mysql&lt;/groupId&gt;
        &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
        &lt;version&gt;5.1.14&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
        &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
        &lt;version&gt;1.0.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
        &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
        &lt;version&gt;1.0.13&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
        &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
        &lt;version&gt;1.7.5&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.logback-extensions&lt;/groupId&gt;
        &lt;artifactId&gt;logback-ext-spring&lt;/artifactId&gt;
        &lt;version&gt;0.1.1&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.glassfish.jersey.ext&lt;/groupId&gt;
        &lt;artifactId&gt;jersey-spring3&lt;/artifactId&gt;
        &lt;version&gt;2.6&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;spring&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;/exclusion&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
            &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;c3p0&lt;/groupId&gt;
        &lt;artifactId&gt;c3p0&lt;/artifactId&gt;
        &lt;version&gt;0.9.1.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.11&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
        &lt;version&gt;3.2.0.RELEASE&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;redis.clients&lt;/groupId&gt;
        &lt;artifactId&gt;jedis&lt;/artifactId&gt;
        &lt;version&gt;2.4.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
        &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
        &lt;version&gt;3.3.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.mybatis&lt;/groupId&gt;
        &lt;artifactId&gt;mybatis&lt;/artifactId&gt;
        &lt;version&gt;3.1.1&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.mybatis&lt;/groupId&gt;
        &lt;artifactId&gt;mybatis-spring&lt;/artifactId&gt;
        &lt;version&gt;1.2.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.mybatis.generator&lt;/groupId&gt;
        &lt;artifactId&gt;mybatis-generator-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.3.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;google-collect&lt;/artifactId&gt;
            &lt;groupId&gt;com.google.code.google-collections&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.shardbatis&lt;/groupId&gt;
        &lt;artifactId&gt;shardbatis&lt;/artifactId&gt;
        &lt;version&gt;2.0.0B&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;net.sf.jsqlparser&lt;/groupId&gt;
        &lt;artifactId&gt;jsqlparser&lt;/artifactId&gt;
        &lt;version&gt;0.7.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.yolu.wrm&lt;/groupId&gt;
        &lt;artifactId&gt;trendrr-beanstalk&lt;/artifactId&gt;
        &lt;version&gt;1.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-codec&lt;/groupId&gt;
        &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
        &lt;version&gt;1.8&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;net.sourceforge.cardme&lt;/groupId&gt;
        &lt;artifactId&gt;cardme&lt;/artifactId&gt;
        &lt;version&gt;0.4.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;commons-httpclient&lt;/groupId&gt;
        &lt;artifactId&gt;commons-httpclient&lt;/artifactId&gt;
        &lt;version&gt;3.1&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.yolu.wrm&lt;/groupId&gt;
        &lt;artifactId&gt;weibo4j&lt;/artifactId&gt;
        &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  
  
    &lt;build&gt;
      &lt;sourceDirectory&gt;/Users/mbao/workspace/wrm-server/src/main/java&lt;/sourceDirectory&gt;
      &lt;scriptSourceDirectory&gt;/Users/mbao/workspace/wrm-server/src/main/scripts&lt;/scriptSourceDirectory&gt;
      &lt;testSourceDirectory&gt;/Users/mbao/workspace/wrm-server/src/test/java&lt;/testSourceDirectory&gt;
      &lt;outputDirectory&gt;/Users/mbao/workspace/wrm-server/target/classes&lt;/outputDirectory&gt;
      &lt;testOutputDirectory&gt;/Users/mbao/workspace/wrm-server/target/test-classes&lt;/testOutputDirectory&gt;
      &lt;resources&gt;
        &lt;resource&gt;
          &lt;directory&gt;/Users/mbao/workspace/wrm-server/src/main/java&lt;/directory&gt;
          &lt;includes&gt;
            &lt;include&gt;**/*.xml&lt;/include&gt;
          &lt;/includes&gt;
        &lt;/resource&gt;
        &lt;resource&gt;
          &lt;directory&gt;/Users/mbao/workspace/wrm-server/src/main/resources/dev&lt;/directory&gt;
        &lt;/resource&gt;
      &lt;/resources&gt;
      &lt;testResources&gt;
        &lt;testResource&gt;
          &lt;directory&gt;/Users/mbao/workspace/wrm-server/src/test/resources&lt;/directory&gt;
        &lt;/testResource&gt;
      &lt;/testResources&gt;
      &lt;directory&gt;/Users/mbao/workspace/wrm-server/target&lt;/directory&gt;
      &lt;finalName&gt;wrm-server###1.0&lt;/finalName&gt;
      &lt;pluginManagement&gt;
        &lt;plugins&gt;
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
            &lt;version&gt;1.3&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.2-beta-5&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.1&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
            &lt;version&gt;2.0&lt;/version&gt;
          &lt;/plugin&gt;
        &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;org.mybatis.generator&lt;/groupId&gt;
          &lt;artifactId&gt;mybatis-generator-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
          &lt;dependencies&gt;
            &lt;dependency&gt;
              &lt;groupId&gt;mysql&lt;/groupId&gt;
              &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
              &lt;version&gt;5.1.14&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
            &lt;/dependency&gt;
          &lt;/dependencies&gt;
          &lt;configuration&gt;
            &lt;verbose&gt;true&lt;/verbose&gt;
            &lt;overwrite&gt;true&lt;/overwrite&gt;
            &lt;configurationFile&gt;/Users/mbao/workspace/wrm-server/src/main/resources/dev/generatorConfig.xml&lt;/configurationFile&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-testCompile&lt;/id&gt;
              &lt;phase&gt;test-compile&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;testCompile&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;source&gt;1.6&lt;/source&gt;
                &lt;target&gt;1.6&lt;/target&gt;
                &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                &lt;compilerArguments&gt;
                  &lt;extdirs&gt;src/main/webapp/WEB-INF/lib&lt;/extdirs&gt;
                &lt;/compilerArguments&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;default-compile&lt;/id&gt;
              &lt;phase&gt;compile&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;compile&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;source&gt;1.6&lt;/source&gt;
                &lt;target&gt;1.6&lt;/target&gt;
                &lt;encoding&gt;UTF-8&lt;/encoding&gt;
                &lt;compilerArguments&gt;
                  &lt;extdirs&gt;src/main/webapp/WEB-INF/lib&lt;/extdirs&gt;
                &lt;/compilerArguments&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.6&lt;/source&gt;
            &lt;target&gt;1.6&lt;/target&gt;
            &lt;encoding&gt;UTF-8&lt;/encoding&gt;
            &lt;compilerArguments&gt;
              &lt;extdirs&gt;src/main/webapp/WEB-INF/lib&lt;/extdirs&gt;
            &lt;/compilerArguments&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-war&lt;/id&gt;
              &lt;phase&gt;package&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;war&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;webResources&gt;
                  &lt;resource&gt;
                    &lt;directory&gt;src/main/resources/dev&lt;/directory&gt;
                    &lt;targetPath&gt;WEB-INF/classes&lt;/targetPath&gt;
                  &lt;/resource&gt;
                  &lt;resource&gt;
                    &lt;directory&gt;web/WEB-INF/&lt;/directory&gt;
                    &lt;targetPath&gt;WEB-INF/&lt;/targetPath&gt;
                  &lt;/resource&gt;
                &lt;/webResources&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;webResources&gt;
              &lt;resource&gt;
                &lt;directory&gt;src/main/resources/dev&lt;/directory&gt;
                &lt;targetPath&gt;WEB-INF/classes&lt;/targetPath&gt;
              &lt;/resource&gt;
              &lt;resource&gt;
                &lt;directory&gt;web/WEB-INF/&lt;/directory&gt;
                &lt;targetPath&gt;WEB-INF/&lt;/targetPath&gt;
              &lt;/resource&gt;
            &lt;/webResources&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.4.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-clean&lt;/id&gt;
              &lt;phase&gt;clean&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;clean&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-install&lt;/id&gt;
              &lt;phase&gt;install&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;install&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.5&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-resources&lt;/id&gt;
              &lt;phase&gt;process-resources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;resources&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;default-testResources&lt;/id&gt;
              &lt;phase&gt;process-test-resources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;testResources&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.10&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-test&lt;/id&gt;
              &lt;phase&gt;test&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;test&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.7&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-deploy&lt;/id&gt;
              &lt;phase&gt;deploy&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;deploy&lt;/goal&gt;
              &lt;/goals&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.0&lt;/version&gt;
          &lt;executions&gt;
            &lt;execution&gt;
              &lt;id&gt;default-site&lt;/id&gt;
              &lt;phase&gt;site&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;site&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;outputDirectory&gt;/Users/mbao/workspace/wrm-server/target/site&lt;/outputDirectory&gt;
                &lt;reportPlugins&gt;
                  &lt;reportPlugin&gt;
                    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                    &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
                  &lt;/reportPlugin&gt;
                &lt;/reportPlugins&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;default-deploy&lt;/id&gt;
              &lt;phase&gt;site-deploy&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;deploy&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;outputDirectory&gt;/Users/mbao/workspace/wrm-server/target/site&lt;/outputDirectory&gt;
                &lt;reportPlugins&gt;
                  &lt;reportPlugin&gt;
                    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                    &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
                  &lt;/reportPlugin&gt;
                &lt;/reportPlugins&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
          &lt;/executions&gt;
          &lt;configuration&gt;
            &lt;outputDirectory&gt;/Users/mbao/workspace/wrm-server/target/site&lt;/outputDirectory&gt;
            &lt;reportPlugins&gt;
              &lt;reportPlugin&gt;
                &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
              &lt;/reportPlugin&gt;
            &lt;/reportPlugins&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/lh63l.jpg" alt="enter image description here"></p>