Skip to content

Commit 26e9453

Browse files
author
Dennis Labordus
committed
Refactor build proces to use Maven Central for RiseClipse dependencies.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 8e93251 commit 26e9453

File tree

9 files changed

+226
-27
lines changed

9 files changed

+226
-27
lines changed

.gitmodules

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
# Remark: the option to ignore 'untracked' files is needed, because the submodules don't contain a file '.gitignore'.
77
# This cause the target directories to be untracked.
88
#
9-
[submodule "riseclipse/riseclipse-developer"]
10-
path = riseclipse/riseclipse-developer
11-
url = [email protected]:riseclipse/riseclipse-developer.git
12-
ignore = dirty
13-
[submodule "riseclipse/riseclipse-main"]
14-
path = riseclipse/riseclipse-main
15-
url = [email protected]:riseclipse/riseclipse-main.git
16-
ignore = dirty
17-
[submodule "riseclipse/riseclipse-metamodel-scl2003"]
18-
path = riseclipse/riseclipse-metamodel-scl2003
19-
url = [email protected]:riseclipse/riseclipse-metamodel-scl2003.git
20-
ignore = dirty
219
[submodule "riseclipse/riseclipse-ocl-constraints-scl2003"]
2210
path = riseclipse/riseclipse-ocl-constraints-scl2003
2311
url = [email protected]:riseclipse/riseclipse-ocl-constraints-scl2003.git

riseclipse/pom.xml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ SPDX-License-Identifier: Apache-2.0
1818
<packaging>pom</packaging>
1919

2020
<modules>
21-
<module>riseclipse-developer</module>
22-
<module>riseclipse-main</module>
23-
<module>riseclipse-metamodel-scl2003</module>
21+
<module>riseclipse-p2-to-m2</module>
2422
<module>validator-riseclipse</module>
2523
</modules>
2624

@@ -30,26 +28,30 @@ SPDX-License-Identifier: Apache-2.0
3028
<eclipse.emf.common.version>2.24.0</eclipse.emf.common.version>
3129
<eclipse.ocl.version>1.17.0</eclipse.ocl.version>
3230
<antlr.runtime.version>3.2.0</antlr.runtime.version>
33-
<riseclipse.version>1.1.0-SNAPSHOT</riseclipse.version>
31+
<riseclipse.scl.version>1.2.3</riseclipse.scl.version>
32+
<riseclipse.main.version>1.2.5</riseclipse.main.version>
3433

35-
<riseclipse.developer.root>${project.basedir}/riseclipse-developer</riseclipse.developer.root>
34+
<riseclipse.p2.root>${project.basedir}/riseclipse-p2-to-m2</riseclipse.p2.root>
3635
</properties>
3736

3837
<repositories>
3938
<repository>
4039
<id>local-eclipse-p2-mirror</id>
41-
<url>
42-
file:///${riseclipse.developer.root}/fr.centralesupelec.edf.riseclipse.developer.p2_to_m2/target/maven/repository/final
43-
</url>
40+
<url>file:///${riseclipse.p2.root}/target/maven/repository/final</url>
4441
</repository>
4542
</repositories>
4643

4744
<dependencyManagement>
4845
<dependencies>
4946
<dependency>
50-
<groupId>fr.centralesupelec.edf.riseclipse</groupId>
47+
<groupId>io.github.riseclipse</groupId>
5148
<artifactId>fr.centralesupelec.edf.riseclipse.iec61850.scl</artifactId>
52-
<version>${riseclipse.version}</version>
49+
<version>${riseclipse.scl.version}</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>io.github.riseclipse</groupId>
53+
<artifactId>fr.centralesupelec.edf.riseclipse.main</artifactId>
54+
<version>${riseclipse.main.version}</version>
5355
</dependency>
5456

5557
<dependency>

riseclipse/riseclipse-developer

Lines changed: 0 additions & 1 deletion
This file was deleted.

