pom.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>market-server</artifactId>
  7. <groupId>com.pj</groupId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <relativePath>../pom.xml</relativePath>
  10. </parent>
  11. <modelVersion>4.0.0</modelVersion>
  12. <artifactId>sp-service</artifactId>
  13. <packaging>pom</packaging>
  14. <modules>
  15. <module>sp-admin</module>
  16. <module>sp-home</module>
  17. <module>level-one-server</module>
  18. <module>level-two-server</module>
  19. <module>transport-server</module>
  20. <module>sp-task</module>
  21. <module>async-server</module>
  22. <module>payment-server</module>
  23. </modules>
  24. <!-- 构建配置 -->
  25. <build>
  26. <finalName>${project.name}</finalName>
  27. <plugins>
  28. <!-- 打包jar文件时,可配置manifest文件,加入lib包的jar依赖 -->
  29. <plugin>
  30. <groupId>org.apache.maven.plugins</groupId>
  31. <artifactId>maven-jar-plugin</artifactId>
  32. <configuration>
  33. <source>${java.version}</source>
  34. <target>${java.version}</target>
  35. <encoding>${project.build.sourceEncoding}</encoding>
  36. <archive>
  37. <manifest>
  38. <addClasspath>true</addClasspath>
  39. <classpathPrefix>lib/</classpathPrefix>
  40. <mainClass>${java.run.main.class}</mainClass>
  41. </manifest>
  42. </archive>
  43. </configuration>
  44. </plugin>
  45. <!-- 拷贝依赖的jar包到lib目录 -->
  46. <plugin>
  47. <groupId>org.apache.maven.plugins</groupId>
  48. <artifactId>maven-dependency-plugin</artifactId>
  49. <executions>
  50. <execution>
  51. <id>copy</id>
  52. <phase>package</phase>
  53. <goals>
  54. <goal>copy-dependencies</goal>
  55. </goals>
  56. <configuration>
  57. <outputDirectory>
  58. ${project.build.directory}/lib
  59. </outputDirectory>
  60. </configuration>
  61. </execution>
  62. </executions>
  63. </plugin>
  64. </plugins>
  65. </build>
  66. </project>