pom.xml 38 KB

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