riseclipse/riseclipse-main

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Copyright (c) 2021 CentraleSupélec & EDF.
2+
3+
This program is free software:
4+
5+
> you can redistribute it and/or modify it under the terms of the GNU Lesser
6+
General Public License as published by the Free Software Foundation, either
7+
version 3 of the License, or (at your option) any later version. This program
8+
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10+
PURPOSE. See the GNU General Lesser Public License for more details. You
11+
should have received a copy of the GNU General Lesser Public License along
12+
with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
13+
14+
This file is part of the RiseClipse tool.
15+
16+
### Contributors:
17+
* Computer Science Department, CentraleSupélec
18+
* EDF R&D
19+
### Contacts:
20+
21+
22+
### Web site:
23+
* <https://riseclipse.github.io>
24+
25+
****
26+
27+
This project is used to create maven artifacts from Eclipse plugins. This is needed
28+
for building fat jars which run outside Eclipse.
29+
30+
31+
This project is based on work by German Vega [(see this message)](https://www.eclipse.org/forums/index.php?t=msg&th=1097672&goto=1826425&#msg_1826425).
32+
33+
The following is an extract of the `pom.xml` file present in the archive :
34+
>This file is part of VASCO Model Transformation - Platform Eclipse Modeling Framework 4.15 Maven repository
35+
36+
>Please visit http://vasco.imag.fr for further information
37+
38+
>Authors : German Vega , Yves ledru , Akram Idani
39+
40+
>> Laboratoire d'Informatique de Grenoble, Team VASCO
41+
42+
> Copyright (C) 2016 - 2020 University of Grenoble Alpes
43+
44+
> This program is free software:
45+
46+
> you can redistribute it and/or modify it under the terms of the GNU Lesser
47+
General Public License as published by the Free Software Foundation, either
48+
version 3 of the License, or (at your option) any later version. This program
49+
is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
50+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
51+
PURPOSE. See the GNU General Lesser Public License for more details. You
52+
should have received a copy of the GNU General Lesser Public License along
53+
with this program. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
54+
55+
****
56+
57+
The `src/main/resources/riseclipse.aggr` file should be edited with the
58+
[CBI/aggregator](https://wiki.eclipse.org/CBI/aggregator) tool.
59+
60+
Changes in this file should usually also be done in the target platform
61+
(project `fr.centralesupelec.edf.riseclipse.developer.eclipse`).
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
5+
http://maven.apache.org/xsd/maven-4.0.0.xsd">
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>org.lfenergy.compas.scl.validator</groupId>
9+
<artifactId>riseclipse</artifactId>
10+
<version>local-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>riseclipse-p2-to-m2</artifactId>
14+
<packaging>pom</packaging>
15+
16+
<description>
17+
This project generates a maven repository for needed Eclipse plug-ins not available on
18+
maven-central (EMF, OCL…). It enables maven build of fat jars which use such Eclipse plug-ins.
19+
</description>
20+
21+
<build>
22+
<plugins>
23+
<!-- Create aggregated maven repository -->
24+
<plugin>
25+
<groupId>org.eclipse.tycho.extras</groupId>
26+
<artifactId>tycho-eclipserun-plugin</artifactId>
27+
<version>2.7.0</version>
28+
<configuration>
29+
<work>${project.build.directory}/maven/tmp/cbi</work>
30+
31+
<repositories>
32+
<repository>
33+
<!-- This is the platform used to run the aggregator, not the one where artifacts are fetched -->
34+
<id>Eclipse platform</id>
35+
<layout>p2</layout>
36+
<url>http://download.eclipse.org/releases/2020-06/</url>
37+
</repository>
38+
<repository>
39+
<id>CBI aggregator</id>
40+
<layout>p2</layout>
41+
<url>https://download.eclipse.org/cbi/updates/aggregator/headless/4.13/I20200825-1209</url>
42+
</repository>
43+
</repositories>
44+
45+
<jvmArgs>
46+
<args>-Declipse.p2.mirrors=false</args>
47+
</jvmArgs>
48+
<applicationsArgs>
49+
<args>-data</args>
50+
<args>${project.build.directory}/maven/tmp/workspace</args>
51+
<args>-application</args>
52+
<args>org.eclipse.cbi.p2repo.cli.headless</args>
53+
<args>aggregate</args>
54+
<args>--buildRoot</args>
55+
<args>target/maven/repository</args>
56+
<args>--buildModel</args>
57+
<args>src/main/resources/riseclipse.aggr</args>
58+
<args>--action</args>
59+
<args>BUILD</args>
60+
</applicationsArgs>
61+
62+
<dependencies>
63+
<dependency>
64+
<artifactId>org.eclipse.equinox.p2.sdk</artifactId>
65+
<type>eclipse-feature</type>
66+
</dependency>
67+
<dependency>
68+
<artifactId>org.eclipse.cbi.p2repo.aggregator.engine.feature</artifactId>
69+
<type>eclipse-feature</type>
70+
</dependency>
71+
<dependency>
72+
<artifactId>org.eclipse.cbi.p2repo.p2.maven.indexer.feature</artifactId>
73+
<type>eclipse-feature</type>
74+
</dependency>
75+
</dependencies>
76+
</configuration>
77+
78+
<executions>
79+
<execution>
80+
<id>aggregate-maven-repository</id>
81+
<goals>
82+
<goal>eclipse-run</goal>
83+
</goals>
84+
<phase>generate-resources</phase>
85+
</execution>
86+
</executions>
87+
</plugin>
88+
</plugins>
89+
</build>
90+
</project>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<aggregator:Aggregation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:aggregator="http://www.eclipse.org/cbi/p2repo/2011/aggregator/1.1.0" label="Eclipse Projects for RiseClipse" packedStrategy="UNPACK" mavenResult="true" versionFormat="MavenRelease">
3+
<validationSets label="Eclipse needed projects for RiseClipse">
4+
<contributions label="Eclipse Platform 2021-12">
5+
<repositories location="https://download.eclipse.org/releases/2021-12/202112081000/">
6+
<bundles name="org.eclipse.core.commands" versionRange="3.10.100"/>
7+
<bundles name="org.eclipse.core.contenttype" versionRange="3.8.100"/>
8+
<bundles name="org.eclipse.core.jobs" versionRange="3.12.0"/>
9+
<bundles name="org.eclipse.core.resources" versionRange="3.16.0"/>
10+
<bundles name="org.eclipse.core.runtime" versionRange="3.24.0"/>
11+
<bundles name="org.eclipse.equinox.app" versionRange="1.6.100"/>
12+
<bundles name="org.eclipse.equinox.common" versionRange="3.15.100"/>
13+
<bundles name="org.eclipse.equinox.preferences" versionRange="3.9.100"/>
14+
<bundles name="org.eclipse.equinox.registry" versionRange="3.11.100"/>
15+
<bundles name="org.eclipse.jdt.annotation" versionRange="2.2.600"/>
16+
<bundles name="org.eclipse.osgi.compatibility.state" versionRange="1.2.500"/>
17+
<bundles name="org.eclipse.osgi" versionRange="3.17.100"/>
18+
</repositories>
19+
</contributions>
20+
<contributions label="EMF 2.28">
21+
<repositories location="https://download.eclipse.org/releases/2021-12/202112081000/">
22+
<bundles name="org.eclipse.emf.common" versionRange="2.23.0"/>
23+
<bundles name="org.eclipse.emf.ecore" versionRange="2.25.0"/>
24+
<bundles name="org.eclipse.emf.ecore.change" versionRange="2.14.0"/>
25+
<bundles name="org.eclipse.emf.ecore.xmi" versionRange="2.16.0"/>
26+
<bundles name="org.eclipse.emf.edit" versionRange="2.16.0"/>
27+
</repositories>
28+
</contributions>
29+
<contributions label="OCL 6.17.0">
30+
<repositories location="https://download.eclipse.org/releases/2021-12/202112081000/">
31+
<bundles name="org.eclipse.ocl.common" versionRange="1.17.0"/>
32+
<bundles name="org.eclipse.ocl.pivot" versionRange="1.17.0"/>
33+
<bundles name="org.eclipse.ocl.xtext.base" versionRange="1.17.0"/>
34+
<bundles name="org.eclipse.ocl.xtext.completeocl" versionRange="1.17.0"/>
35+
<bundles name="org.eclipse.ocl.xtext.essentialocl" versionRange="1.17.0"/>
36+
<bundles name="org.eclipse.ocl.xtext.oclinecore" versionRange="1.17.0"/>
37+
<bundles name="org.eclipse.ocl.xtext.oclstdlib" versionRange="1.17.0"/>
38+
<bundles name="org.eclipse.xtext" versionRange="2.25.0"/>
39+
</repositories>
40+
</contributions>
41+
<contributions label="From Orbit">
42+
<repositories location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211213173813/repository">
43+
<bundles name="com.google.guava" versionRange="30.1.0"/>
44+
<bundles name="com.google.inject" versionRange="5.0.1"/>
45+
<bundles name="javax.inject" versionRange="1.0.0"/>
46+
<bundles name="org.antlr.runtime" versionRange="[3.2.0,3.3.0)"/>
47+
<bundles name="org.apache.commons.lang3" versionRange="3.1.0"/>
48+
<bundles name="org.apache.log4j" versionRange="1.2.15"/>
49+
</repositories>
50+
</contributions>
51+
<validationRepositories location="https://download.eclipse.org/releases/2021-12/202112081000/"/>
52+
<validationRepositories location="https://download.eclipse.org/tools/orbit/downloads/drops/R20211213173813/repository"/>
53+
</validationSets>
54+
<configurations architecture="x86_64"/>
55+
<configurations operatingSystem="linux" windowSystem="gtk" architecture="x86_64"/>
56+
<configurations operatingSystem="macosx" windowSystem="cocoa" architecture="x86_64"/>
57+
</aggregator:Aggregation>

riseclipse/validator-riseclipse/pom.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SPDX-License-Identifier: Apache-2.0
1818
<packaging>jar</packaging>
1919

2020
<properties>
21-
<riseclipse.developer.root>${project.basedir}/../riseclipse-developer</riseclipse.developer.root>
21+
<riseclipse.p2.root>${project.basedir}/../riseclipse-p2-to-m2</riseclipse.p2.root>
2222
</properties>
2323

2424
<dependencies>
@@ -28,9 +28,13 @@ SPDX-License-Identifier: Apache-2.0
2828
</dependency>
2929

3030
<dependency>
31-
<groupId>fr.centralesupelec.edf.riseclipse</groupId>
31+
<groupId>io.github.riseclipse</groupId>
3232
<artifactId>fr.centralesupelec.edf.riseclipse.iec61850.scl</artifactId>
3333
</dependency>
34+
<dependency>
35+
<groupId>io.github.riseclipse</groupId>
36+
<artifactId>fr.centralesupelec.edf.riseclipse.main</artifactId>
37+
</dependency>
3438

3539
<dependency>
3640
<groupId>org.eclipse.core</groupId>

0 commit comments

Comments
 (0)