pom_template.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. {auto_gen_header}
  3. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns="http://maven.apache.org/POM/4.0.0"
  5. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  6. <parent>
  7. <groupId>io.ray</groupId>
  8. <artifactId>ray-superpom</artifactId>
  9. <version>2.0.0-SNAPSHOT</version>
  10. </parent>
  11. <modelVersion>4.0.0</modelVersion>
  12. <artifactId>ray-runtime</artifactId>
  13. <name>ray runtime</name>
  14. <description>ray runtime implementation</description>
  15. <packaging>jar</packaging>
  16. <properties>
  17. <output.directory>${basedir}/../../build/java</output.directory>
  18. </properties>
  19. <profiles>
  20. <profile>
  21. <id>release</id>
  22. <activation>
  23. <property>
  24. <name>release</name>
  25. <value>true</value>
  26. </property>
  27. <activeByDefault>false</activeByDefault>
  28. </activation>
  29. <properties>
  30. <output.directory>${basedir}</output.directory>
  31. </properties>
  32. </profile>
  33. </profiles>
  34. <dependencies>
  35. <dependency>
  36. <groupId>io.ray</groupId>
  37. <artifactId>ray-api</artifactId>
  38. <version>${project.version}</version>
  39. </dependency>
  40. {generated_bzl_deps}
  41. </dependencies>
  42. <build>
  43. <resources>
  44. <resource>
  45. <directory>src/main/resources</directory>
  46. </resource>
  47. <resource>
  48. <directory>native_dependencies</directory>
  49. </resource>
  50. </resources>
  51. <plugins>
  52. <plugin>
  53. <groupId>org.apache.maven.plugins</groupId>
  54. <artifactId>maven-dependency-plugin</artifactId>
  55. <executions>
  56. <execution>
  57. <id>copy-dependencies-to-build</id>
  58. <phase>package</phase>
  59. <goals>
  60. <goal>copy-dependencies</goal>
  61. </goals>
  62. <configuration>
  63. <outputDirectory>${basedir}/../../build/java</outputDirectory>
  64. <overWriteReleases>false</overWriteReleases>
  65. <overWriteSnapshots>false</overWriteSnapshots>
  66. <overWriteIfNewer>true</overWriteIfNewer>
  67. </configuration>
  68. </execution>
  69. </executions>
  70. </plugin>
  71. <plugin>
  72. <groupId>org.apache.maven.plugins</groupId>
  73. <artifactId>maven-jar-plugin</artifactId>
  74. <version>2.3.1</version>
  75. <configuration>
  76. <outputDirectory>${output.directory}</outputDirectory>
  77. </configuration>
  78. </plugin>
  79. <plugin>
  80. <groupId>org.apache.maven.plugins</groupId>
  81. <artifactId>maven-shade-plugin</artifactId>
  82. <version>3.1.1</version>
  83. <executions>
  84. <execution>
  85. <phase>package</phase>
  86. <goals>
  87. <goal>shade</goal>
  88. </goals>
  89. <configuration>
  90. <minimizeJar>false</minimizeJar>
  91. <artifactSet>
  92. <includes>
  93. <include>com.google.guava</include>
  94. <include>com.google.protobuf</include>
  95. </includes>
  96. </artifactSet>
  97. <relocations>
  98. <relocation>
  99. <pattern>com.google.common</pattern>
  100. <shadedPattern>io.ray.shaded.com.google.common</shadedPattern>
  101. </relocation>
  102. <relocation>
  103. <pattern>com.google.protobuf</pattern>
  104. <shadedPattern>io.ray.shaded.com.google.protobuf</shadedPattern>
  105. </relocation>
  106. <relocation>
  107. <pattern>com.google.thirdparty</pattern>
  108. <shadedPattern>io.ray.shaded.com.google.thirdparty</shadedPattern>
  109. </relocation>
  110. </relocations>
  111. <filters>
  112. <filter>
  113. <artifact>*:*</artifact>
  114. <excludes>
  115. <exclude>META-INF/*.SF</exclude>
  116. <exclude>META-INF/*.DSA</exclude>
  117. <exclude>META-INF/*.RSA</exclude>
  118. </excludes>
  119. </filter>
  120. </filters>
  121. </configuration>
  122. </execution>
  123. </executions>
  124. </plugin>
  125. </plugins>
  126. </build>
  127. </project>