pom.xml 35 KB

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