<build> <finalName>omss</finalName> <sourceDirectory>src/main/java</sourceDirectory> <outputDirectory>src/main/WebRoot/WEB-INF/classes</outputDirectory> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin><!--设置编译路径--> <artifactId>maven-war-plugin</artifactId> <configuration> <webappDirectory>target/omss</webappDirectory> <warSourceDirectory>src/main/WebRoot</warSourceDirectory> </configuration> </plugin> <plugin><!--设置JDK版本--> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build>