promote-pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  4. xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>org.yakindu.sct</groupId>
  8. <artifactId>org.yakindu.sct.releng</artifactId>
  9. <version>2.1.0-SNAPSHOT</version>
  10. <relativePath>../org.yakindu.sct.releng/pom.xml</relativePath>
  11. </parent>
  12. <artifactId>org.yakindu.sct.releng.promote</artifactId>
  13. <packaging>eclipse-repository</packaging>
  14. <!-- Search for 'target architecture' to find places where the architecture for distros is set -->
  15. <properties>
  16. <!-- scp settings for publishing udpdate site -->
  17. <promotionTarget>indigo/integration</promotionTarget>
  18. <promotionSource>http://builds.itemis.de/urlToCIJob/lastSuccessfulBuild</promotionSource>
  19. <updateSiteUrl>http://updates.yakindu.com/${promotionTarget}</updateSiteUrl>
  20. <local.update.site>${project.build.directory}/local-update-site</local.update.site>
  21. <tycho.extras.version>0.14.0</tycho.extras.version>
  22. <eclipse.mirror.url>http://mirror.netcologne.de/eclipse</eclipse.mirror.url>
  23. <distro.dir>${project.build.directory}/distro</distro.dir>
  24. <distro.work.dir>${distro.dir}/work</distro.work.dir>
  25. <profile>epp.package.modeling</profile>
  26. <features>org.eclipse.xtext.sdk.feature.group,org.eclipse.xtend.sdk.feature.group,org.yakindu.sct.sdk.feature.group,org.eclipse.gmf.runtime.emf.clipboard.core.patch.feature.group</features>
  27. <update.sites>${p2.target.repository},file:${local.update.site},${updateSiteUrl}</update.sites>
  28. </properties>
  29. <build>
  30. <plugins>
  31. <plugin>
  32. <groupId>org.eclipse.tycho.extras</groupId>
  33. <artifactId>tycho-p2-extras-plugin</artifactId>
  34. <version>${tycho.extras.version}</version>
  35. <inherited>false</inherited>
  36. <executions>
  37. <execution>
  38. <id>appendYakinduBase</id>
  39. <phase>package</phase>
  40. <goals>
  41. <goal>mirror</goal>
  42. </goals>
  43. <configuration>
  44. <source>
  45. <!-- source repositori(es) to mirror from -->
  46. <repository>
  47. <url>${promotionSource}artifact/update-site/</url>
  48. <layout>p2</layout>
  49. <!-- sypported layouts are "p2-metadata", "p2-artifacts", and "p2"
  50. (for joint repositories) -->
  51. </repository>
  52. </source>
  53. <destination>${local.update.site}</destination>
  54. <compress>true</compress>
  55. <append>true</append>
  56. </configuration>
  57. </execution>
  58. </executions>
  59. </plugin>
  60. <!-- for package of eclipse product creation -->
  61. <plugin>
  62. <artifactId>maven-antrun-plugin</artifactId>
  63. <version>1.1</version>
  64. <executions>
  65. <execution>
  66. <id>download.distro</id>
  67. <phase>prepare-package</phase>
  68. <configuration>
  69. <tasks>
  70. <taskdef resource="net/sf/antcontrib/antlib.xml"
  71. classpathref="maven.plugin.classpath" />
  72. <property name="download.distro.src"
  73. value="${eclipse.mirror.url}/technology/epp/downloads/release/juno/SR1" />
  74. <property name="download.distro.dir"
  75. value="${project.build.directory}/distro/download" />
  76. <!-- 'target architecture' for distros -->
  77. <for list="macosx-cocoa-x86_64;win32-win32-x86;win32-win32-x86_64;linux-gtk-x86;linux-gtk-x86_64"
  78. param="environment" delimiter=";" parallel="false">
  79. <sequential>
  80. <propertyregex property="distro.os" input="@{environment}"
  81. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\1"
  82. casesensitive="false" />
  83. <propertyregex property="distro.ws" input="@{environment}"
  84. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\2"
  85. casesensitive="false" />
  86. <propertyregex property="distro.arch" input="@{environment}"
  87. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\3"
  88. casesensitive="false" />
  89. <echo>distro.os ${distro.os} </echo>
  90. <echo>distro.ws ${distro.ws} </echo>
  91. <echo>distro.arch ${distro.arch} </echo>
  92. <!-- naming is platform specific, so we have to make a distinction
  93. here (as we only have two platforms, we do not have to make any other distinctions
  94. so far) -->
  95. <if>
  96. <and>
  97. <equals arg1="${distro.os}" arg2="win32" />
  98. <equals arg1="${distro.ws}" arg2="win32" />
  99. <equals arg1="${distro.arch}" arg2="x86" />
  100. </and>
  101. <then>
  102. <propertyregex property="distro.src.filename"
  103. input="eclipse-modeling-juno-SR1-win32.zip" override="true"
  104. regexp="(.*)" select="\1" casesensitive="false" />
  105. </then>
  106. </if>
  107. <if>
  108. <and>
  109. <equals arg1="${distro.os}" arg2="win32" />
  110. <equals arg1="${distro.ws}" arg2="win32" />
  111. <equals arg1="${distro.arch}" arg2="x86_64" />
  112. </and>
  113. <then>
  114. <propertyregex property="distro.src.filename"
  115. input="eclipse-modeling-juno-SR1-win32-x86_64.zip"
  116. override="true" regexp="(.*)" select="\1" casesensitive="false" />
  117. </then>
  118. </if>
  119. <if>
  120. <and>
  121. <equals arg1="${distro.os}" arg2="linux" />
  122. <equals arg1="${distro.ws}" arg2="gtk" />
  123. <equals arg1="${distro.arch}" arg2="x86_64" />
  124. </and>
  125. <then>
  126. <propertyregex property="distro.src.filename"
  127. input="eclipse-modeling-juno-SR1-linux-gtk-x86_64.tar.gz"
  128. override="true" regexp="(.*)" select="\1" casesensitive="false" />
  129. </then>
  130. </if>
  131. <if>
  132. <and>
  133. <equals arg1="${distro.os}" arg2="linux" />
  134. <equals arg1="${distro.ws}" arg2="gtk" />
  135. <equals arg1="${distro.arch}" arg2="x86" />
  136. </and>
  137. <then>
  138. <propertyregex property="distro.src.filename"
  139. input="eclipse-modeling-juno-SR1-linux-gtk.tar.gz"
  140. override="true" regexp="(.*)" select="\1" casesensitive="false" />
  141. </then>
  142. </if>
  143. <if>
  144. <and>
  145. <equals arg1="${distro.os}" arg2="macosx" />
  146. <equals arg1="${distro.ws}" arg2="cocoa" />
  147. <equals arg1="${distro.arch}" arg2="x86_64" />
  148. </and>
  149. <then>
  150. <propertyregex property="distro.src.filename"
  151. input="eclipse-modeling-juno-SR1-macosx-cocoa-x86_64.tar.gz"
  152. override="true" regexp="(.*)" select="\1" casesensitive="false" />
  153. </then>
  154. </if>
  155. <if>
  156. <not>
  157. <available file="${download.distro.dir}" type="dir" />
  158. </not>
  159. <then>
  160. <echo>mkdir ${download.distro.dir}</echo>
  161. <mkdir dir="${download.distro.dir}" />
  162. </then>
  163. </if>
  164. <if>
  165. <not>
  166. <available file="${download.distro.dir}/${distro.src.filename}" />
  167. </not>
  168. <then>
  169. <trycatch>
  170. <try>
  171. <get src="${download.distro.src}/${distro.src.filename}"
  172. dest="${download.distro.dir}/${distro.src.filename}" />
  173. </try>
  174. <catch>
  175. <echo>delete ${download.distro.dir}</echo>
  176. <delete file="${download.distro.dir}/${distro.src.filename}" />
  177. </catch>
  178. </trycatch>
  179. </then>
  180. </if>
  181. <if>
  182. <available file="${distro.work.dir}/@{environment}"
  183. type="dir" />
  184. <then>
  185. <delete dir="${distro.work.dir}/@{environment}" />
  186. </then>
  187. </if>
  188. <mkdir dir="${distro.work.dir}/@{environment}" />
  189. <if>
  190. <or>
  191. <equals arg1="${distro.os}" arg2="win32" />
  192. </or>
  193. <then>
  194. <unzip src="${download.distro.dir}/${distro.src.filename}"
  195. dest="${distro.work.dir}/@{environment}/" />
  196. </then>
  197. <else>
  198. <exec dir="${distro.work.dir}/@{environment}"
  199. executable="tar">
  200. <arg line="-xzf ${download.distro.dir}/${distro.src.filename}" />
  201. </exec>
  202. </else>
  203. </if>
  204. </sequential>
  205. </for>
  206. </tasks>
  207. </configuration>
  208. <goals>
  209. <goal>run</goal>
  210. </goals>
  211. </execution>
  212. <execution>
  213. <id>repackage.distro</id>
  214. <phase>verify</phase>
  215. <goals>
  216. <goal>run</goal>
  217. </goals>
  218. <configuration>
  219. <tasks>
  220. <taskdef resource="net/sf/antcontrib/antlib.xml"
  221. classpathref="maven.plugin.classpath" />
  222. <!-- 'target architecture' for distros -->
  223. <for list="macosx-cocoa-x86_64;win32-win32-x86;win32-win32-x86_64;linux-gtk-x86;linux-gtk-x86_64"
  224. param="environment" delimiter=";" parallel="false">
  225. <sequential>
  226. <propertyregex property="distro.os" input="@{environment}"
  227. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\1"
  228. casesensitive="false" />
  229. <propertyregex property="distro.ws" input="@{environment}"
  230. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\2"
  231. casesensitive="false" />
  232. <propertyregex property="distro.arch" input="@{environment}"
  233. override="true" regexp="([^,]*)-([^\,]*)-([^\,]*)" select="\3"
  234. casesensitive="false" />
  235. <echo>mkdir ${distro.dir} for
  236. yakindu-sct-juno-SR1-${distro.os}-${distro.ws}-${distro.arch}.zip</echo>
  237. <mkdir dir="${distro.dir}" />
  238. <if>
  239. <or>
  240. <equals arg1="${distro.os}" arg2="win32" />
  241. </or>
  242. <then>
  243. <exec dir="${distro.work.dir}/@{environment}"
  244. executable="zip">
  245. <arg
  246. line="-q -r ${distro.dir}/yakindu-sct-juno-SR1-${distro.os}-${distro.ws}-${distro.arch}.zip eclipse" />
  247. </exec>
  248. </then>
  249. <else>
  250. <exec dir="${distro.work.dir}/@{environment}"
  251. executable="tar">
  252. <arg
  253. line="-czf ${distro.dir}/yakindu-sct-juno-SR1-${distro.os}-${distro.ws}-${distro.arch}.tar.gz eclipse" />
  254. </exec>
  255. </else>
  256. </if>
  257. </sequential>
  258. </for>
  259. </tasks>
  260. </configuration>
  261. </execution>
  262. </executions>
  263. <dependencies>
  264. <dependency>
  265. <groupId>ant-contrib</groupId>
  266. <artifactId>ant-contrib</artifactId>
  267. <version>1.0b3</version>
  268. <exclusions>
  269. <exclusion>
  270. <groupId>ant</groupId>
  271. <artifactId>ant</artifactId>
  272. </exclusion>
  273. </exclusions>
  274. </dependency>
  275. <dependency>
  276. <groupId>ant</groupId>
  277. <artifactId>ant-nodeps</artifactId>
  278. <version>1.6.5</version>
  279. </dependency>
  280. </dependencies>
  281. </plugin>
  282. <plugin>
  283. <groupId>org.eclipse.tycho.extras</groupId>
  284. <artifactId>tycho-eclipserun-plugin</artifactId>
  285. <version>${tycho-extras-version}</version>
  286. <executions>
  287. <!-- Add execution per 'target architecture' -->
  288. <execution>
  289. <id>install-features-into-distro-macosx-cocoa-x86_64</id>
  290. <phase>package</phase>
  291. <goals>
  292. <goal>eclipse-run</goal>
  293. </goals>
  294. <configuration>
  295. <appArgLine>-consoleLog -clean -nosplash -debug \
  296. -application org.eclipse.equinox.p2.director -destination \
  297. ${distro.work.dir}/macosx-cocoa-x86_64/eclipse/ -profile \
  298. ${profile} -p2.os macosx -p2.ws cocoa -p2.arch x86_64 \
  299. -repository ${update.sites} -installIUs ${features}
  300. </appArgLine>
  301. </configuration>
  302. </execution>
  303. <execution>
  304. <id>install-features-into-distro-win32-win-32-x86</id>
  305. <phase>package</phase>
  306. <goals>
  307. <goal>eclipse-run</goal>
  308. </goals>
  309. <configuration>
  310. <appArgLine>-consoleLog -clean -nosplash -debug \
  311. -application org.eclipse.equinox.p2.director -destination \
  312. ${distro.work.dir}/win32-win32-x86/eclipse/ -profile ${profile} \
  313. -p2.os win32 -p2.ws win32 -p2.arch x86 -repository \
  314. ${update.sites} -installIUs ${features}
  315. </appArgLine>
  316. </configuration>
  317. </execution>
  318. <execution>
  319. <id>install-features-into-distro-win32-win-32-x86_64</id>
  320. <phase>package</phase>
  321. <goals>
  322. <goal>eclipse-run</goal>
  323. </goals>
  324. <configuration>
  325. <appArgLine>-consoleLog -clean -nosplash -debug \
  326. -application org.eclipse.equinox.p2.director -destination \
  327. ${distro.work.dir}/win32-win32-x86_64/eclipse/ -profile \
  328. ${profile} -p2.os win32 -p2.ws win32 -p2.arch x86_64 -repository \
  329. ${update.sites} -installIUs ${features}
  330. </appArgLine>
  331. </configuration>
  332. </execution>
  333. <execution>
  334. <id>install-features-into-distro-linux-gtk-x86</id>
  335. <phase>package</phase>
  336. <goals>
  337. <goal>eclipse-run</goal>
  338. </goals>
  339. <configuration>
  340. <appArgLine>-consoleLog -clean -nosplash -debug \
  341. -application org.eclipse.equinox.p2.director -destination \
  342. ${distro.work.dir}/linux-gtk-x86/eclipse/ -profile \
  343. ${profile} -p2.os linux -p2.ws gtk -p2.arch x86 \
  344. -repository ${update.sites} -installIUs ${features}
  345. </appArgLine>
  346. </configuration>
  347. </execution>
  348. <execution>
  349. <id>install-features-into-distro-linux-gtk-x86_64</id>
  350. <phase>package</phase>
  351. <goals>
  352. <goal>eclipse-run</goal>
  353. </goals>
  354. <configuration>
  355. <appArgLine>-consoleLog -clean -nosplash -debug \
  356. -application org.eclipse.equinox.p2.director -destination \
  357. ${distro.work.dir}/linux-gtk-x86_64/eclipse/ -profile \
  358. ${profile} -p2.os linux -p2.ws gtk -p2.arch x86_64 \
  359. -repository ${update.sites} -installIUs ${features}
  360. </appArgLine>
  361. </configuration>
  362. </execution>
  363. </executions>
  364. </plugin>
  365. </plugins>
  366. <pluginManagement>
  367. <plugins>
  368. <plugin>
  369. <groupId>org.eclipse.tycho.extras</groupId>
  370. <artifactId>tycho-eclipserun-plugin</artifactId>
  371. <version>${tycho-extras-version}</version>
  372. <configuration>
  373. <argLine>-Declipse.p2.mirrors=false</argLine>
  374. <dependencies>
  375. <dependency>
  376. <artifactId>org.eclipse.equinox.p2.transport.ecf</artifactId>
  377. <type>eclipse-plugin</type>
  378. </dependency>
  379. <dependency>
  380. <artifactId>org.eclipse.equinox.p2.repository</artifactId>
  381. <type>eclipse-plugin</type>
  382. </dependency>
  383. <dependency>
  384. <artifactId>org.eclipse.equinox.p2.touchpoint.natives</artifactId>
  385. <type>eclipse-plugin</type>
  386. </dependency>
  387. <dependency>
  388. <artifactId>org.eclipse.equinox.p2.touchpoint.eclipse</artifactId>
  389. <type>eclipse-plugin</type>
  390. </dependency>
  391. <dependency>
  392. <artifactId>org.eclipse.equinox.p2.artifact.repository
  393. </artifactId>
  394. <type>eclipse-plugin</type>
  395. </dependency>
  396. <dependency>
  397. <artifactId>org.eclipse.equinox.p2.director.app</artifactId>
  398. <type>eclipse-plugin</type>
  399. </dependency>
  400. <dependency>
  401. <artifactId>org.eclipse.equinox.ds</artifactId>
  402. <type>eclipse-plugin</type>
  403. </dependency>
  404. </dependencies>
  405. </configuration>
  406. </plugin>
  407. </plugins>
  408. </pluginManagement>
  409. </build>
  410. <profiles>
  411. <profile>
  412. <!-- This profile is activated by default, if the remote repository should
  413. be extended. -->
  414. <!-- Deactivate if no remote repository should be copied to append artifacts -->
  415. <id>CopySource</id>
  416. <activation>
  417. <property>
  418. <name>appendToExistingRepository</name>
  419. <value>!false</value>
  420. </property>
  421. </activation>
  422. <build>
  423. <plugins>
  424. <plugin>
  425. <groupId>org.eclipse.tycho.extras</groupId>
  426. <artifactId>tycho-p2-extras-plugin</artifactId>
  427. <version>${tycho.extras.version}</version>
  428. <inherited>false</inherited>
  429. <executions>
  430. <execution>
  431. <id>copyRemoteSite</id>
  432. <phase>prepare-package</phase>
  433. <goals>
  434. <goal>mirror</goal>
  435. </goals>
  436. <configuration>
  437. <source>
  438. <!-- source repositori(es) to mirror from -->
  439. <repository>
  440. <url>${updateSiteUrl}</url>
  441. <layout>p2</layout>
  442. <!-- sypported layouts are "p2-metadata", "p2-artifacts", and
  443. "p2" (for joint repositories) -->
  444. </repository>
  445. </source>
  446. <destination>${local.update.site}</destination>
  447. <compress>true</compress>
  448. <append>false</append>
  449. </configuration>
  450. </execution>
  451. </executions>
  452. </plugin>
  453. </plugins>
  454. </build>
  455. </profile>
  456. </profiles>
  457. </project>