pom.xml 2.3 KB

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