maven

<!-- .class/.jar/resources 发布到WEB-INF/classess下面 -->
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <configuration>
     <warSourceDirectory>src/main/webapp</warSourceDirectory>
     <webappDirectory>src/main/webapp</webappDirectory>
    </configuration>
   </plugin>
   <!-- maven clean 配置  清楚 WEB-INF/classes下的.classes/jar/xml/properties文件-->
  <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-clean-plugin</artifactId>
      <configuration>
          <filesets>
              <fileset>
                  <directory>${basedir}/src/main/webapp/WEB-INF/classes</directory>
                  <followSymlinks>false</followSymlinks>
              </fileset>
              <fileset>
                  <directory>${basedir}/src/main/webapp/WEB-INF/lib</directory>
                  <followSymlinks>false</followSymlinks>
              </fileset>
          </filesets>
      </configuration>
  </plugin>

你可能感兴趣的:(maven)