promote-pom.xml 18 KB

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