pom.xml 34 KB

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