pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one or more
  4. ~ contributor license agreements. See the NOTICE file distributed with
  5. ~ this work for additional information regarding copyright ownership.
  6. ~ The ASF licenses this file to You under the Apache License, Version 2.0
  7. ~ (the "License"); you may not use this file except in compliance with
  8. ~ the License. You may obtain a copy of the License at
  9. ~
  10. ~ http://www.apache.org/licenses/LICENSE-2.0
  11. ~
  12. ~ Unless required by applicable law or agreed to in writing, software
  13. ~ distributed under the License is distributed on an "AS IS" BASIS,
  14. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. ~ See the License for the specific language governing permissions and
  16. ~ limitations under the License.
  17. -->
  18. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  19. <parent>
  20. <artifactId>dolphinscheduler</artifactId>
  21. <groupId>org.apache.dolphinscheduler</groupId>
  22. <version>1.3.6-SNAPSHOT</version>
  23. </parent>
  24. <modelVersion>4.0.0</modelVersion>
  25. <artifactId>dolphinscheduler-dist</artifactId>
  26. <packaging>provisio</packaging>
  27. <name>${project.artifactId}</name>
  28. <properties>
  29. <maven.deploy.skip>true</maven.deploy.skip>
  30. </properties>
  31. <dependencies>
  32. <dependency>
  33. <groupId>org.apache.dolphinscheduler</groupId>
  34. <artifactId>dolphinscheduler-server</artifactId>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.apache.dolphinscheduler</groupId>
  38. <artifactId>dolphinscheduler-api</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.apache.dolphinscheduler</groupId>
  42. <artifactId>dolphinscheduler-alert</artifactId>
  43. </dependency>
  44. </dependencies>
  45. <profiles>
  46. <profile>
  47. <id>release</id>
  48. <build>
  49. <plugins>
  50. <plugin>
  51. <artifactId>maven-assembly-plugin</artifactId>
  52. <executions>
  53. <execution>
  54. <id>dolphinscheduler-bin</id>
  55. <phase>package</phase>
  56. <goals>
  57. <goal>single</goal>
  58. </goals>
  59. <configuration>
  60. <descriptors>
  61. <descriptor>src/main/assembly/dolphinscheduler-bin.xml</descriptor>
  62. </descriptors>
  63. <appendAssemblyId>true</appendAssemblyId>
  64. </configuration>
  65. </execution>
  66. <execution>
  67. <id>src</id>
  68. <phase>package</phase>
  69. <goals>
  70. <goal>single</goal>
  71. </goals>
  72. <configuration>
  73. <descriptors>
  74. <descriptor>src/main/assembly/dolphinscheduler-src.xml</descriptor>
  75. </descriptors>
  76. <appendAssemblyId>true</appendAssemblyId>
  77. </configuration>
  78. </execution>
  79. </executions>
  80. </plugin>
  81. <plugin>
  82. <groupId>org.apache.maven.plugins</groupId>
  83. <artifactId>maven-source-plugin</artifactId>
  84. <executions>
  85. <execution>
  86. <id>attach-sources</id>
  87. <phase>verify</phase>
  88. <goals>
  89. <goal>jar-no-fork</goal>
  90. </goals>
  91. </execution>
  92. </executions>
  93. </plugin>
  94. </plugins>
  95. </build>
  96. </profile>
  97. <profile>
  98. <id>rpmbuild</id>
  99. <build>
  100. <plugins>
  101. <plugin>
  102. <groupId>org.apache.maven.plugins</groupId>
  103. <artifactId>maven-dependency-plugin</artifactId>
  104. <configuration>
  105. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  106. <overWriteReleases>false</overWriteReleases>
  107. <overWriteSnapshots>false</overWriteSnapshots>
  108. <overWriteIfNewer>true</overWriteIfNewer>
  109. <excludeScope>provided</excludeScope>
  110. </configuration>
  111. <executions>
  112. <execution>
  113. <id>copy-dependencies</id>
  114. <phase>package</phase>
  115. <goals>
  116. <goal>copy-dependencies</goal>
  117. </goals>
  118. </execution>
  119. </executions>
  120. </plugin>
  121. <plugin>
  122. <groupId>org.codehaus.mojo</groupId>
  123. <artifactId>rpm-maven-plugin</artifactId>
  124. <extensions>true</extensions>
  125. <executions>
  126. <execution>
  127. <phase>package</phase>
  128. <goals>
  129. <goal>attached-rpm</goal>
  130. </goals>
  131. </execution>
  132. </executions>
  133. <configuration>
  134. <name>apache-dolphinscheduler</name>
  135. <release>1</release>
  136. <distribution>apache dolphinscheduler rpm</distribution>
  137. <group>apache</group>
  138. <packager>dolphinscheduler</packager>
  139. <!-- <version>${project.version}</version> -->
  140. <prefix>/opt/soft</prefix>
  141. <autoRequires>false</autoRequires>
  142. <defineStatements>
  143. <!-- disable compile python when rpm build -->
  144. <defineStatement>__os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')</defineStatement>
  145. </defineStatements>
  146. <mappings>
  147. <mapping>
  148. <directory>/opt/soft/${project.build.finalName}/conf</directory>
  149. <filemode>755</filemode>
  150. <username>root</username>
  151. <groupname>root</groupname>
  152. <sources>
  153. <source>
  154. <location>
  155. ${basedir}/../dolphinscheduler-alert/src/main/resources
  156. </location>
  157. <includes>
  158. <include>**/*.*</include>
  159. </includes>
  160. </source>
  161. <source>
  162. <location>
  163. ${basedir}/../dolphinscheduler-common/src/main/resources
  164. </location>
  165. <includes>
  166. <include>**/*.*</include>
  167. </includes>
  168. </source>
  169. <source>
  170. <location>
  171. ${basedir}/../dolphinscheduler-dao/src/main/resources
  172. </location>
  173. <includes>
  174. <include>**/*.*</include>
  175. </includes>
  176. </source>
  177. <source>
  178. <location>
  179. ${basedir}/../dolphinscheduler-api/src/main/resources
  180. </location>
  181. <includes>
  182. <include>**/*.*</include>
  183. </includes>
  184. </source>
  185. <source>
  186. <location>
  187. ${basedir}/../dolphinscheduler-server/src/main/resources
  188. </location>
  189. <includes>
  190. <include>config/*.*</include>
  191. <include>**/*.xml</include>
  192. </includes>
  193. </source>
  194. <source>
  195. <location>
  196. ${basedir}/../dolphinscheduler-service/src/main/resources
  197. </location>
  198. <includes>
  199. <include>*.*</include>
  200. </includes>
  201. </source>
  202. <source>
  203. <location>
  204. ${basedir}/../script
  205. </location>
  206. <includes>
  207. <include>env/*.*</include>
  208. </includes>
  209. </source>
  210. </sources>
  211. </mapping>
  212. <mapping>
  213. <directory>/opt/soft/${project.build.finalName}/lib</directory>
  214. <filemode>755</filemode>
  215. <username>root</username>
  216. <groupname>root</groupname>
  217. <sources>
  218. <source>
  219. <location>
  220. ${basedir}/../dolphinscheduler-dist/target/lib
  221. </location>
  222. <includes>
  223. <include>*.*</include>
  224. </includes>
  225. <excludes>
  226. <exclude>servlet-api-*.jar</exclude>
  227. <exclude>slf4j-log4j12-${slf4j.log4j12.version}.jar</exclude>
  228. </excludes>
  229. </source>
  230. </sources>
  231. </mapping>
  232. <mapping>
  233. <directory>/opt/soft/${project.build.finalName}/bin</directory>
  234. <filemode>755</filemode>
  235. <username>root</username>
  236. <groupname>root</groupname>
  237. <sources>
  238. <source>
  239. <location>
  240. ${basedir}/../script
  241. </location>
  242. <includes>
  243. <include>start-all.sh</include>
  244. <include>stop-all.sh</include>
  245. <include>dolphinscheduler-daemon.sh</include>
  246. <include>status-all.sh</include>
  247. </includes>
  248. </source>
  249. </sources>
  250. </mapping>
  251. <mapping>
  252. <directory>/opt/soft/${project.build.finalName}</directory>
  253. <filemode>755</filemode>
  254. <username>root</username>
  255. <groupname>root</groupname>
  256. <sources>
  257. <source>
  258. <location>
  259. ${basedir}/../
  260. </location>
  261. <includes>
  262. <include>*.sh</include>
  263. <include>*.py</include>
  264. <include>DISCLAIMER</include>
  265. </includes>
  266. </source>
  267. <source>
  268. <location>
  269. ${basedir}/release-docs
  270. </location>
  271. <includes>
  272. <include>**/*</include>
  273. </includes>
  274. </source>
  275. </sources>
  276. </mapping>
  277. <mapping>
  278. <directory>/opt/soft/${project.build.finalName}/ui</directory>
  279. <filemode>755</filemode>
  280. <username>root</username>
  281. <groupname>root</groupname>
  282. <sources>
  283. <source>
  284. <location>
  285. ${basedir}/../dolphinscheduler-ui/dist
  286. </location>
  287. <includes>
  288. <include>**/*.*</include>
  289. </includes>
  290. </source>
  291. </sources>
  292. </mapping>
  293. <mapping>
  294. <directory>/opt/soft/${project.build.finalName}/sql</directory>
  295. <filemode>755</filemode>
  296. <username>root</username>
  297. <groupname>root</groupname>
  298. <sources>
  299. <source>
  300. <location>
  301. ${basedir}/../sql
  302. </location>
  303. <includes>
  304. <include>**/*.*</include>
  305. </includes>
  306. </source>
  307. <source>
  308. <location>
  309. ${basedir}/../sql
  310. </location>
  311. <includes>
  312. <include>soft_version</include>
  313. </includes>
  314. </source>
  315. </sources>
  316. </mapping>
  317. <mapping>
  318. <directory>/opt/soft/${project.build.finalName}/script</directory>
  319. <filemode>755</filemode>
  320. <username>root</username>
  321. <groupname>root</groupname>
  322. <sources>
  323. <source>
  324. <location>
  325. ${basedir}/../script
  326. </location>
  327. <includes>
  328. <include>*.sh</include>
  329. </includes>
  330. </source>
  331. </sources>
  332. </mapping>
  333. </mappings>
  334. <preinstallScriptlet>
  335. <script>mkdir -p /opt/soft</script>
  336. </preinstallScriptlet>
  337. <postinstallScriptlet>
  338. <script>rm -rf /opt/soft/dolphinscheduler ; ln -s /opt/soft/apache-dolphinscheduler-${project.version} /opt/soft/dolphinscheduler</script>
  339. </postinstallScriptlet>
  340. <postremoveScriptlet>
  341. <script>rm -rf /opt/soft/apache-dolphinscheduler-${project.version}</script>
  342. </postremoveScriptlet>
  343. </configuration>
  344. </plugin>
  345. </plugins>
  346. </build>
  347. </profile>
  348. </profiles>
  349. </project>