Skip to content

Commit f311686

Browse files
author
Dennis Labordus
committed
Updated/Added documentation and update of aggregate file.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 5a222b3 commit f311686

File tree

5 files changed

+45
-37
lines changed

5 files changed

+45
-37
lines changed

DEVELOPMENT.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ SPDX-License-Identifier: Apache-2.0
88

99
## Git
1010

11-
If the project is already cloned and a submodule is added use the following commands, first `git submodule init` and
12-
next `git submodule update`.
11+
If the project is already cloned and a submodule is added use the following commands to retrieve the files from the
12+
RiseClipse Repository, first `git submodule init` and next `git submodule update`.
1313

1414
More about Git Submodules can be found [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
1515

1616
**Remark**: The URLs to the submodules are configured in the file `.gitmodules`, but these are using the SSH URLs. There
1717
is a way described [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules) that the URL can be overwritten locally
18-
with an HTTPS URL of the GIT Repository. Because of the subdirectory where the submodules are in, this doesn't work
19-
exactly that way. Use the following commands to update the URLs locally to HTTPS.
18+
with an HTTPS URL of the GIT Repository.
19+
20+
Because of the subdirectory where the submodules are in, this doesn't work exactly that way. Use the following commands
21+
to update the URLs locally to HTTPS.
2022

2123
```
2224
git config submodule.riseclipse/riseclipse-developer.url https://github.com/riseclipse/riseclipse-developer.git
@@ -28,31 +30,28 @@ git submodule init
2830
git submodule update
2931
```
3032

31-
## IntelliJ
33+
### Git update Submodules
34+
35+
A submodule in Git is fixed to a specific commit of the remote repository. To update the reference to the latest commit
36+
in the remote repository execute the following command from the root directory of the project.
3237

33-
Importing the project is a bit harder for the SCL Validator then normal. It's caused because of the submodules that are
34-
needed from RiseClipse. These projects are Eclipse projects using Eclipse Tycho to build and Eclipse project structure.
38+
```
39+
git submodule update --remote
40+
```
3541

36-
The first step to make it work in IntelliJ is that an Eclipse version needs to be available on your local machine. The
37-
version we know that's working can be found [here](https://www.eclipse.org/downloads/packages/release/2019-06/r)
38-
Download (and install/unzip) Eclipse.
42+
Next add the changes and commit/push these to the Git Repository of CoMPAS. The build now uses the latest commit of the
43+
main branch.
3944

40-
Next a way to make everything work in IntelliJ is importing the project in the following way.
45+
## Eclipse
4146

42-
- First step is to just import everything like it are Maven projects;
43-
- Next we need to add a Global Library in IntelliJ. Open the Module Settings and select "Global Libraries". And a new
44-
libraries and name it "ECLIPSE". Point it to the directory "<ECLIPSE_INSTALL_DIR>/plugins";
45-
- Next step is to re-import the RiseClipse Submodule as Eclipse;
46-
- In IntelliJ select "File" -> "New" -> "Module from Existing Sources...";
47-
- Select one of the RiseClipse Submodules, for instance "riseclipse-metamodel-scl2003";
48-
- Next select "Eclipse" by "Import module from External Model";
49-
- Follow the rest of the wizard, only to remember to select all subprojects that are available in the directory;
47+
### Eclipse Dependencies
5048

51-
Now the module should be correctly imported in IntelliJ to be used. Check the Module Settings of one of the subprojects
52-
to check if the directory "src" is a Java Source Directory, for instance the module
53-
"riseclipse/riseclipse-metamodel-scl2003/fr.centralesupelec.edf.riseclipse.iec61850.scl.utilities".
49+
To make everything build and run Eclipse Dependencies are needed, but unlike the RiseClipse Dependencies these can't be
50+
found in the Maven Central Repository, but in an Eclipse P2 Repository. In RiseClipse there is a p2-to-m2 project that
51+
creates a local Maven Repository from the needed dependencies from the Eclipse P2 Repository. A CoMPAS Version of this
52+
maven module is created here, see [README.md](riseclipse/riseclipse-p2-to-m2/README.md) for more info.
5453

55-
## Eclipse
54+
### Eclipse OCL
5655

5756
Example about how to use Eclipse OCL was found
5857
[here](https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FPivotStandalone.html).

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,20 @@ automatically determine the URL to be used.
2828

2929
## Development
3030

31-
For the RiseClipse implementation of the validator parts of the RiseClipse project are being used. Currently, these
32-
parts aren't distributed to any Maven Repository, so the Git Repositories need to be included. This is done using Git
33-
Submodules.
31+
Since version 1.2.x the JAR Files of RiseClipse are distributed on Maven Central Repository. This way the JAR Files can
32+
be retrieved from there and don't need to be build locally anymore. Only the OCL Files for the SCL validation still need
33+
to be downloaded from RiseClipse GIT Repository. This is still done using Git Submodules.
3434

3535
To clone the project or update the project this means that the Git commands are sometimes a little different. To clone
3636
the project use the following command `git clone --recurse-submodules [email protected]:com-pas/compas-scl-validator.git`.
3737
This will also clone the submodules.
3838

3939
Tip: The URL to the submodules are configured in the file `.gitmodules`, but these are using the SSH URL. There is a way
40-
described in the URL above that the URL can be overwritten locally with an HTTPS URL of the GIT Repository.
40+
described [here](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to overwrite the URL locally with an HTTPS URL of
41+
the GIT Repository.
4142

42-
Check the [Development](DEVELOPMENT.md) page for more detail information how to work with this repository, because of
43-
the mixture with RiseClipse.
43+
Check the [Development](DEVELOPMENT.md) page for more detail information how to develop in this repository, because of
44+
the Git submodule and Eclipse Repository needed to make RiseClipse work.
4445

4546
## Custom OCL Files
4647

riseclipse/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ SPDX-License-Identifier: Apache-2.0
2828
<eclipse.emf.common.version>2.24.0</eclipse.emf.common.version>
2929
<eclipse.ocl.version>1.17.0</eclipse.ocl.version>
3030
<antlr.runtime.version>3.2.0</antlr.runtime.version>
31+
3132
<riseclipse.scl.version>1.2.3</riseclipse.scl.version>
3233
<riseclipse.main.version>1.2.5</riseclipse.main.version>
3334

riseclipse/riseclipse-p2-to-m2/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,16 @@ SPDX-License-Identifier: Apache-2.0
77
This project is used to create maven artifacts from Eclipse plugins. This is needed for building the executable jar to
88
run in a Docker Container.
99

10-
The `src/main/resources/riseclipse.aggr` file should be edited with the
11-
[CBI/aggregator](https://wiki.eclipse.org/CBI/aggregator) tool.
10+
The project is a copy of the p2_to_m2 project
11+
from [RiseClipse Developer](https://github.com/riseclipse/riseclipse-developer)
12+
of the directory 'fr.centralesupelec.edf.riseclipse.developer.p2_to_m2'.
13+
14+
The file `src/main/resources/riseclipse.aggr` is also a copy of the file from RiseClipse and can be found
15+
[here](https://github.com/riseclipse/riseclipse-developer/blob/master/fr.centralesupelec.edf.riseclipse.developer.p2_to_m2/src/main/resources/riseclipse.aggr)
16+
. This file needs to be updated manually.
17+
18+
**Remark RiseClipse**: The `src/main/resources/riseclipse.aggr` file should be edited with
19+
the [CBI/aggregator](https://wiki.eclipse.org/CBI/aggregator) tool.
20+
21+
**Remark CoMPAS**: Because we only need this small part of the RiseClipse Developer GIT Repository and mainly 2 files
22+
(pom.xml (partially) and riseclipse.aggr) it didn't seem usefully to make a Git Submodule from it.

riseclipse/riseclipse-p2-to-m2/src/main/resources/riseclipse.aggr

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--
3-
SPDX-FileCopyrightText: 2022 Alliander N.V.
4-
5-
SPDX-License-Identifier: Apache-2.0
6-
-->
72
<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">
83
<validationSets label="Eclipse needed projects for RiseClipse">
94
<contributions label="Eclipse Platform 2021-12">
@@ -51,6 +46,7 @@ SPDX-License-Identifier: Apache-2.0
5146
<bundles name="org.antlr.runtime" versionRange="[3.2.0,3.3.0)"/>
5247
<bundles name="org.apache.commons.lang3" versionRange="3.1.0"/>
5348
<bundles name="org.apache.log4j" versionRange="1.2.15"/>
49+
<bundles name="org.apache.commons.cli" versionRange="1.4.0"/>
5450
</repositories>
5551
</contributions>
5652
<validationRepositories location="https://download.eclipse.org/releases/2021-12/202112081000/"/>
@@ -59,4 +55,4 @@ SPDX-License-Identifier: Apache-2.0
5955
<configurations architecture="x86_64"/>
6056
<configurations operatingSystem="linux" windowSystem="gtk" architecture="x86_64"/>
6157
<configurations operatingSystem="macosx" windowSystem="cocoa" architecture="x86_64"/>
62-
</aggregator:Aggregation>
58+
</aggregator:Aggregation>

0 commit comments

Comments
 (0)