pom.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. </modules>
  23. <!-- 构建配置 -->
  24. <build>
  25. <finalName>${project.name}</finalName>
  26. <plugins>
  27. <!-- 打包jar文件时,可配置manifest文件,加入lib包的jar依赖 -->
  28. <plugin>
  29. <groupId>org.apache.maven.plugins</groupId>
  30. <artifactId>maven-jar-plugin</artifactId>
  31. <configuration>
  32. <source>${java.version}</source>
  33. <target>${java.version}</target>
  34. <encoding>${project.build.sourceEncoding}</encoding>
  35. <archive>
  36. <manifest>
  37. <addClasspath>true</addClasspath>
  38. <classpathPrefix>lib/</classpathPrefix>
  39. <mainClass>${java.run.main.class}</mainClass>
  40. </manifest>
  41. </archive>
  42. </configuration>
  43. </plugin>
  44. <!-- 拷贝依赖的jar包到lib目录 -->
  45. <plugin>
  46. <groupId>org.apache.maven.plugins</groupId>
  47. <artifactId>maven-dependency-plugin</artifactId>
  48. <executions>
  49. <execution>
  50. <id>copy</id>
  51. <phase>package</phase>
  52. <goals>
  53. <goal>copy-dependencies</goal>
  54. </goals>
  55. <configuration>
  56. <outputDirectory>
  57. ${project.build.directory}/lib
  58. </outputDirectory>
  59. </configuration>
  60. </execution>
  61. </executions>
  62. </plugin>
  63. </plugins>
  64. </build>
  65. </project>