pom.xml 2.5 KB

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