1. <build>  
  2.         <sourceDirectory>src/main/java</sourceDirectory>  
  3.         <plugins>  
  4.             <plugin>  
  5.                 <groupId>org.apache.maven.plugins</groupId>  
  6.                 <artifactId>maven-compiler-plugin</artifactId>  
  7.                 <configuration>  
  8.                     <defaultLibBundleDir>lib</defaultLibBundleDir>  
  9.                     <source>1.5</source>  
  10.                     <target>1.5</target>  
  11.                     <encoding>UTF-8</encoding>  
  12.                 </configuration>  
  13.             </plugin>  
  14.             <plugin>  
  15.                 <groupId>org.apache.maven.plugins</groupId>  
  16.                 <artifactId>maven-jar-plugin</artifactId>  
  17.                 <configuration>  
  18.                     <archive>  
  19.                         <manifest>  
  20.                             <addClasspath>true</addClasspath>  
  21.                             <classpathPrefix></classpathPrefix>  
  22.                             <mainClass>com.xx.xx.xx</mainClass>  
  23.                         </manifest>  
  24.                     </archive>  
  25.                 </configuration>  
  26.             </plugin>  
  27.             <plugin>  
  28.                 <groupId>org.apache.maven.plugins</groupId>  
  29.                 <artifactId>maven-dependency-plugin</artifactId>  
  30.                 <executions>  
  31.                     <execution>  
  32.                         <id>copy</id>  
  33.                         <phase>install</phase>  
  34.                         <goals>  
  35.                             <goal>copy-dependencies</goal>  
  36.                         </goals>  
  37.                         <configuration>  
  38.                             <outputDirectory>  
  39.                                 ${project.build.directory}  
  40.                             </outputDirectory>  
  41.                         </configuration>  
  42.                     </execution>  
  43.                 </executions>  
  44.             </plugin>  
  45.             <plugin>  
  46.                 <groupId>org.apache.maven.plugins</groupId>  
  47.                 <artifactId>maven-resources-plugin</artifactId>  
  48.                 <version>2.2</version>  
  49.                 <configuration>  
  50.                     <encoding>UTF-8</encoding>  
  51.                 </configuration>  
  52.             </plugin>  
  53.         </plugins>  
  54.     </build>