pom.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  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.0</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.0</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</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>${ambari_commons.install.dir}</directory>
  239. <username>root</username>
  240. <groupname>root</groupname>
  241. <sources>
  242. <source>
  243. <location>${project.basedir}/../ambari-common/src/main/python/ambari_commons</location>
  244. </source>
  245. </sources>
  246. </mapping>
  247. <mapping>
  248. <directory>${resource_management.install.dir}</directory>
  249. <username>root</username>
  250. <groupname>root</groupname>
  251. <sources>
  252. <source>
  253. <location>${project.basedir}/../ambari-common/src/main/python/resource_management</location>
  254. </source>
  255. </sources>
  256. </mapping>
  257. <mapping>
  258. <directory>${jinja.install.dir}</directory>
  259. <filemode>755</filemode>
  260. <username>root</username>
  261. <groupname>root</groupname>
  262. <sources>
  263. <source>
  264. <location>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</location>
  265. <excludes>
  266. <exclude>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</exclude>
  267. </excludes>
  268. </source>
  269. </sources>
  270. </mapping>
  271. <mapping>
  272. <directory>${lib.dir}/examples</directory>
  273. <filemode>755</filemode>
  274. <username>root</username>
  275. <groupname>root</groupname>
  276. <sources>
  277. <source>
  278. <location>src/examples</location>
  279. </source>
  280. </sources>
  281. </mapping>
  282. <mapping>
  283. <directory>/etc/ambari-agent/conf</directory>
  284. <filemode>755</filemode>
  285. <username>root</username>
  286. <groupname>root</groupname>
  287. <sources>
  288. <source>
  289. <location>conf/unix/ambari-agent.ini</location>
  290. </source>
  291. </sources>
  292. </mapping>
  293. <mapping>
  294. <directory>/usr/sbin</directory>
  295. <filemode>755</filemode>
  296. <username>root</username>
  297. <groupname>root</groupname>
  298. <directoryIncluded>false</directoryIncluded>
  299. <sources>
  300. <source>
  301. <location>conf/unix/ambari-agent</location>
  302. <filter>true</filter>
  303. </source>
  304. </sources>
  305. </mapping>
  306. <mapping>
  307. <directory>/var/lib/ambari-agent</directory>
  308. <filemode>700</filemode>
  309. <username>root</username>
  310. <groupname>root</groupname>
  311. <sources>
  312. <source>
  313. <location>conf/unix/ambari-env.sh</location>
  314. </source>
  315. </sources>
  316. </mapping>
  317. <mapping>
  318. <directory>/var/lib/ambari-agent</directory>
  319. <filemode>700</filemode>
  320. <username>root</username>
  321. <groupname>root</groupname>
  322. <sources>
  323. <source>
  324. <location>conf/unix/install-helper.sh</location>
  325. </source>
  326. </sources>
  327. </mapping>
  328. <mapping>
  329. <directory>${package.pid.dir}</directory>
  330. <filemode>755</filemode>
  331. <username>root</username>
  332. <groupname>root</groupname>
  333. </mapping>
  334. <mapping>
  335. <directory>/var/lib/${project.artifactId}/data</directory>
  336. <filemode>755</filemode>
  337. <username>root</username>
  338. <groupname>root</groupname>
  339. </mapping>
  340. <mapping>
  341. <directory>/var/lib/${project.artifactId}/data/tmp</directory>
  342. <filemode>755</filemode>
  343. <username>root</username>
  344. <groupname>root</groupname>
  345. </mapping>
  346. <mapping>
  347. <directory>/var/lib/${project.artifactId}/keys</directory>
  348. <filemode>755</filemode>
  349. <username>root</username>
  350. <groupname>root</groupname>
  351. </mapping>
  352. <mapping>
  353. <directory>${package.log.dir}</directory>
  354. <filemode>755</filemode>
  355. <username>root</username>
  356. <groupname>root</groupname>
  357. </mapping>
  358. <mapping>
  359. <directory>${init.d.dir}</directory>
  360. <filemode>755</filemode>
  361. <username>root</username>
  362. <groupname>root</groupname>
  363. <sources>
  364. <source>
  365. <location>etc/init.d/ambari-agent</location>
  366. </source>
  367. </sources>
  368. </mapping>
  369. <mapping>
  370. <directory>${sudoers.d.dir}</directory>
  371. <username>root</username>
  372. <groupname>root</groupname>
  373. <sources>
  374. <source>
  375. <location>etc/sudoers.d</location>
  376. </source>
  377. </sources>
  378. </mapping>
  379. <mapping>
  380. <directory>/var/lib/${project.artifactId}/data</directory>
  381. <filemode>755</filemode>
  382. <username>root</username>
  383. <groupname>root</groupname>
  384. <sources>
  385. <source>
  386. <location>../version</location>
  387. <filter>true</filter>
  388. </source>
  389. </sources>
  390. </mapping>
  391. <mapping>
  392. <directory>/var/lib/ambari-agent/cache</directory>
  393. <filemode>755</filemode>
  394. <username>root</username>
  395. <groupname>root</groupname>
  396. <sources>
  397. <source>
  398. <location>${target.cache.dir}</location>
  399. </source>
  400. </sources>
  401. </mapping>
  402. </mappings>
  403. </configuration>
  404. </plugin>
  405. <plugin>
  406. <groupId>org.vafer</groupId>
  407. <artifactId>jdeb</artifactId>
  408. <version>1.0.1</version>
  409. <executions>
  410. <execution>
  411. <phase>none</phase>
  412. <goals>
  413. <goal>jdeb</goal>
  414. </goals>
  415. </execution>
  416. </executions>
  417. <configuration>
  418. <controlDir>${basedir}/src/main/package/deb/control</controlDir>
  419. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  420. <dataSet>
  421. <data>
  422. <src>${project.build.directory}/${project.artifactId}-${project.version}/ambari_agent</src>
  423. <type>directory</type>
  424. <mapper>
  425. <type>perm</type>
  426. <prefix>${agent.install.dir}</prefix>
  427. <user>root</user>
  428. <group>root</group>
  429. </mapper>
  430. </data>
  431. <data>
  432. <src>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</src>
  433. <excludes>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</excludes>
  434. <type>directory</type>
  435. <mapper>
  436. <type>perm</type>
  437. <prefix>${jinja.install.dir}</prefix>
  438. <user>root</user>
  439. <group>root</group>
  440. <filemode>755</filemode>
  441. </mapper>
  442. </data>
  443. <data>
  444. <src>src/examples</src>
  445. <type>directory</type>
  446. <mapper>
  447. <type>perm</type>
  448. <prefix>${lib.dir}/examples</prefix>
  449. <user>root</user>
  450. <group>root</group>
  451. <filemode>755</filemode>
  452. </mapper>
  453. </data>
  454. <data>
  455. <src>conf/unix/ambari-agent.ini</src>
  456. <type>file</type>
  457. <mapper>
  458. <type>perm</type>
  459. <prefix>/etc/ambari-agent/conf</prefix>
  460. <user>root</user>
  461. <group>root</group>
  462. <filemode>755</filemode>
  463. </mapper>
  464. </data>
  465. <data>
  466. <src>etc/sudoers.d/ambari-agent</src>
  467. <type>file</type>
  468. <mapper>
  469. <type>perm</type>
  470. <prefix>${sudoers.d.dir}</prefix>
  471. <user>root</user>
  472. <group>root</group>
  473. </mapper>
  474. </data>
  475. <data>
  476. <src>${basedir}/target/src/ambari-agent</src>
  477. <type>file</type>
  478. <mapper>
  479. <type>perm</type>
  480. <prefix>/usr/sbin</prefix>
  481. <user>root</user>
  482. <group>root</group>
  483. <filemode>755</filemode>
  484. </mapper>
  485. </data>
  486. <data>
  487. <src>conf/unix/ambari-env.sh</src>
  488. <type>file</type>
  489. <mapper>
  490. <type>perm</type>
  491. <prefix>/var/lib/ambari-agent</prefix>
  492. <user>root</user>
  493. <group>root</group>
  494. <filemode>700</filemode>
  495. </mapper>
  496. </data>
  497. <data>
  498. <src>conf/unix/install-helper.sh</src>
  499. <type>file</type>
  500. <mapper>
  501. <type>perm</type>
  502. <prefix>/var/lib/ambari-agent</prefix>
  503. <user>root</user>
  504. <group>root</group>
  505. <filemode>700</filemode>
  506. </mapper>
  507. </data>
  508. <data>
  509. <type>template</type>
  510. <paths>
  511. <path>${package.pid.dir}</path>
  512. <path>/var/lib/${project.artifactId}/data</path>
  513. <path>/var/lib/${project.artifactId}/data/tmp</path>
  514. <path>/var/lib/${project.artifactId}/keys</path>
  515. <path>${package.log.dir}</path>
  516. </paths>
  517. <mapper>
  518. <type>perm</type>
  519. <user>root</user>
  520. <group>root</group>
  521. <filemode>755</filemode>
  522. </mapper>
  523. </data>
  524. <data>
  525. <src>etc/init.d/ambari-agent</src>
  526. <type>file</type>
  527. <mapper>
  528. <type>perm</type>
  529. <prefix>/etc/init.d</prefix>
  530. <user>root</user>
  531. <group>root</group>
  532. <filemode>755</filemode>
  533. </mapper>
  534. </data>
  535. <data>
  536. <src>${basedir}/target/src/version</src>
  537. <type>file</type>
  538. <mapper>
  539. <type>perm</type>
  540. <prefix>/var/lib/${project.artifactId}/data</prefix>
  541. <user>root</user>
  542. <group>root</group>
  543. <filemode>755</filemode>
  544. </mapper>
  545. </data>
  546. <data>
  547. <src>../ambari-common/src/main/unix/ambari-python-wrap</src>
  548. <type>file</type>
  549. <mapper>
  550. <type>perm</type>
  551. <prefix>/var/lib/ambari-agent</prefix>
  552. <user>root</user>
  553. <group>root</group>
  554. <filemode>755</filemode>
  555. </mapper>
  556. </data>
  557. <data>
  558. <src>${target.cache.dir}</src>
  559. <type>directory</type>
  560. <mapper>
  561. <type>perm</type>
  562. <prefix>/var/lib/ambari-agent/cache</prefix>
  563. <user>root</user>
  564. <group>root</group>
  565. <filemode>755</filemode>
  566. </mapper>
  567. </data>
  568. <data>
  569. <src>
  570. ${project.basedir}/../ambari-common/src/main/python/ambari_commons
  571. </src>
  572. <type>directory</type>
  573. <mapper>
  574. <type>perm</type>
  575. <prefix>${ambari_commons.install.dir}</prefix>
  576. <filemode>755</filemode>
  577. <user>root</user>
  578. <group>root</group>
  579. </mapper>
  580. </data>
  581. <data>
  582. <src>
  583. ${project.basedir}/../ambari-common/src/main/python/resource_management
  584. </src>
  585. <type>directory</type>
  586. <mapper>
  587. <type>perm</type>
  588. <prefix>${resource_management.install.dir}</prefix>
  589. <filemode>755</filemode>
  590. <user>root</user>
  591. <group>root</group>
  592. </mapper>
  593. </data>
  594. </dataSet>
  595. </configuration>
  596. </plugin>
  597. <plugin>
  598. <artifactId>maven-resources-plugin</artifactId>
  599. <version>2.6</version>
  600. <executions>
  601. <execution>
  602. <id>copy-resources</id>
  603. <phase>prepare-package</phase>
  604. <goals>
  605. <goal>copy-resources</goal>
  606. </goals>
  607. <configuration>
  608. <outputDirectory>${target.cache.dir}</outputDirectory>
  609. <resources>
  610. <resource>
  611. <directory>${ambari.server.module}/src/main/resources</directory>
  612. <includes>
  613. <include>common-services/**</include>
  614. <include>stacks/stack_advisor.py</include>
  615. <include>stacks/${stack.distribution}/**/*</include>
  616. <include>custom_actions/**/*</include>
  617. <include>host_scripts/**/*</include>
  618. </includes>
  619. <filtering>false</filtering>
  620. </resource>
  621. </resources>
  622. </configuration>
  623. </execution>
  624. <execution>
  625. <id>copy-resources-filter</id>
  626. <phase>prepare-package</phase>
  627. <goals>
  628. <goal>copy-resources</goal>
  629. </goals>
  630. <configuration>
  631. <outputDirectory>${basedir}/target/src</outputDirectory>
  632. <resources>
  633. <resource>
  634. <directory>conf/unix</directory>
  635. <includes>
  636. <include>ambari-agent</include>
  637. </includes>
  638. <filtering>true</filtering>
  639. </resource>
  640. <resource>
  641. <directory>${basedir}/../</directory>
  642. <includes>
  643. <include>version</include>
  644. </includes>
  645. <filtering>true</filtering>
  646. </resource>
  647. </resources>
  648. </configuration>
  649. </execution>
  650. </executions>
  651. </plugin>
  652. <plugin>
  653. <groupId>org.apache.rat</groupId>
  654. <artifactId>apache-rat-plugin</artifactId>
  655. <configuration>
  656. <excludes>
  657. <exclude>src/examples/*</exclude>
  658. <exclude>src/test/python/dummy*.txt</exclude>
  659. <exclude>src/test/python/ambari_agent/dummy_files/*</exclude>
  660. <exclude>src/test/python/ambari_agent/dummy*.txt</exclude>
  661. <exclude>src/main/python/ambari_agent/imports.txt</exclude>
  662. <exclude>src/main/python/ambari_agent/apscheduler/**</exclude>
  663. <exclude>etc/sudoers.d/ambari-agent</exclude>
  664. <exclude>**/*.erb</exclude>
  665. <exclude>**/*.json</exclude>
  666. <exclude>**/*.pydevproject</exclude>
  667. <exclude>**/*.wxs</exclude>
  668. </excludes>
  669. </configuration>
  670. <executions>
  671. <execution>
  672. <phase>test</phase>
  673. <goals>
  674. <goal>check</goal>
  675. </goals>
  676. </execution>
  677. </executions>
  678. </plugin>
  679. <plugin>
  680. <groupId>org.codehaus.mojo</groupId>
  681. <artifactId>buildnumber-maven-plugin</artifactId>
  682. <version>${buildnumber-maven-plugin-version}</version>
  683. <configuration>
  684. <urlScm>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ambari.git</urlScm>
  685. </configuration>
  686. <executions>
  687. <execution>
  688. <phase>validate</phase>
  689. <goals>
  690. <goal>create</goal>
  691. </goals>
  692. </execution>
  693. </executions>
  694. </plugin>
  695. </plugins>
  696. <extensions>
  697. <extension>
  698. <groupId>org.apache.maven.wagon</groupId>
  699. <artifactId>wagon-ssh-external</artifactId>
  700. </extension>
  701. </extensions>
  702. </build>
  703. <profiles>
  704. <profile>
  705. <id>windows</id>
  706. <activation>
  707. <os>
  708. <family>win</family>
  709. </os>
  710. </activation>
  711. <properties>
  712. <envClassifier>win</envClassifier>
  713. <dirsep>\</dirsep>
  714. <pathsep>;</pathsep>
  715. <stack.distribution>HDPWIN</stack.distribution>
  716. <executable.python>python</executable.python>
  717. <executable.shell>cmd</executable.shell>
  718. <fileextension.shell>cmd</fileextension.shell>
  719. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  720. <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>
  721. </properties>
  722. </profile>
  723. <profile>
  724. <id>linux</id>
  725. <activation>
  726. <os>
  727. <family>unix</family>
  728. </os>
  729. </activation>
  730. <properties>
  731. <envClassifier>linux</envClassifier>
  732. <dirsep>/</dirsep>
  733. <pathsep>:</pathsep>
  734. <stack.distribution>HDP</stack.distribution>
  735. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  736. <executable.shell>sh</executable.shell>
  737. <fileextension.shell>sh</fileextension.shell>
  738. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  739. <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>
  740. </properties>
  741. </profile>
  742. <profile>
  743. <id>windows-distro</id>
  744. <activation>
  745. <os>
  746. <family>Windows</family>
  747. </os>
  748. </activation>
  749. <build>
  750. <plugins>
  751. <plugin>
  752. <artifactId>maven-assembly-plugin</artifactId>
  753. <configuration>
  754. <tarLongFileMode>gnu</tarLongFileMode>
  755. <descriptors>
  756. <descriptor>src/packages/tarball/all.xml</descriptor>
  757. <descriptor>src/packages/windows.xml</descriptor>
  758. </descriptors>
  759. </configuration>
  760. <executions>
  761. <execution>
  762. <id>build-windows-zip</id>
  763. <phase>prepare-package</phase>
  764. <goals>
  765. <goal>single</goal>
  766. </goals>
  767. </execution>
  768. </executions>
  769. </plugin>
  770. <!-- msi creation -->
  771. <plugin>
  772. <groupId>org.codehaus.mojo</groupId>
  773. <artifactId>exec-maven-plugin</artifactId>
  774. <version>1.2</version>
  775. <executions>
  776. <execution>
  777. <id>run-heat</id>
  778. <phase>package</phase>
  779. <goals>
  780. <goal>exec</goal>
  781. </goals>
  782. <configuration>
  783. <executable>heat.exe</executable>
  784. <arguments>
  785. <argument>dir</argument>
  786. <argument>"."</argument>
  787. <argument>-dr</argument>
  788. <argument>"AGENT_INSTALL_DIRECTORY"</argument>
  789. <argument>-platform</argument>
  790. <argument>Win64</argument>
  791. <argument>-cg</argument>
  792. <argument>"AmbariAgentGroup"</argument>
  793. <argument>-gg</argument>
  794. <argument>-ke</argument>
  795. <argument>-srd</argument>
  796. <argument>-o</argument>
  797. <argument>".\..\ambari-agent-files.wxs"</argument>
  798. </arguments>
  799. <workingDirectory>${basedir}/target/${final.name}-windows-dist</workingDirectory>
  800. </configuration>
  801. </execution>
  802. </executions>
  803. </plugin>
  804. <plugin>
  805. <groupId>org.apache.npanday.plugins</groupId>
  806. <artifactId>wix-maven-plugin</artifactId>
  807. <version>1.4.0-incubating</version>
  808. <extensions>true</extensions>
  809. <configuration>
  810. <sourceFiles>
  811. <sourceFile>target/ambari-agent.wxs</sourceFile>
  812. <sourceFile>target/ambari-agent-files.wxs</sourceFile>
  813. </sourceFiles>
  814. <outputDirectory>target</outputDirectory>
  815. <objectFiles>
  816. <objectFile>target/ambari-agent.wixobj</objectFile>
  817. <objectFile>target/ambari-agent-files.wixobj</objectFile>
  818. </objectFiles>
  819. <outputFile>target/ambari-agent-${project.version}.msi</outputFile>
  820. <extensions>
  821. <extension>WixUIExtension</extension>
  822. </extensions>
  823. </configuration>
  824. <executions>
  825. <execution>
  826. <id>wix-candle</id>
  827. <phase>package</phase>
  828. <goals>
  829. <goal>candle</goal>
  830. </goals>
  831. <configuration>
  832. <arguments>-arch x64</arguments>
  833. </configuration>
  834. </execution>
  835. <execution>
  836. <id>wix-light</id>
  837. <phase>package</phase>
  838. <goals>
  839. <goal>light</goal>
  840. </goals>
  841. <configuration>
  842. <arguments>-b ${basedir}/target/${final.name}-windows-dist</arguments>
  843. </configuration>
  844. </execution>
  845. </executions>
  846. </plugin>
  847. <!-- end msi creation -->
  848. </plugins>
  849. </build>
  850. </profile>
  851. <profile>
  852. <id>suse11</id>
  853. <properties>
  854. <init.d.dir>/etc/init.d</init.d.dir>
  855. </properties>
  856. </profile>
  857. </profiles>
  858. </project>