pom.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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.5.0.0.0</version>
  21. <relativePath>../ambari-project</relativePath>
  22. </parent>
  23. <modelVersion>4.0.0</modelVersion>
  24. <groupId>org.apache.ambari</groupId>
  25. <artifactId>ambari-agent</artifactId>
  26. <packaging>pom</packaging>
  27. <version>2.5.0.0.0</version>
  28. <name>Ambari Agent</name>
  29. <description>Ambari Agent</description>
  30. <properties>
  31. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32. <final.name>${project.artifactId}-${project.version}</final.name>
  33. <package.release>1</package.release>
  34. <package.prefix>/usr</package.prefix>
  35. <package.log.dir>/var/log/ambari-agent</package.log.dir>
  36. <package.pid.dir>/var/run/ambari-agent</package.pid.dir>
  37. <skipTests>false</skipTests>
  38. <agent.install.dir>/usr/lib/python2.6/site-packages/ambari_agent</agent.install.dir>
  39. <ambari_commons.install.dir>/usr/lib/ambari-agent/lib/ambari_commons</ambari_commons.install.dir>
  40. <resource_management.install.dir>/usr/lib/ambari-agent/lib/resource_management</resource_management.install.dir>
  41. <jinja.install.dir>/usr/lib/ambari-agent/lib/ambari_jinja2</jinja.install.dir>
  42. <simplejson.install.dir>/usr/lib/ambari-agent/lib/ambari_simplejson</simplejson.install.dir>
  43. <lib.dir>/usr/lib/ambari-agent/lib</lib.dir>
  44. <deb.architecture>amd64</deb.architecture>
  45. <ambari.server.module>../ambari-server</ambari.server.module>
  46. <target.cache.dir>${project.build.directory}/cache/</target.cache.dir>
  47. <resource.keeper.script>${ambari.server.module}/src/main/python/ambari_server/resourceFilesKeeper.py</resource.keeper.script>
  48. <resourceManagementSrcLocation>${project.basedir}/../ambari-common/src/main/python/resource_management</resourceManagementSrcLocation>
  49. <resourcesFolder>${ambari.server.module}/src/main/resources</resourcesFolder>
  50. <customActionsLocation>${target.cache.dir}/custom_actions</customActionsLocation>
  51. <empty.dir>src/packages/tarball</empty.dir> <!-- any directory in project with not very big amount of files (not to waste-load them) -->
  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]+)\.([0-9]+)(\.|-).*</regex>
  76. <replacement>$1.$2.$3.$4</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. <groupId>org.apache.maven.plugins</groupId>
  88. <artifactId>maven-surefire-plugin</artifactId>
  89. <configuration>
  90. <skip>${skipSurefireTests}</skip>
  91. </configuration>
  92. </plugin>
  93. <plugin>
  94. <groupId>org.codehaus.mojo</groupId>
  95. <artifactId>exec-maven-plugin</artifactId>
  96. <version>1.2.1</version>
  97. <executions>
  98. <execution>
  99. <configuration>
  100. <executable>${executable.python}</executable>
  101. <workingDirectory>src/test/python</workingDirectory>
  102. <arguments>
  103. <argument>unitTests.py</argument>
  104. </arguments>
  105. <environmentVariables>
  106. <PYTHONPATH>${path.python.1}${pathsep}$PYTHONPATH</PYTHONPATH>
  107. </environmentVariables>
  108. <skip>${skipTests}</skip>
  109. </configuration>
  110. <id>python-test</id>
  111. <phase>test</phase>
  112. <goals>
  113. <goal>exec</goal>
  114. </goals>
  115. </execution>
  116. <execution>
  117. <configuration>
  118. <executable>${executable.python}</executable>
  119. <workingDirectory>${basedir}</workingDirectory>
  120. <arguments>
  121. <argument>${resource.keeper.script}</argument>
  122. <argument>${target.cache.dir}</argument>
  123. </arguments>
  124. <environmentVariables>
  125. <PYTHONPATH>target${dirsep}ambari-agent-${project.version}${pathsep}$PYTHONPATH</PYTHONPATH>
  126. </environmentVariables>
  127. </configuration>
  128. <id>generate-hash-files</id>
  129. <phase>package</phase>
  130. <goals>
  131. <goal>exec</goal>
  132. </goals>
  133. </execution>
  134. </executions>
  135. </plugin>
  136. <plugin>
  137. <groupId>org.codehaus.mojo</groupId>
  138. <artifactId>properties-maven-plugin</artifactId>
  139. <executions>
  140. <execution>
  141. <phase>package</phase>
  142. <goals>
  143. <goal>read-project-properties</goal>
  144. </goals>
  145. <configuration>
  146. <files>
  147. <file>${basedir}/src/main/package/dependencies.properties</file>
  148. </files>
  149. </configuration>
  150. </execution>
  151. </executions>
  152. </plugin>
  153. <plugin>
  154. <groupId>org.codehaus.mojo</groupId>
  155. <artifactId>rpm-maven-plugin</artifactId>
  156. <version>2.1.4</version>
  157. <executions>
  158. <execution>
  159. <!-- unbinds rpm creation from maven lifecycle -->
  160. <phase>none</phase>
  161. <goals>
  162. <goal>rpm</goal>
  163. </goals>
  164. </execution>
  165. </executions>
  166. <configuration>
  167. <copyright>2012, Apache Software Foundation</copyright>
  168. <group>Development</group>
  169. <description>Maven Recipe: RPM Package.</description>
  170. <requires>
  171. <require>${rpm.dependency.list}</require>
  172. </requires>
  173. <postinstallScriptlet>
  174. <scriptFile>src/main/package/rpm/postinstall.sh</scriptFile>
  175. <fileEncoding>utf-8</fileEncoding>
  176. </postinstallScriptlet>
  177. <preinstallScriptlet>
  178. <scriptFile>src/main/package/rpm/preinstall.sh</scriptFile>
  179. <fileEncoding>utf-8</fileEncoding>
  180. </preinstallScriptlet>
  181. <preremoveScriptlet>
  182. <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
  183. <fileEncoding>utf-8</fileEncoding>
  184. </preremoveScriptlet>
  185. <posttransScriptlet>
  186. <scriptFile>src/main/package/rpm/posttrans_agent.sh</scriptFile>
  187. <fileEncoding>utf-8</fileEncoding>
  188. </posttransScriptlet>
  189. <needarch>x86_64</needarch>
  190. <autoRequires>false</autoRequires>
  191. <mappings>
  192. <mapping>
  193. <directory>/etc</directory>
  194. <username>root</username>
  195. <groupname>root</groupname>
  196. <directoryIncluded>false</directoryIncluded> <!-- avoid managing /etc/init.d -->
  197. <sources>
  198. <source>
  199. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/etc</location>
  200. </source>
  201. </sources>
  202. </mapping>
  203. <mapping>
  204. <directory>/usr/sbin</directory>
  205. <username>root</username>
  206. <groupname>root</groupname>
  207. <directoryIncluded>false</directoryIncluded> <!-- avoid managing /usr/sbin -->
  208. <sources>
  209. <source>
  210. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/usr/sbin</location>
  211. </source>
  212. </sources>
  213. </mapping>
  214. <mapping>
  215. <directory>/usr/lib/ambari-agent</directory>
  216. <username>root</username>
  217. <groupname>root</groupname>
  218. <sources>
  219. <source>
  220. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/usr/lib/ambari-agent</location>
  221. </source>
  222. </sources>
  223. </mapping>
  224. <mapping>
  225. <directory>/usr/lib/python2.6/site-packages</directory>
  226. <username>root</username>
  227. <groupname>root</groupname>
  228. <sources>
  229. <source>
  230. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/usr/lib/python2.6/site-packages</location>
  231. </source>
  232. </sources>
  233. </mapping>
  234. <mapping>
  235. <directory>/var/lib/ambari-agent</directory>
  236. <username>root</username>
  237. <groupname>root</groupname>
  238. <sources>
  239. <source>
  240. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/lib/ambari-agent</location>
  241. </source>
  242. </sources>
  243. </mapping>
  244. <mapping>
  245. <directory>/var/log/ambari-agent</directory>
  246. <username>root</username>
  247. <groupname>root</groupname>
  248. <sources>
  249. <source>
  250. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/log/ambari-agent</location>
  251. </source>
  252. </sources>
  253. </mapping>
  254. <mapping>
  255. <directory>/var/run/ambari-agent</directory>
  256. <username>root</username>
  257. <groupname>root</groupname>
  258. <sources>
  259. <source>
  260. <location>${project.build.directory}${dirsep}${project.artifactId}-${project.version}/var/run/ambari-agent</location>
  261. </source>
  262. </sources>
  263. </mapping>
  264. </mappings>
  265. </configuration>
  266. </plugin>
  267. <plugin>
  268. <groupId>org.vafer</groupId>
  269. <artifactId>jdeb</artifactId>
  270. <version>1.4</version>
  271. <executions>
  272. <execution>
  273. <phase>none</phase>
  274. <goals>
  275. <goal>jdeb</goal>
  276. </goals>
  277. </execution>
  278. </executions>
  279. <configuration>
  280. <controlDir>${basedir}/src/main/package/deb/control</controlDir>
  281. <deb>${basedir}/target/${project.artifactId}_${package-version}-${package-release}.deb</deb>
  282. <skip>false</skip>
  283. <skipPOMs>false</skipPOMs>
  284. <dataSet>
  285. <data>
  286. <src>${project.build.directory}${dirsep}${project.artifactId}-${project.version}.tar.gz</src>
  287. <type>archive</type>
  288. <mapper>
  289. <type>perm</type>
  290. <user>root</user>
  291. <group>root</group>
  292. </mapper>
  293. </data>
  294. </dataSet>
  295. </configuration>
  296. </plugin>
  297. <plugin>
  298. <artifactId>maven-assembly-plugin</artifactId>
  299. <configuration>
  300. <tarLongFileMode>gnu</tarLongFileMode>
  301. <descriptors>
  302. <descriptor>src/packages/tarball/all.xml</descriptor>
  303. </descriptors>
  304. </configuration>
  305. <executions>
  306. <execution>
  307. <id>build-tarball</id>
  308. <phase>${assemblyPhase}</phase>
  309. <goals>
  310. <goal>single</goal>
  311. </goals>
  312. </execution>
  313. </executions>
  314. </plugin>
  315. <plugin>
  316. <artifactId>maven-resources-plugin</artifactId>
  317. <version>2.6</version>
  318. <executions>
  319. <execution>
  320. <id>copy-resources</id>
  321. <phase>prepare-package</phase>
  322. <goals>
  323. <goal>copy-resources</goal>
  324. </goals>
  325. <configuration>
  326. <outputDirectory>${target.cache.dir}</outputDirectory>
  327. <resources>
  328. <resource>
  329. <directory>${ambari.server.module}/src/main/resources</directory>
  330. <includes>
  331. <include>custom_actions/**/*</include>
  332. <include>host_scripts/**/*</include>
  333. </includes>
  334. <filtering>false</filtering>
  335. </resource>
  336. </resources>
  337. </configuration>
  338. </execution>
  339. <execution>
  340. <id>copy-common-resources</id>
  341. <phase>prepare-package</phase>
  342. <goals>
  343. <goal>copy-resources</goal>
  344. </goals>
  345. <configuration>
  346. <outputDirectory>${target.cache.dir}</outputDirectory>
  347. <resources>
  348. <resource>
  349. <directory>${resourcesFolder}</directory>
  350. <includes>
  351. <include>common-services/**</include>
  352. <include>stacks/stack_advisor.py</include>
  353. <include>stacks/${stack.distribution}/**/*</include>
  354. </includes>
  355. <filtering>false</filtering>
  356. </resource>
  357. </resources>
  358. </configuration>
  359. </execution>
  360. <execution>
  361. <id>copy-resources-filter</id>
  362. <phase>generate-resources</phase>
  363. <goals>
  364. <goal>copy-resources</goal>
  365. </goals>
  366. <configuration>
  367. <outputDirectory>${basedir}/target/src</outputDirectory>
  368. <resources>
  369. <resource>
  370. <directory>conf/unix</directory>
  371. <includes>
  372. <include>ambari-agent</include>
  373. </includes>
  374. <filtering>true</filtering>
  375. </resource>
  376. <resource>
  377. <directory>${basedir}/../</directory>
  378. <includes>
  379. <include>version</include>
  380. </includes>
  381. <filtering>true</filtering>
  382. </resource>
  383. </resources>
  384. </configuration>
  385. </execution>
  386. <execution>
  387. <id>copy-repo-resources</id>
  388. <phase>${assemblyPhase}</phase>
  389. <goals>
  390. <goal>copy-resources</goal>
  391. </goals>
  392. <configuration>
  393. <outputDirectory>${basedir}/target/repo</outputDirectory>
  394. <resources>
  395. <resource>
  396. <directory>${project.basedir}/../ambari-common/src/main/repo</directory>
  397. </resource>
  398. <resource>
  399. <directory>${project.build.directory}</directory>
  400. <includes>
  401. <include>${project.artifactId}-${project.version}.tar.gz</include>
  402. </includes>
  403. </resource>
  404. <resource>
  405. <directory>${basedir}/src/main/package/deb/control</directory>
  406. </resource>
  407. <resource>
  408. <directory>${basedir}/src/main/package</directory>
  409. <includes>
  410. <include>dependencies.properties</include>
  411. </includes>
  412. </resource>
  413. <resource>
  414. <directory>${project.basedir}/../ambari-common/src/main/python/ambari_commons</directory>
  415. <includes>
  416. <include>os_check.py</include>
  417. <include>resources/os_family.json</include>
  418. </includes>
  419. </resource>
  420. </resources>
  421. </configuration>
  422. </execution>
  423. </executions>
  424. </plugin>
  425. <plugin>
  426. <groupId>com.coderplus.maven.plugins</groupId>
  427. <artifactId>copy-rename-maven-plugin</artifactId>
  428. <version>1.0.1</version>
  429. <executions>
  430. <execution>
  431. <id>rename-file</id>
  432. <phase>${assemblyPhase}</phase>
  433. <goals>
  434. <goal>rename</goal>
  435. </goals>
  436. <configuration>
  437. <sourceFile>${basedir}/target/repo/${project.artifactId}-${project.version}.tar.gz</sourceFile>
  438. <destinationFile>${basedir}/target/repo/${project.artifactId}.tar.gz</destinationFile>
  439. </configuration>
  440. </execution>
  441. </executions>
  442. </plugin>
  443. <plugin>
  444. <groupId>org.apache.rat</groupId>
  445. <artifactId>apache-rat-plugin</artifactId>
  446. <configuration>
  447. <excludes>
  448. <exclude>conf/unix/logging.conf.sample</exclude>
  449. <exclude>conf/windows/logging.conf.sample</exclude>
  450. <exclude>src/test/python/tmp_hostcheck.result</exclude>
  451. <exclude>src/examples/*</exclude>
  452. <exclude>src/test/python/dummy*.txt</exclude>
  453. <exclude>src/test/python/ambari_agent/dummy_files/*</exclude>
  454. <exclude>src/test/python/ambari_agent/dummy*.txt</exclude>
  455. <exclude>src/main/python/ambari_agent/imports.txt</exclude>
  456. <exclude>src/main/python/ambari_agent/apscheduler/**</exclude>
  457. <exclude>**/*.erb</exclude>
  458. <exclude>**/*.json</exclude>
  459. <exclude>**/*.pydevproject</exclude>
  460. <exclude>src/main/package/choco/ambari-agent.nuspec</exclude>
  461. </excludes>
  462. </configuration>
  463. <executions>
  464. <execution>
  465. <phase>test</phase>
  466. <goals>
  467. <goal>check</goal>
  468. </goals>
  469. </execution>
  470. </executions>
  471. </plugin>
  472. <plugin>
  473. <groupId>org.codehaus.mojo</groupId>
  474. <artifactId>buildnumber-maven-plugin</artifactId>
  475. <version>${buildnumber-maven-plugin-version}</version>
  476. <configuration>
  477. <urlScm>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ambari.git</urlScm>
  478. </configuration>
  479. <executions>
  480. <execution>
  481. <phase>validate</phase>
  482. <goals>
  483. <goal>create</goal>
  484. </goals>
  485. </execution>
  486. </executions>
  487. </plugin>
  488. </plugins>
  489. <extensions>
  490. <extension>
  491. <groupId>org.apache.maven.wagon</groupId>
  492. <artifactId>wagon-ssh-external</artifactId>
  493. </extension>
  494. </extensions>
  495. </build>
  496. <profiles>
  497. <profile>
  498. <id>windows</id>
  499. <activation>
  500. <os>
  501. <family>win</family>
  502. </os>
  503. </activation>
  504. <properties>
  505. <envClassifier>win</envClassifier>
  506. <dirsep>\</dirsep>
  507. <pathsep>;</pathsep>
  508. <stack.distribution>HDPWIN</stack.distribution>
  509. <executable.python>python</executable.python>
  510. <executable.shell>cmd</executable.shell>
  511. <fileextension.shell>cmd</fileextension.shell>
  512. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  513. <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>
  514. </properties>
  515. </profile>
  516. <profile>
  517. <id>linux</id>
  518. <activation>
  519. <os>
  520. <family>unix</family>
  521. </os>
  522. </activation>
  523. <properties>
  524. <envClassifier>linux</envClassifier>
  525. <dirsep>/</dirsep>
  526. <pathsep>:</pathsep>
  527. <stack.distribution>HDP</stack.distribution>
  528. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  529. <executable.shell>sh</executable.shell>
  530. <fileextension.shell>sh</fileextension.shell>
  531. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  532. <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>
  533. </properties>
  534. </profile>
  535. <profile>
  536. <id>windows-distro</id>
  537. <activation>
  538. <os>
  539. <family>Windows</family>
  540. </os>
  541. </activation>
  542. <build>
  543. <plugins>
  544. <plugin>
  545. <artifactId>maven-assembly-plugin</artifactId>
  546. <configuration>
  547. <tarLongFileMode>gnu</tarLongFileMode>
  548. <descriptors>
  549. <descriptor>src/packages/tarball/all.xml</descriptor>
  550. <descriptor>src/packages/windows.xml</descriptor>
  551. </descriptors>
  552. </configuration>
  553. <executions>
  554. <execution>
  555. <id>build-windows-zip</id>
  556. <phase>package</phase>
  557. <goals>
  558. <goal>single</goal>
  559. </goals>
  560. </execution>
  561. <execution>
  562. <id>build-choco-dir</id>
  563. <phase>package</phase>
  564. <goals>
  565. <goal>single</goal>
  566. </goals>
  567. <configuration>
  568. <attach>false</attach>
  569. <appendAssemblyId>true</appendAssemblyId>
  570. <tarLongFileMode>gnu</tarLongFileMode>
  571. <descriptors>
  572. <descriptor>src/packages/windows-choco.xml</descriptor>
  573. </descriptors>
  574. </configuration>
  575. </execution>
  576. </executions>
  577. </plugin>
  578. <!-- choco package creation -->
  579. <plugin>
  580. <groupId>org.codehaus.mojo</groupId>
  581. <artifactId>exec-maven-plugin</artifactId>
  582. <version>1.2.1</version>
  583. <executions>
  584. <execution>
  585. <id>build-choco-package</id>
  586. <phase>package</phase>
  587. <goals>
  588. <goal>exec</goal>
  589. </goals>
  590. <configuration>
  591. <executable>choco.exe</executable>
  592. <arguments>
  593. <argument>pack</argument>
  594. <argument>--version=${project.version}</argument>
  595. <argument>${basedir}/target/ambari-agent-${project.version}-choco/ambari-agent.nuspec</argument>
  596. </arguments>
  597. <workingDirectory>target/ambari-agent-${project.version}-choco</workingDirectory>
  598. </configuration>
  599. </execution>
  600. </executions>
  601. </plugin>
  602. <!-- end choco package creation -->
  603. </plugins>
  604. </build>
  605. </profile>
  606. <profile>
  607. <id>pluggable-stack-definition</id>
  608. <activation>
  609. <activeByDefault>false</activeByDefault>
  610. <property>
  611. <name>pluggableStackDefinitionConfig</name>
  612. </property>
  613. </activation>
  614. <properties>
  615. <resourceManagementSrcLocation>target/pluggable-stack-definition/python/resource_management</resourceManagementSrcLocation>
  616. <resourcesFolder>target/pluggable-stack-definition</resourcesFolder>
  617. <resourcesSrcLocation>${project.basedir}/../ambari-server/src/main/resources</resourcesSrcLocation>
  618. <pluggableStackDefinitionScriptLocation>${project.basedir}/../ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py</pluggableStackDefinitionScriptLocation>
  619. <pluggableStackDefinitionConfig>${project.basedir}/../ambari-common/src/main/python/pluggable_stack_definition/configs/${stack.distribution}.json</pluggableStackDefinitionConfig>
  620. <pluggableStackDefinitionOutput>target/pluggable-stack-definition</pluggableStackDefinitionOutput>
  621. <customActionsLocation>${pluggableStackDefinitionOutput}/custom_actions</customActionsLocation>
  622. </properties>
  623. <build>
  624. <plugins>
  625. <plugin>
  626. <groupId>org.codehaus.mojo</groupId>
  627. <artifactId>exec-maven-plugin</artifactId>
  628. <version>1.2.1</version>
  629. <executions>
  630. <execution>
  631. <configuration>
  632. <executable>${executable.python}</executable>
  633. <arguments>
  634. <argument>${pluggableStackDefinitionScriptLocation}</argument>
  635. <argument>-c</argument>
  636. <argument>${pluggableStackDefinitionConfig}</argument>
  637. <argument>-r</argument>
  638. <argument>${resourcesSrcLocation}</argument>
  639. <argument>-o</argument>
  640. <argument>${pluggableStackDefinitionOutput}</argument>
  641. </arguments>
  642. </configuration>
  643. <id>pluggable-stack-definition-generate</id>
  644. <phase>generate-resources</phase>
  645. <goals>
  646. <goal>exec</goal>
  647. </goals>
  648. </execution>
  649. </executions>
  650. </plugin>
  651. </plugins>
  652. </build>
  653. </profile>
  654. </profiles>
  655. </project>