pom.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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. <include>**/*.xml</include>
  238. </includes>
  239. </source>
  240. <source>
  241. <location>
  242. ${basedir}/../dolphinscheduler-service/src/main/resources
  243. </location>
  244. <includes>
  245. <include>*.*</include>
  246. </includes>
  247. </source>
  248. <source>
  249. <location>
  250. ${basedir}/../script
  251. </location>
  252. <includes>
  253. <include>env/*.*</include>
  254. </includes>
  255. </source>
  256. </sources>
  257. </mapping>
  258. <mapping>
  259. <directory>/opt/soft/${project.build.finalName}/lib</directory>
  260. <filemode>755</filemode>
  261. <username>root</username>
  262. <groupname>root</groupname>
  263. <sources>
  264. <source>
  265. <location>
  266. ${basedir}/../dolphinscheduler-dist/target/lib
  267. </location>
  268. <includes>
  269. <include>*.*</include>
  270. </includes>
  271. <excludes>
  272. <exclude>servlet-api-*.jar</exclude>
  273. <exclude>slf4j-log4j12-${slf4j.log4j12.version}.jar</exclude>
  274. </excludes>
  275. </source>
  276. </sources>
  277. </mapping>
  278. <mapping>
  279. <directory>/opt/soft/${project.build.finalName}/bin</directory>
  280. <filemode>755</filemode>
  281. <username>root</username>
  282. <groupname>root</groupname>
  283. <sources>
  284. <source>
  285. <location>
  286. ${basedir}/../script
  287. </location>
  288. <includes>
  289. <include>start-all.sh</include>
  290. <include>stop-all.sh</include>
  291. <include>dolphinscheduler-daemon.sh</include>
  292. </includes>
  293. </source>
  294. </sources>
  295. </mapping>
  296. <mapping>
  297. <directory>/opt/soft/${project.build.finalName}</directory>
  298. <filemode>755</filemode>
  299. <username>root</username>
  300. <groupname>root</groupname>
  301. <sources>
  302. <source>
  303. <location>
  304. ${basedir}/../
  305. </location>
  306. <includes>
  307. <include>*.sh</include>
  308. <include>*.py</include>
  309. <include>DISCLAIMER</include>
  310. </includes>
  311. </source>
  312. <source>
  313. <location>
  314. ${basedir}/release-docs
  315. </location>
  316. <includes>
  317. <include>**/*</include>
  318. </includes>
  319. </source>
  320. </sources>
  321. </mapping>
  322. <mapping>
  323. <directory>/opt/soft/${project.build.finalName}/ui</directory>
  324. <filemode>755</filemode>
  325. <username>root</username>
  326. <groupname>root</groupname>
  327. <sources>
  328. <source>
  329. <location>
  330. ${basedir}/../dolphinscheduler-ui/dist
  331. </location>
  332. <includes>
  333. <include>**/*.*</include>
  334. </includes>
  335. </source>
  336. </sources>
  337. </mapping>
  338. <mapping>
  339. <directory>/opt/soft/${project.build.finalName}/sql</directory>
  340. <filemode>755</filemode>
  341. <username>root</username>
  342. <groupname>root</groupname>
  343. <sources>
  344. <source>
  345. <location>
  346. ${basedir}/../sql
  347. </location>
  348. <includes>
  349. <include>**/*.*</include>
  350. </includes>
  351. </source>
  352. <source>
  353. <location>
  354. ${basedir}/../sql
  355. </location>
  356. <includes>
  357. <include>soft_version</include>
  358. </includes>
  359. </source>
  360. </sources>
  361. </mapping>
  362. <mapping>
  363. <directory>/opt/soft/${project.build.finalName}/script</directory>
  364. <filemode>755</filemode>
  365. <username>root</username>
  366. <groupname>root</groupname>
  367. <sources>
  368. <source>
  369. <location>
  370. ${basedir}/../script
  371. </location>
  372. <includes>
  373. <include>*.sh</include>
  374. </includes>
  375. </source>
  376. </sources>
  377. </mapping>
  378. </mappings>
  379. <preinstallScriptlet>
  380. <script>mkdir -p /opt/soft</script>
  381. </preinstallScriptlet>
  382. <postinstallScriptlet>
  383. <script>rm -rf /opt/soft/dolphinscheduler ; ln -s /opt/soft/apache-dolphinscheduler-incubating-${project.version} /opt/soft/dolphinscheduler</script>
  384. </postinstallScriptlet>
  385. <postremoveScriptlet>
  386. <script>rm -rf /opt/soft/apache-dolphinscheduler-incubating-${project.version}</script>
  387. </postremoveScriptlet>
  388. </configuration>
  389. </plugin>
  390. </plugins>
  391. </build>
  392. </profile>
  393. </profiles>
  394. </project>