pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387
  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>2.0.0-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-standalone-server</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.apache.dolphinscheduler</groupId>
  42. <artifactId>dolphinscheduler-api</artifactId>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.apache.dolphinscheduler</groupId>
  46. <artifactId>dolphinscheduler-alert-server</artifactId>
  47. </dependency>
  48. </dependencies>
  49. <profiles>
  50. <profile>
  51. <id>release</id>
  52. <build>
  53. <plugins>
  54. <plugin>
  55. <artifactId>maven-assembly-plugin</artifactId>
  56. <executions>
  57. <execution>
  58. <id>dolphinscheduler-bin</id>
  59. <phase>package</phase>
  60. <goals>
  61. <goal>single</goal>
  62. </goals>
  63. <configuration>
  64. <descriptors>
  65. <descriptor>src/main/assembly/dolphinscheduler-bin.xml</descriptor>
  66. </descriptors>
  67. <appendAssemblyId>true</appendAssemblyId>
  68. </configuration>
  69. </execution>
  70. <execution>
  71. <id>src</id>
  72. <phase>package</phase>
  73. <goals>
  74. <goal>single</goal>
  75. </goals>
  76. <configuration>
  77. <descriptors>
  78. <descriptor>src/main/assembly/dolphinscheduler-src.xml</descriptor>
  79. </descriptors>
  80. <appendAssemblyId>true</appendAssemblyId>
  81. </configuration>
  82. </execution>
  83. </executions>
  84. </plugin>
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-source-plugin</artifactId>
  88. <executions>
  89. <execution>
  90. <id>attach-sources</id>
  91. <phase>verify</phase>
  92. <goals>
  93. <goal>jar-no-fork</goal>
  94. </goals>
  95. </execution>
  96. </executions>
  97. </plugin>
  98. </plugins>
  99. </build>
  100. </profile>
  101. <profile>
  102. <id>rpmbuild</id>
  103. <build>
  104. <plugins>
  105. <plugin>
  106. <groupId>org.apache.maven.plugins</groupId>
  107. <artifactId>maven-dependency-plugin</artifactId>
  108. <configuration>
  109. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  110. <overWriteReleases>false</overWriteReleases>
  111. <overWriteSnapshots>false</overWriteSnapshots>
  112. <overWriteIfNewer>true</overWriteIfNewer>
  113. <excludeScope>provided</excludeScope>
  114. </configuration>
  115. <executions>
  116. <execution>
  117. <id>copy-dependencies</id>
  118. <phase>package</phase>
  119. <goals>
  120. <goal>copy-dependencies</goal>
  121. </goals>
  122. </execution>
  123. </executions>
  124. </plugin>
  125. <plugin>
  126. <groupId>org.codehaus.mojo</groupId>
  127. <artifactId>rpm-maven-plugin</artifactId>
  128. <extensions>true</extensions>
  129. <executions>
  130. <execution>
  131. <phase>package</phase>
  132. <goals>
  133. <goal>attached-rpm</goal>
  134. </goals>
  135. </execution>
  136. </executions>
  137. <configuration>
  138. <name>apache-dolphinscheduler</name>
  139. <release>1</release>
  140. <distribution>apache dolphinscheduler rpm</distribution>
  141. <group>apache</group>
  142. <packager>dolphinscheduler</packager>
  143. <!-- <version>${project.version}</version> -->
  144. <prefix>/opt/soft</prefix>
  145. <autoRequires>false</autoRequires>
  146. <defineStatements>
  147. <!-- disable compile python when rpm build -->
  148. <defineStatement>__os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')</defineStatement>
  149. </defineStatements>
  150. <mappings>
  151. <mapping>
  152. <directory>/opt/soft/${project.build.finalName}/conf</directory>
  153. <filemode>755</filemode>
  154. <username>root</username>
  155. <groupname>root</groupname>
  156. <sources>
  157. <source>
  158. <location>
  159. ${basedir}/../dolphinscheduler-alert/src/main/resources
  160. </location>
  161. <includes>
  162. <include>**/*.*</include>
  163. </includes>
  164. </source>
  165. <source>
  166. <location>
  167. ${basedir}/../dolphinscheduler-common/src/main/resources
  168. </location>
  169. <includes>
  170. <include>**/*.*</include>
  171. </includes>
  172. </source>
  173. <source>
  174. <location>
  175. ${basedir}/../dolphinscheduler-dao/src/main/resources
  176. </location>
  177. <includes>
  178. <include>**/*.*</include>
  179. </includes>
  180. </source>
  181. <source>
  182. <location>
  183. ${basedir}/../dolphinscheduler-api/src/main/resources
  184. </location>
  185. <includes>
  186. <include>**/*.*</include>
  187. </includes>
  188. </source>
  189. <source>
  190. <location>
  191. ${basedir}/../dolphinscheduler-server/src/main/resources
  192. </location>
  193. <includes>
  194. <include>config/*.*</include>
  195. <include>**/*.xml</include>
  196. </includes>
  197. </source>
  198. <source>
  199. <location>
  200. ${basedir}/../dolphinscheduler-service/src/main/resources
  201. </location>
  202. <includes>
  203. <include>*.*</include>
  204. </includes>
  205. </source>
  206. <source>
  207. <location>
  208. ${basedir}/../script
  209. </location>
  210. <includes>
  211. <include>env/*.*</include>
  212. </includes>
  213. </source>
  214. </sources>
  215. </mapping>
  216. <mapping>
  217. <directory>/opt/soft/${project.build.finalName}/lib</directory>
  218. <filemode>755</filemode>
  219. <username>root</username>
  220. <groupname>root</groupname>
  221. <sources>
  222. <source>
  223. <location>
  224. ${basedir}/../dolphinscheduler-dist/target/lib
  225. </location>
  226. <includes>
  227. <include>*.*</include>
  228. </includes>
  229. <excludes>
  230. <exclude>servlet-api-*.jar</exclude>
  231. <exclude>slf4j-log4j12-${slf4j.log4j12.version}.jar</exclude>
  232. </excludes>
  233. </source>
  234. </sources>
  235. </mapping>
  236. <mapping>
  237. <directory>/opt/soft/${project.build.finalName}/bin</directory>
  238. <filemode>755</filemode>
  239. <username>root</username>
  240. <groupname>root</groupname>
  241. <sources>
  242. <source>
  243. <location>
  244. ${basedir}/../script
  245. </location>
  246. <includes>
  247. <include>start-all.sh</include>
  248. <include>stop-all.sh</include>
  249. <include>dolphinscheduler-daemon.sh</include>
  250. <include>status-all.sh</include>
  251. </includes>
  252. </source>
  253. </sources>
  254. </mapping>
  255. <mapping>
  256. <directory>/opt/soft/${project.build.finalName}</directory>
  257. <filemode>755</filemode>
  258. <username>root</username>
  259. <groupname>root</groupname>
  260. <sources>
  261. <source>
  262. <location>
  263. ${basedir}/../
  264. </location>
  265. <includes>
  266. <include>*.sh</include>
  267. <include>*.py</include>
  268. <include>DISCLAIMER</include>
  269. </includes>
  270. </source>
  271. <source>
  272. <location>
  273. ${basedir}/release-docs
  274. </location>
  275. <includes>
  276. <include>**/*</include>
  277. </includes>
  278. </source>
  279. </sources>
  280. </mapping>
  281. <mapping>
  282. <directory>/opt/soft/${project.build.finalName}/ui</directory>
  283. <filemode>755</filemode>
  284. <username>root</username>
  285. <groupname>root</groupname>
  286. <sources>
  287. <source>
  288. <location>
  289. ${basedir}/../dolphinscheduler-ui/dist
  290. </location>
  291. <includes>
  292. <include>**/*.*</include>
  293. </includes>
  294. </source>
  295. </sources>
  296. </mapping>
  297. <mapping>
  298. <directory>/opt/soft/${project.build.finalName}/sql</directory>
  299. <filemode>755</filemode>
  300. <username>root</username>
  301. <groupname>root</groupname>
  302. <sources>
  303. <source>
  304. <location>
  305. ${basedir}/../dolphinscheduler-dao/src/main/resources/sql
  306. </location>
  307. <includes>
  308. <include>**/*.*</include>
  309. </includes>
  310. </source>
  311. <source>
  312. <location>
  313. ${basedir}/../dolphinscheduler-dao/src/main/resources/sql
  314. </location>
  315. <includes>
  316. <include>soft_version</include>
  317. </includes>
  318. </source>
  319. </sources>
  320. </mapping>
  321. <mapping>
  322. <directory>/opt/soft/${project.build.finalName}/script</directory>
  323. <filemode>755</filemode>
  324. <username>root</username>
  325. <groupname>root</groupname>
  326. <sources>
  327. <source>
  328. <location>
  329. ${basedir}/../script
  330. </location>
  331. <includes>
  332. <include>*.sh</include>
  333. </includes>
  334. </source>
  335. </sources>
  336. </mapping>
  337. </mappings>
  338. <preinstallScriptlet>
  339. <script>mkdir -p /opt/soft</script>
  340. </preinstallScriptlet>
  341. <postinstallScriptlet>
  342. <script>rm -rf /opt/soft/dolphinscheduler ; ln -s /opt/soft/apache-dolphinscheduler-${project.version} /opt/soft/dolphinscheduler</script>
  343. </postinstallScriptlet>
  344. <postremoveScriptlet>
  345. <script>rm -rf /opt/soft/apache-dolphinscheduler-${project.version}</script>
  346. </postremoveScriptlet>
  347. </configuration>
  348. </plugin>
  349. </plugins>
  350. </build>
  351. </profile>
  352. </profiles>
  353. <build>
  354. <finalName>apache-dolphinscheduler-${project.version}</finalName>
  355. </build>
  356. </project>