pom.xml 21 KB

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