pom.xml 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. <?xml version="1.0"?>
  2. <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/maven-v4_0_0.xsd">
  3. <!--
  4. Licensed to the Apache Software Foundation (ASF) under one or more
  5. contributor license agreements. See the NOTICE file distributed with
  6. this work for additional information regarding copyright ownership.
  7. The ASF licenses this file to You under the Apache License, Version 2.0
  8. (the "License"); you may not use this file except in compliance with
  9. the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing, software
  12. distributed under the License is distributed on an "AS IS" BASIS,
  13. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. See the License for the specific language governing permissions and
  15. limitations under the License.
  16. -->
  17. <parent>
  18. <groupId>org.apache.ambari</groupId>
  19. <artifactId>ambari-project</artifactId>
  20. <version>2.0.0-SNAPSHOT</version>
  21. <relativePath>../ambari-project</relativePath>
  22. </parent>
  23. <modelVersion>4.0.0</modelVersion>
  24. <groupId>org.apache.ambari</groupId>
  25. <artifactId>ambari-agent</artifactId>
  26. <packaging>pom</packaging>
  27. <version>2.0.0-SNAPSHOT</version>
  28. <name>Ambari Agent</name>
  29. <description>Ambari Agent</description>
  30. <properties>
  31. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32. <final.name>${project.artifactId}-${project.version}</final.name>
  33. <package.release>1</package.release>
  34. <package.prefix>/usr</package.prefix>
  35. <package.log.dir>/var/log/ambari-agent</package.log.dir>
  36. <package.pid.dir>/var/run/ambari-agent</package.pid.dir>
  37. <skipTests>false</skipTests>
  38. <agent.install.dir>/usr/lib/python2.6/site-packages/ambari_agent</agent.install.dir>
  39. <ambari_commons.install.dir>/usr/lib/ambari-agent/lib/ambari_commons</ambari_commons.install.dir>
  40. <resource_management.install.dir>/usr/lib/ambari-agent/lib/resource_management</resource_management.install.dir>
  41. <jinja.install.dir>/usr/lib/ambari-agent/lib/ambari_jinja2</jinja.install.dir>
  42. <lib.dir>/usr/lib/ambari-agent/lib</lib.dir>
  43. <python.ver>python &gt;= 2.6</python.ver>
  44. <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
  45. <deb.architecture>amd64</deb.architecture>
  46. <deb.dependency.list>openssl, zlibc, ${deb.python.ver}</deb.dependency.list>
  47. <ambari.server.module>../ambari-server</ambari.server.module>
  48. <target.cache.dir>${project.build.directory}/cache/</target.cache.dir>
  49. <resource.keeper.script>${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py</resource.keeper.script>
  50. <init.d.dir>/etc/rc.d/init.d</init.d.dir>
  51. <sudoers.d.dir>/etc/sudoers.d</sudoers.d.dir>
  52. </properties>
  53. <build>
  54. <plugins>
  55. <plugin>
  56. <groupId>org.codehaus.mojo</groupId>
  57. <artifactId>build-helper-maven-plugin</artifactId>
  58. <version>1.8</version>
  59. <executions>
  60. <execution>
  61. <id>parse-version</id>
  62. <phase>validate</phase>
  63. <goals>
  64. <goal>parse-version</goal>
  65. </goals>
  66. </execution>
  67. <execution>
  68. <id>regex-property</id>
  69. <goals>
  70. <goal>regex-property</goal>
  71. </goals>
  72. <configuration>
  73. <name>ambariVersion</name>
  74. <value>${project.version}</value>
  75. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  76. <replacement>$1.$2.$3</replacement>
  77. <failIfNoMatch>false</failIfNoMatch>
  78. </configuration>
  79. </execution>
  80. </executions>
  81. </plugin>
  82. <plugin>
  83. <artifactId>maven-compiler-plugin</artifactId>
  84. <version>3.0</version>
  85. </plugin>
  86. <plugin>
  87. <artifactId>maven-assembly-plugin</artifactId>
  88. <configuration>
  89. <tarLongFileMode>gnu</tarLongFileMode>
  90. <descriptors>
  91. <descriptor>src/packages/tarball/all.xml</descriptor>
  92. </descriptors>
  93. </configuration>
  94. <executions>
  95. <execution>
  96. <id>build-tarball</id>
  97. <phase>prepare-package</phase>
  98. <goals>
  99. <goal>single</goal>
  100. </goals>
  101. </execution>
  102. </executions>
  103. </plugin>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-surefire-plugin</artifactId>
  107. <configuration>
  108. <skip>${skipSurefireTests}</skip>
  109. </configuration>
  110. </plugin>
  111. <plugin>
  112. <groupId>org.codehaus.mojo</groupId>
  113. <artifactId>exec-maven-plugin</artifactId>
  114. <version>1.2.1</version>
  115. <executions>
  116. <execution>
  117. <configuration>
  118. <executable>${executable.python}</executable>
  119. <workingDirectory>src/test/python</workingDirectory>
  120. <arguments>
  121. <argument>unitTests.py</argument>
  122. </arguments>
  123. <environmentVariables>
  124. <PYTHONPATH>${path.python.1}${pathsep}$PYTHONPATH</PYTHONPATH>
  125. </environmentVariables>
  126. <skip>${skipTests}</skip>
  127. </configuration>
  128. <id>python-test</id>
  129. <phase>test</phase>
  130. <goals>
  131. <goal>exec</goal>
  132. </goals>
  133. </execution>
  134. <execution>
  135. <!-- TODO: Looks like section is unused, maybe remove? -->
  136. <configuration>
  137. <executable>${executable.python}</executable>
  138. <workingDirectory>target${dirsep}ambari-agent-${project.version}</workingDirectory>
  139. <arguments>
  140. <argument>${project.basedir}${dirsep}src${dirsep}main${dirsep}python${dirsep}setup.py</argument>
  141. <argument>clean</argument>
  142. <argument>bdist_dumb</argument>
  143. </arguments>
  144. <environmentVariables>
  145. <PYTHONPATH>target${dirsep}ambari-agent-${project.version}${pathsep}$PYTHONPATH</PYTHONPATH>
  146. </environmentVariables>
  147. </configuration>
  148. <id>python-package</id>
  149. <phase>package</phase>
  150. <goals>
  151. <goal>exec</goal>
  152. </goals>
  153. </execution>
  154. <execution>
  155. <configuration>
  156. <executable>${executable.python}</executable>
  157. <workingDirectory>${basedir}</workingDirectory>
  158. <arguments>
  159. <argument>${resource.keeper.script}</argument>
  160. <argument>${target.cache.dir}</argument>
  161. </arguments>
  162. <environmentVariables>
  163. <PYTHONPATH>target${dirsep}ambari-agent-${project.version}${pathsep}$PYTHONPATH</PYTHONPATH>
  164. </environmentVariables>
  165. </configuration>
  166. <id>generate-hash-files</id>
  167. <phase>package</phase>
  168. <goals>
  169. <goal>exec</goal>
  170. </goals>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. <plugin>
  175. <groupId>org.codehaus.mojo</groupId>
  176. <artifactId>rpm-maven-plugin</artifactId>
  177. <version>2.0.1</version>
  178. <executions>
  179. <execution>
  180. <!-- unbinds rpm creation from maven lifecycle -->
  181. <phase>none</phase>
  182. <goals>
  183. <goal>rpm</goal>
  184. </goals>
  185. </execution>
  186. </executions>
  187. <configuration>
  188. <copyright>2012, Apache Software Foundation</copyright>
  189. <group>Development</group>
  190. <description>Maven Recipe: RPM Package.</description>
  191. <requires>
  192. <require>openssl</require>
  193. <require>zlib</require>
  194. <require>${python.ver}</require>
  195. </requires>
  196. <postinstallScriptlet>
  197. <scriptFile>src/main/package/rpm/postinstall.sh</scriptFile>
  198. <fileEncoding>utf-8</fileEncoding>
  199. </postinstallScriptlet>
  200. <preinstallScriptlet>
  201. <scriptFile>src/main/package/rpm/preinstall.sh</scriptFile>
  202. <fileEncoding>utf-8</fileEncoding>
  203. </preinstallScriptlet>
  204. <preremoveScriptlet>
  205. <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
  206. <fileEncoding>utf-8</fileEncoding>
  207. </preremoveScriptlet>
  208. <posttransScriptlet>
  209. <scriptFile>src/main/package/rpm/posttrans_agent.sh</scriptFile>
  210. <fileEncoding>utf-8</fileEncoding>
  211. </posttransScriptlet>
  212. <needarch>x86_64</needarch>
  213. <autoRequires>false</autoRequires>
  214. <mappings>
  215. <mapping>
  216. <directory>${agent.install.dir}</directory>
  217. <username>root</username>
  218. <groupname>root</groupname>
  219. <sources>
  220. <source>
  221. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}${dirsep}ambari_agent</location>
  222. </source>
  223. </sources>
  224. </mapping>
  225. <mapping>
  226. <directory>/var/lib/ambari-agent/</directory>
  227. <filemode>755</filemode>
  228. <username>root</username>
  229. <groupname>root</groupname>
  230. <directoryIncluded>false</directoryIncluded>
  231. <sources>
  232. <source>
  233. <location>../ambari-common/src/main/unix/ambari-python-wrap</location>
  234. </source>
  235. </sources>
  236. </mapping>
  237. <mapping>
  238. <directory>/var/lib/ambari-agent/</directory>
  239. <filemode>755</filemode>
  240. <username>root</username>
  241. <groupname>root</groupname>
  242. <directoryIncluded>false</directoryIncluded>
  243. <sources>
  244. <source>
  245. <location>conf/unix/ambari-sudo.sh</location>
  246. </source>
  247. </sources>
  248. </mapping>
  249. <mapping>
  250. <directory>${ambari_commons.install.dir}</directory>
  251. <username>root</username>
  252. <groupname>root</groupname>
  253. <sources>
  254. <source>
  255. <location>${project.basedir}/../ambari-common/src/main/python/ambari_commons</location>
  256. </source>
  257. </sources>
  258. </mapping>
  259. <mapping>
  260. <directory>${resource_management.install.dir}</directory>
  261. <username>root</username>
  262. <groupname>root</groupname>
  263. <sources>
  264. <source>
  265. <location>${project.basedir}/../ambari-common/src/main/python/resource_management</location>
  266. </source>
  267. </sources>
  268. </mapping>
  269. <mapping>
  270. <directory>${jinja.install.dir}</directory>
  271. <filemode>755</filemode>
  272. <username>root</username>
  273. <groupname>root</groupname>
  274. <sources>
  275. <source>
  276. <location>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</location>
  277. <excludes>
  278. <exclude>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</exclude>
  279. </excludes>
  280. </source>
  281. </sources>
  282. </mapping>
  283. <mapping>
  284. <directory>${lib.dir}/examples</directory>
  285. <filemode>755</filemode>
  286. <username>root</username>
  287. <groupname>root</groupname>
  288. <sources>
  289. <source>
  290. <location>src/examples</location>
  291. </source>
  292. </sources>
  293. </mapping>
  294. <mapping>
  295. <directory>/etc/ambari-agent/conf</directory>
  296. <filemode>755</filemode>
  297. <username>root</username>
  298. <groupname>root</groupname>
  299. <sources>
  300. <source>
  301. <location>conf/unix/ambari-agent.ini</location>
  302. </source>
  303. </sources>
  304. </mapping>
  305. <mapping>
  306. <directory>/usr/sbin</directory>
  307. <filemode>755</filemode>
  308. <username>root</username>
  309. <groupname>root</groupname>
  310. <directoryIncluded>false</directoryIncluded>
  311. <sources>
  312. <source>
  313. <location>conf/unix/ambari-agent</location>
  314. <filter>true</filter>
  315. </source>
  316. </sources>
  317. </mapping>
  318. <mapping>
  319. <directory>/var/lib/ambari-agent</directory>
  320. <filemode>700</filemode>
  321. <username>root</username>
  322. <groupname>root</groupname>
  323. <sources>
  324. <source>
  325. <location>conf/unix/ambari-env.sh</location>
  326. </source>
  327. </sources>
  328. </mapping>
  329. <mapping>
  330. <directory>/var/lib/ambari-agent</directory>
  331. <filemode>700</filemode>
  332. <username>root</username>
  333. <groupname>root</groupname>
  334. <sources>
  335. <source>
  336. <location>conf/unix/install-helper.sh</location>
  337. </source>
  338. </sources>
  339. </mapping>
  340. <mapping>
  341. <directory>${package.pid.dir}</directory>
  342. <filemode>755</filemode>
  343. <username>root</username>
  344. <groupname>root</groupname>
  345. </mapping>
  346. <mapping>
  347. <directory>/var/lib/${project.artifactId}/data</directory>
  348. <filemode>755</filemode>
  349. <username>root</username>
  350. <groupname>root</groupname>
  351. </mapping>
  352. <mapping>
  353. <directory>/var/lib/${project.artifactId}/data/tmp</directory>
  354. <filemode>755</filemode>
  355. <username>root</username>
  356. <groupname>root</groupname>
  357. </mapping>
  358. <mapping>
  359. <directory>/var/lib/${project.artifactId}/keys</directory>
  360. <filemode>755</filemode>
  361. <username>root</username>
  362. <groupname>root</groupname>
  363. </mapping>
  364. <mapping>
  365. <directory>${package.log.dir}</directory>
  366. <filemode>755</filemode>
  367. <username>root</username>
  368. <groupname>root</groupname>
  369. </mapping>
  370. <mapping>
  371. <directory>${init.d.dir}</directory>
  372. <filemode>755</filemode>
  373. <username>root</username>
  374. <groupname>root</groupname>
  375. <sources>
  376. <source>
  377. <location>etc/init.d/ambari-agent</location>
  378. </source>
  379. </sources>
  380. </mapping>
  381. <mapping>
  382. <directory>${sudoers.d.dir}</directory>
  383. <username>root</username>
  384. <groupname>root</groupname>
  385. <directoryIncluded>false</directoryIncluded>
  386. <sources>
  387. <source>
  388. <location>etc/sudoers.d</location>
  389. </source>
  390. </sources>
  391. </mapping>
  392. <mapping>
  393. <directory>/var/lib/${project.artifactId}/data</directory>
  394. <filemode>755</filemode>
  395. <username>root</username>
  396. <groupname>root</groupname>
  397. <sources>
  398. <source>
  399. <location>../version</location>
  400. <filter>true</filter>
  401. </source>
  402. </sources>
  403. </mapping>
  404. <mapping>
  405. <directory>/var/lib/ambari-agent/cache</directory>
  406. <filemode>755</filemode>
  407. <username>root</username>
  408. <groupname>root</groupname>
  409. <sources>
  410. <source>
  411. <location>${target.cache.dir}</location>
  412. </source>
  413. </sources>
  414. </mapping>
  415. </mappings>
  416. </configuration>
  417. </plugin>
  418. <plugin>
  419. <groupId>org.vafer</groupId>
  420. <artifactId>jdeb</artifactId>
  421. <version>1.0.1</version>
  422. <executions>
  423. <execution>
  424. <phase>none</phase>
  425. <goals>
  426. <goal>jdeb</goal>
  427. </goals>
  428. </execution>
  429. </executions>
  430. <configuration>
  431. <controlDir>${basedir}/src/main/package/deb/control</controlDir>
  432. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  433. <dataSet>
  434. <data>
  435. <src>${project.build.directory}/${project.artifactId}-${project.version}/ambari_agent</src>
  436. <type>directory</type>
  437. <mapper>
  438. <type>perm</type>
  439. <prefix>${agent.install.dir}</prefix>
  440. <user>root</user>
  441. <group>root</group>
  442. </mapper>
  443. </data>
  444. <data>
  445. <src>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</src>
  446. <excludes>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</excludes>
  447. <type>directory</type>
  448. <mapper>
  449. <type>perm</type>
  450. <prefix>${jinja.install.dir}</prefix>
  451. <user>root</user>
  452. <group>root</group>
  453. <filemode>755</filemode>
  454. </mapper>
  455. </data>
  456. <data>
  457. <src>src/examples</src>
  458. <type>directory</type>
  459. <mapper>
  460. <type>perm</type>
  461. <prefix>${lib.dir}/examples</prefix>
  462. <user>root</user>
  463. <group>root</group>
  464. <filemode>755</filemode>
  465. </mapper>
  466. </data>
  467. <data>
  468. <src>conf/unix/ambari-agent.ini</src>
  469. <type>file</type>
  470. <mapper>
  471. <type>perm</type>
  472. <prefix>/etc/ambari-agent/conf</prefix>
  473. <user>root</user>
  474. <group>root</group>
  475. <filemode>755</filemode>
  476. </mapper>
  477. </data>
  478. <data>
  479. <src>etc/sudoers.d/ambari-agent</src>
  480. <type>file</type>
  481. <mapper>
  482. <type>perm</type>
  483. <prefix>${sudoers.d.dir}</prefix>
  484. <user>root</user>
  485. <group>root</group>
  486. </mapper>
  487. </data>
  488. <data>
  489. <src>${basedir}/target/src/ambari-agent</src>
  490. <type>file</type>
  491. <mapper>
  492. <type>perm</type>
  493. <prefix>/usr/sbin</prefix>
  494. <user>root</user>
  495. <group>root</group>
  496. <filemode>755</filemode>
  497. </mapper>
  498. </data>
  499. <data>
  500. <src>conf/unix/ambari-env.sh</src>
  501. <type>file</type>
  502. <mapper>
  503. <type>perm</type>
  504. <prefix>/var/lib/ambari-agent</prefix>
  505. <user>root</user>
  506. <group>root</group>
  507. <filemode>700</filemode>
  508. </mapper>
  509. </data>
  510. <data>
  511. <src>conf/unix/install-helper.sh</src>
  512. <type>file</type>
  513. <mapper>
  514. <type>perm</type>
  515. <prefix>/var/lib/ambari-agent</prefix>
  516. <user>root</user>
  517. <group>root</group>
  518. <filemode>700</filemode>
  519. </mapper>
  520. </data>
  521. <data>
  522. <type>template</type>
  523. <paths>
  524. <path>${package.pid.dir}</path>
  525. <path>/var/lib/${project.artifactId}/data</path>
  526. <path>/var/lib/${project.artifactId}/data/tmp</path>
  527. <path>/var/lib/${project.artifactId}/keys</path>
  528. <path>${package.log.dir}</path>
  529. </paths>
  530. <mapper>
  531. <type>perm</type>
  532. <user>root</user>
  533. <group>root</group>
  534. <filemode>755</filemode>
  535. </mapper>
  536. </data>
  537. <data>
  538. <src>etc/init.d/ambari-agent</src>
  539. <type>file</type>
  540. <mapper>
  541. <type>perm</type>
  542. <prefix>/etc/init.d</prefix>
  543. <user>root</user>
  544. <group>root</group>
  545. <filemode>755</filemode>
  546. </mapper>
  547. </data>
  548. <data>
  549. <src>${basedir}/target/src/version</src>
  550. <type>file</type>
  551. <mapper>
  552. <type>perm</type>
  553. <prefix>/var/lib/${project.artifactId}/data</prefix>
  554. <user>root</user>
  555. <group>root</group>
  556. <filemode>755</filemode>
  557. </mapper>
  558. </data>
  559. <data>
  560. <src>../ambari-common/src/main/unix/ambari-python-wrap</src>
  561. <type>file</type>
  562. <mapper>
  563. <type>perm</type>
  564. <prefix>/var/lib/ambari-agent</prefix>
  565. <user>root</user>
  566. <group>root</group>
  567. <filemode>755</filemode>
  568. </mapper>
  569. </data>
  570. <data>
  571. <src>conf/unix/ambari-sudo.sh</src>
  572. <type>file</type>
  573. <mapper>
  574. <type>perm</type>
  575. <prefix>/var/lib/ambari-agent</prefix>
  576. <user>root</user>
  577. <group>root</group>
  578. <filemode>755</filemode>
  579. </mapper>
  580. </data>
  581. <data>
  582. <src>${target.cache.dir}</src>
  583. <type>directory</type>
  584. <mapper>
  585. <type>perm</type>
  586. <prefix>/var/lib/ambari-agent/cache</prefix>
  587. <user>root</user>
  588. <group>root</group>
  589. <filemode>755</filemode>
  590. </mapper>
  591. </data>
  592. <data>
  593. <src>
  594. ${project.basedir}/../ambari-common/src/main/python/ambari_commons
  595. </src>
  596. <type>directory</type>
  597. <mapper>
  598. <type>perm</type>
  599. <prefix>${ambari_commons.install.dir}</prefix>
  600. <filemode>755</filemode>
  601. <user>root</user>
  602. <group>root</group>
  603. </mapper>
  604. </data>
  605. <data>
  606. <src>
  607. ${project.basedir}/../ambari-common/src/main/python/resource_management
  608. </src>
  609. <type>directory</type>
  610. <mapper>
  611. <type>perm</type>
  612. <prefix>${resource_management.install.dir}</prefix>
  613. <filemode>755</filemode>
  614. <user>root</user>
  615. <group>root</group>
  616. </mapper>
  617. </data>
  618. </dataSet>
  619. </configuration>
  620. </plugin>
  621. <plugin>
  622. <artifactId>maven-resources-plugin</artifactId>
  623. <version>2.6</version>
  624. <executions>
  625. <execution>
  626. <id>copy-resources</id>
  627. <phase>prepare-package</phase>
  628. <goals>
  629. <goal>copy-resources</goal>
  630. </goals>
  631. <configuration>
  632. <outputDirectory>${target.cache.dir}</outputDirectory>
  633. <resources>
  634. <resource>
  635. <directory>${ambari.server.module}/src/main/resources</directory>
  636. <includes>
  637. <include>common-services/**</include>
  638. <include>stacks/stack_advisor.py</include>
  639. <include>stacks/${stack.distribution}/**/*</include>
  640. <include>custom_actions/**/*</include>
  641. <include>host_scripts/**/*</include>
  642. </includes>
  643. <filtering>false</filtering>
  644. </resource>
  645. </resources>
  646. </configuration>
  647. </execution>
  648. <execution>
  649. <id>copy-resources-filter</id>
  650. <phase>prepare-package</phase>
  651. <goals>
  652. <goal>copy-resources</goal>
  653. </goals>
  654. <configuration>
  655. <outputDirectory>${basedir}/target/src</outputDirectory>
  656. <resources>
  657. <resource>
  658. <directory>conf/unix</directory>
  659. <includes>
  660. <include>ambari-agent</include>
  661. </includes>
  662. <filtering>true</filtering>
  663. </resource>
  664. <resource>
  665. <directory>${basedir}/../</directory>
  666. <includes>
  667. <include>version</include>
  668. </includes>
  669. <filtering>true</filtering>
  670. </resource>
  671. </resources>
  672. </configuration>
  673. </execution>
  674. </executions>
  675. </plugin>
  676. <plugin>
  677. <groupId>org.apache.rat</groupId>
  678. <artifactId>apache-rat-plugin</artifactId>
  679. <configuration>
  680. <excludes>
  681. <exclude>src/test/python/tmp_hostcheck.result</exclude>
  682. <exclude>src/examples/*</exclude>
  683. <exclude>src/test/python/dummy*.txt</exclude>
  684. <exclude>src/test/python/ambari_agent/dummy_files/*</exclude>
  685. <exclude>src/test/python/ambari_agent/dummy*.txt</exclude>
  686. <exclude>src/main/python/ambari_agent/imports.txt</exclude>
  687. <exclude>src/main/python/ambari_agent/apscheduler/**</exclude>
  688. <exclude>etc/sudoers.d/ambari-agent</exclude>
  689. <exclude>**/*.erb</exclude>
  690. <exclude>**/*.json</exclude>
  691. <exclude>**/*.pydevproject</exclude>
  692. <exclude>**/*.wxs</exclude>
  693. </excludes>
  694. </configuration>
  695. <executions>
  696. <execution>
  697. <phase>test</phase>
  698. <goals>
  699. <goal>check</goal>
  700. </goals>
  701. </execution>
  702. </executions>
  703. </plugin>
  704. <plugin>
  705. <groupId>org.codehaus.mojo</groupId>
  706. <artifactId>buildnumber-maven-plugin</artifactId>
  707. <version>${buildnumber-maven-plugin-version}</version>
  708. <configuration>
  709. <urlScm>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ambari.git</urlScm>
  710. </configuration>
  711. <executions>
  712. <execution>
  713. <phase>validate</phase>
  714. <goals>
  715. <goal>create</goal>
  716. </goals>
  717. </execution>
  718. </executions>
  719. </plugin>
  720. </plugins>
  721. <extensions>
  722. <extension>
  723. <groupId>org.apache.maven.wagon</groupId>
  724. <artifactId>wagon-ssh-external</artifactId>
  725. </extension>
  726. </extensions>
  727. </build>
  728. <profiles>
  729. <profile>
  730. <id>windows</id>
  731. <activation>
  732. <os>
  733. <family>win</family>
  734. </os>
  735. </activation>
  736. <properties>
  737. <envClassifier>win</envClassifier>
  738. <dirsep>\</dirsep>
  739. <pathsep>;</pathsep>
  740. <stack.distribution>HDPWIN</stack.distribution>
  741. <executable.python>python</executable.python>
  742. <executable.shell>cmd</executable.shell>
  743. <fileextension.shell>cmd</fileextension.shell>
  744. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  745. <path.python.1>${project.basedir}\..\ambari-common\src\main\python;${project.basedir}\..\ambari-agent\src\main\python;${project.basedir}\..\ambari-common\src\main\python\ambari_jinja2;${project.basedir}\..\ambari-common\src\main\python\ambari_commons;${project.basedir}\..\ambari-common\src\test\python;${project.basedir}\src\main\python;${project.basedir}\src\main\python\ambari_agent;${project.basedir}\src\main\python\resource_management;${project.basedir}\src\test\python;${project.basedir}\src\test\python\ambari_agent;${project.basedir}\src\test\python\resource_management;${project.basedir}\..\ambari-server\src\test\python;${project.basedir}\..\ambari-server\src\main\resources\common-services\HDFS\2.1.0.2.0\package\files</path.python.1>
  746. </properties>
  747. </profile>
  748. <profile>
  749. <id>linux</id>
  750. <activation>
  751. <os>
  752. <family>unix</family>
  753. </os>
  754. </activation>
  755. <properties>
  756. <envClassifier>linux</envClassifier>
  757. <dirsep>/</dirsep>
  758. <pathsep>:</pathsep>
  759. <stack.distribution>HDP</stack.distribution>
  760. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  761. <executable.shell>sh</executable.shell>
  762. <fileextension.shell>sh</fileextension.shell>
  763. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  764. <path.python.1>${project.basedir}/../ambari-common/src/main/python:${project.basedir}/../ambari-agent/src/main/python:${project.basedir}/../ambari-common/src/main/python/ambari_jinja2:${project.basedir}/../ambari-common/src/main/python/ambari_commons:${project.basedir}/../ambari-common/src/test/python:${project.basedir}/src/main/python:${project.basedir}/src/main/python/ambari_agent:${project.basedir}/src/main/python/resource_management:${project.basedir}/src/test/python:${project.basedir}/src/test/python/ambari_agent:${project.basedir}/src/test/python/resource_management:${project.basedir}/../ambari-server/src/test/python:${project.basedir}/../ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/files</path.python.1>
  765. </properties>
  766. </profile>
  767. <profile>
  768. <id>windows-distro</id>
  769. <activation>
  770. <os>
  771. <family>Windows</family>
  772. </os>
  773. </activation>
  774. <build>
  775. <plugins>
  776. <plugin>
  777. <artifactId>maven-assembly-plugin</artifactId>
  778. <configuration>
  779. <tarLongFileMode>gnu</tarLongFileMode>
  780. <descriptors>
  781. <descriptor>src/packages/tarball/all.xml</descriptor>
  782. <descriptor>src/packages/windows.xml</descriptor>
  783. </descriptors>
  784. </configuration>
  785. <executions>
  786. <execution>
  787. <id>build-windows-zip</id>
  788. <phase>prepare-package</phase>
  789. <goals>
  790. <goal>single</goal>
  791. </goals>
  792. </execution>
  793. </executions>
  794. </plugin>
  795. <!-- msi creation -->
  796. <plugin>
  797. <groupId>org.codehaus.mojo</groupId>
  798. <artifactId>exec-maven-plugin</artifactId>
  799. <version>1.2.1</version>
  800. <executions>
  801. <execution>
  802. <id>run-heat</id>
  803. <phase>package</phase>
  804. <goals>
  805. <goal>exec</goal>
  806. </goals>
  807. <configuration>
  808. <executable>heat.exe</executable>
  809. <arguments>
  810. <argument>dir</argument>
  811. <argument>"."</argument>
  812. <argument>-dr</argument>
  813. <argument>"AGENT_INSTALL_DIRECTORY"</argument>
  814. <argument>-platform</argument>
  815. <argument>Win64</argument>
  816. <argument>-cg</argument>
  817. <argument>"AmbariAgentGroup"</argument>
  818. <argument>-gg</argument>
  819. <argument>-ke</argument>
  820. <argument>-srd</argument>
  821. <argument>-o</argument>
  822. <argument>".\..\ambari-agent-files.wxs"</argument>
  823. </arguments>
  824. <workingDirectory>${basedir}/target/${final.name}-windows-dist</workingDirectory>
  825. </configuration>
  826. </execution>
  827. </executions>
  828. </plugin>
  829. <plugin>
  830. <groupId>org.apache.npanday.plugins</groupId>
  831. <artifactId>wix-maven-plugin</artifactId>
  832. <version>1.4.0-incubating</version>
  833. <extensions>true</extensions>
  834. <configuration>
  835. <sourceFiles>
  836. <sourceFile>target/ambari-agent.wxs</sourceFile>
  837. <sourceFile>target/ambari-agent-files.wxs</sourceFile>
  838. </sourceFiles>
  839. <outputDirectory>target</outputDirectory>
  840. <objectFiles>
  841. <objectFile>target/ambari-agent.wixobj</objectFile>
  842. <objectFile>target/ambari-agent-files.wixobj</objectFile>
  843. </objectFiles>
  844. <outputFile>target/ambari-agent-${project.version}.msi</outputFile>
  845. <extensions>
  846. <extension>WixUIExtension</extension>
  847. </extensions>
  848. </configuration>
  849. <executions>
  850. <execution>
  851. <id>wix-candle</id>
  852. <phase>package</phase>
  853. <goals>
  854. <goal>candle</goal>
  855. </goals>
  856. <configuration>
  857. <arguments>-arch x64</arguments>
  858. </configuration>
  859. </execution>
  860. <execution>
  861. <id>wix-light</id>
  862. <phase>package</phase>
  863. <goals>
  864. <goal>light</goal>
  865. </goals>
  866. <configuration>
  867. <arguments>-b ${basedir}/target/${final.name}-windows-dist</arguments>
  868. </configuration>
  869. </execution>
  870. </executions>
  871. </plugin>
  872. <!-- end msi creation -->
  873. </plugins>
  874. </build>
  875. </profile>
  876. <profile>
  877. <id>suse11</id>
  878. <properties>
  879. <init.d.dir>/etc/init.d</init.d.dir>
  880. </properties>
  881. </profile>
  882. </profiles>
  883. </project>