]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Mirrored CBI TPD tool and eclipse collections to simantics.org 45/3945/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 Feb 2020 22:53:16 +0000 (00:53 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 Feb 2020 22:53:16 +0000 (00:53 +0200)
Also added a maven pom for running the tpd to target converter from
command line at releng/org.simantics.sdk.build.targetdefinition/build.

gitlab #486

Change-Id: Ic30c685556797249c28f50936727dccb58484bd9

releng/org.simantics.sdk.build.p2.site/pom.xml
releng/org.simantics.sdk.build.targetdefinition/README.md
releng/org.simantics.sdk.build.targetdefinition/build/.gitignore [new file with mode: 0644]
releng/org.simantics.sdk.build.targetdefinition/build/pom.xml [new file with mode: 0644]
releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.target
releng/org.simantics.sdk.build.targetdefinition/org.simantics.sdk.build.targetdefinition.tpd
releng/org.simantics.sdk.build.targetdefinition/pom.xml
releng/org.simantics.sdk.build.targetdefinition/simantics.target

index 54628d58af4fa491b6764bbb126c6dda2bd9d8a0..9c3e9fae3a333ede4eafb909f564d93d688b9be3 100644 (file)
@@ -34,7 +34,6 @@
         <grpc.version.actual>1.27.2</grpc.version.actual>
         <protobuf.version>3.11.4</protobuf.version>
         <zeroturnaround.version>1.11</zeroturnaround.version>
-        <eclipse.collections.version>10.2.0</eclipse.collections.version>
         <caffeine.version>2.8.1</caffeine.version>
         <influxdb.client.version>1.5.0</influxdb.client.version>
         <supercsv.version>2.4.0</supercsv.version>
                                     <id>it.unimi.dsi:fastutil:${fastutil.version}</id>
                                     <source>true</source>
                                 </artifact>
-                                <artifact>
-                                    <id>org.eclipse.collections:eclipse-collections-api:${eclipse.collections.version}</id>
-                                    <override>true</override>
-                                    <source>true</source>
-                                    <instructions>
-                                        <Export-Package>org.eclipse.collections.*</Export-Package>
-                                    </instructions>
-                                </artifact>
-                                <artifact>
-                                    <id>org.eclipse.collections:eclipse-collections:${eclipse.collections.version}</id>
-                                    <source>true</source>
-                                    <instructions>
-                                        <Require-Bundle>org.eclipse.collections.eclipse-collections-api;bundle-version="${eclipse.collections.version}"</Require-Bundle>
-                                        <Import-Package>!org.eclipse.*,!sun.misc.*,*;resolution:=optional</Import-Package>
-                                    </instructions>
-                                </artifact>
                                 <artifact>
                                     <id>net.sf.trove4j:trove4j:${trove4j.version}</id>
                                     <source>true</source>
index f5b19fd7381fe0d49640efdfebb3c535d38b70ff..4b1730d71e06981d1219cee40409d653e0690a18 100644 (file)
@@ -3,7 +3,9 @@
 Simantics 1.31.0 migrated to Eclipse 4.7 Oxygen platform.\r
 \r
 At the same time [Obeo's Target Platform Definition DSL and Generator tool](https://github.com/mbarbero/fr.obeo.releng.targetplatform)\r
-was taken into use for target platform definition.\r
+was taken into use for target platform definition. Later on the tool was moved to Eclipse\r
+CBI (Common Build Infrastructure) as [Target Platform Definition DSL and Generator](https://github.com/eclipse-cbi/targetplatform-dsl)\r
+which is what we are using right now.\r
 \r
 Please read the detailed installation and basic use instructions from the tool's website.\r
 \r
@@ -47,4 +49,11 @@ This greatly simplifies target definition by removing duplication from the their
 publishing them online per platform branch is also highly useful.\r
 \r
 On the other hand legacy Buckminster builds can source `.target` files from a URL, which is why publishing them online\r
-per platform branch is useful.
\ No newline at end of file
+per platform branch is useful.\r
+\r
+## Building .target files from the command line\r
+\r
+There is an example of how to do this with Maven at [build/pom.xml)(build/pom.xml).\r
+Essentially it sources the TPD tool and its required Eclipse parts from public P2\r
+repositories and uses `tycho-eclipserun-plugin` to run the *tpd converter application*\r
+to convert the `.tpd` file given as argument via `-Dtpd=tpd-path`.\r
diff --git a/releng/org.simantics.sdk.build.targetdefinition/build/.gitignore b/releng/org.simantics.sdk.build.targetdefinition/build/.gitignore
new file mode 100644 (file)
index 0000000..ebfaccf
--- /dev/null
@@ -0,0 +1,2 @@
+target
+workspace
\ No newline at end of file
diff --git a/releng/org.simantics.sdk.build.targetdefinition/build/pom.xml b/releng/org.simantics.sdk.build.targetdefinition/build/pom.xml
new file mode 100644 (file)
index 0000000..cc70d35
--- /dev/null
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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">
+       <modelVersion>4.0.0</modelVersion>
+
+       <groupId>org.simantics</groupId>
+       <artifactId>org.simantics.sdk.build.targetdefinition.build</artifactId>
+       <version>1.0.0-SNAPSHOT</version>
+       <packaging>pom</packaging>
+
+       <properties>
+               <tycho-version>1.5.0</tycho-version>
+               <tycho-extras-version>1.5.0</tycho-extras-version>
+               <platform-version-name>2019-12</platform-version-name>
+               <platform.repository.p2>http://www.simantics.org/update/${platform-version-name}</platform.repository.p2>
+               <targetPlatform.repository.p2>http://www.simantics.org/update/cbi/tpd/3.0.0-SNAPSHOT/</targetPlatform.repository.p2>
+               <targetPlatform.application.name>org.eclipse.cbi.targetplatform.tpd.converter</targetPlatform.application.name>
+               <targetPlatform.application.feature>org.eclipse.cbi.targetplatform-feature</targetPlatform.application.feature>
+               <!--<tpd>../org.simantics.sdk.build.targetdefinition.tpd</tpd>-->
+               <tpd>../simantics.tpd</tpd>
+       </properties>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.eclipse.tycho.extras</groupId>
+                               <artifactId>tycho-eclipserun-plugin</artifactId>
+                               <version>${tycho-extras-version}</version>
+                               <configuration>
+                                       <repositories>
+                                               <repository>
+                                                       <id>${platform-version-name}</id>
+                                                       <layout>p2</layout>
+                                                       <url>${platform.repository.p2}</url>
+                                               </repository>
+                                               <repository>
+                                                       <id>targetplatform</id>
+                                                       <layout>p2</layout>
+                                                       <url>${targetPlatform.repository.p2}</url>
+                                               </repository>
+                                       </repositories>
+                                       <appArgLine>-consoleLog -application ${targetPlatform.application.name} ${tpd}</appArgLine>
+                                       <!-- Set dependencies to launch the application -->
+                                       <dependencies>
+                                               <dependency>
+                                                       <artifactId>${targetPlatform.application.feature}</artifactId>
+                                                       <type>eclipse-feature</type>
+                                               </dependency>
+                                               <dependency>
+                                                       <artifactId>org.eclipse.equinox.p2.sdk</artifactId>
+                                                       <type>eclipse-feature</type>
+                                               </dependency>
+                                       </dependencies>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>eclipse-run</goal>
+                                               </goals>
+                                               <!-- The phase validate rebuild the targetplatform before to compile/test... 
+                                                       @see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html -->
+                                               <phase>validate</phase>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+
+</project>
\ No newline at end of file
index 1c82f03d7ef9a964b8c8fe1e3164198d3a59c95a..2386f897f87729301ee8ed28fa7f1abce889dc51 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Eclipse 2019-12 (4.14)" sequenceNumber="1582892875">
+<target name="Eclipse 2019-12 (4.14)" sequenceNumber="1582928275">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="org.eclipse.collections.feature.feature.group" version="10.1.0.v20200211-1558"/>
       <unit id="org.eclipse.collections.feature.source.feature.group" version="10.1.0.v20200211-1558"/>
-      <repository location="https://download.eclipse.org/collections/10.2.0/repository/"/>
+      <repository location="http://www.simantics.org/update/collections/10.2.0/repository/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="bouncycastle.bcmail-jdk14" version="138.0.0"/>
index cdd287b660bfea6fc26d449ad87cbaefc7cc09bc..8f52a357177b7d319549aeebbad70aea08fb1508 100644 (file)
@@ -168,7 +168,7 @@ location "http://www.simantics.org/update/nebula/releases/2.2.0/incubation/" {
        org.eclipse.nebula.examples.incubation.feature.feature.group
 }
 
-location "https://download.eclipse.org/collections/10.2.0/repository/" {
+location "http://www.simantics.org/update/collections/10.2.0/repository/" {
        org.eclipse.collections.feature.feature.group
        org.eclipse.collections.feature.source.feature.group
 }
index de8c9bb7050a158d537771487eb854dcaa7b0067..dddbfc2ea15cd3b976715f4e9b30263c34e1c44f 100644 (file)
@@ -13,4 +13,4 @@
                <artifactId>org.simantics.root.releng</artifactId>
                <version>1.0.0-SNAPSHOT</version>
        </parent>
-</project> 
\ No newline at end of file
+</project>
\ No newline at end of file
index 1e660204b91cacbd474c1df9d6eef8882ae6c026..f06dc5e4735fae7d1579f9f88080ccd1097c6da1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="Simantics 1.43.0" sequenceNumber="1582895111">
+<target name="Simantics 1.43.0" sequenceNumber="1582927656">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="com.google.guava" version="21.0.0.v20170206-1425"/>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="org.eclipse.collections.feature.feature.group" version="10.1.0.v20200211-1558"/>
       <unit id="org.eclipse.collections.feature.source.feature.group" version="10.1.0.v20200211-1558"/>
-      <repository location="https://download.eclipse.org/collections/10.2.0/repository/"/>
+      <repository location="http://www.simantics.org/update/collections/10.2.0/repository/"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="true" includeSource="true" includeConfigurePhase="false" type="InstallableUnit">
       <unit id="bouncycastle.bcmail-jdk14" version="138.0.0"/>