@@ -4,7 +4,21 @@ SPDX-FileCopyrightText: 2022 Alliander N.V.
4
4
SPDX-License-Identifier: Apache-2.0
5
5
-->
6
6
7
- # Development
7
+ # Development for CoMPAS SCL Validator
8
+
9
+ Since version 1.2.x the JAR Files of RiseClipse are distributed through Maven Central Repository. The JAR Files can be
10
+ retrieved from there and don't need to be build locally anymore. Only the OCL Files for the SCL validation still need to
11
+ be downloaded from RiseClipse GIT Repository. This is still done using Git Submodules.
12
+
13
+ To clone the project or update the project this means that the Git commands are sometimes a little different. To clone
14
+ the project use the following command
` git clone --recurse-submodules [email protected] :com-pas/compas-scl-validator.git ` .
15
+ This will also clone the submodules.
16
+
17
+ Tip: The URL to the submodules are configured in the file ` .gitmodules ` , but these are using the SSH URL. There is a way
18
+ described [ here] ( https://git-scm.com/book/en/v2/Git-Tools-Submodules ) to overwrite the URL locally with an HTTPS URL of
19
+ the GIT Repository.
20
+
21
+ Check the [ Development] ( DEVELOPMENT.md ) page for more detail information how to develop in this GIT repository.
8
22
9
23
## Git
10
24
@@ -56,6 +70,22 @@ maven module is created here, see [README.md](riseclipse/riseclipse-p2-to-m2/REA
56
70
Example about how to use Eclipse OCL was found
57
71
[ here] ( https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FPivotStandalone.html ) .
58
72
73
+ ## Building the application
74
+
75
+ You can use Maven to build the application and see if all tests are working using:
76
+
77
+ ``` shell script
78
+ ./mvnw clean verify
79
+ ```
80
+
81
+ This should normally be enough to also run the application, but there were cases that we need to build using:
82
+
83
+ ``` shell script
84
+ ./mvnw clean install
85
+ ```
86
+
87
+ This to make the local modules available for the app module to run the application.
88
+
59
89
## Running the application in dev mode
60
90
61
91
You can run your application in dev mode that enables live coding using:
@@ -88,22 +118,44 @@ docker run --rm --name compas_keycloak \
88
118
-d compas_keycloak:latest
89
119
```
90
120
91
- ## Packaging and running the application
121
+ ## Testing the application
92
122
93
- The application can be packaged using:
123
+ The application is tested with unit and integration tests, but you can also manually test the application using for
124
+ instance Postman. And there is also a way to test this service with the CoMPAS OpenSCD Frontend application.
94
125
95
- ``` shell script
96
- ./mvnw package
97
- ```
126
+ ### Postman
98
127
99
- It produces the ` quarkus-run.jar ` file in the ` app/target/quarkus-app/ ` directory. Be aware that it’s not an _ über-jar _
100
- as the dependencies are copied into the ` app/target/quarkus-app/lib/ ` directory .
128
+ To manually test the application there is a Postman collection in the directory ` postman ` that can be imported
129
+ and used to execute REST XML Calls .
101
130
102
- If you want to build an _ über-jar_ , execute the following command:
131
+ To make the call work we also need to import an environment and authorisation collection. These files can be found
132
+ in [ CoMPAS Deployment Repository] ( https://github.com/com-pas/compas-deployment ) in the directory ` postman `
133
+ (` auth.collection.json ` and ` local.environment.json ` ).
103
134
104
- ``` shell script
105
- ./mvnw package -Dquarkus.package.type=uber-jar
106
- ```
135
+ In the authorisation collection there are called for the 3 users known within the Demo KeyCloak instance.
136
+ If one of these calls are executed there is a variable ` bearer ` filled.
137
+
138
+ Now one of the SCL Auto Alignment calls can be executed, the variable ` bearer ` is added to the header of the request.
139
+ After the call is executed the result should be shown in Postman.
140
+
141
+ ### CoMPAS OpenSCD Frontend application
142
+
143
+ To test the SCL Validator with the CoMPAS OpenSCD application just run the application in dev mode, including the
144
+ KeyCloak instance. For further instruction how to start the CoMPAS OpenSCD application and use this locally see
145
+ the file ` DEVELOPMENT.md ` in [ CoMPAS OpenSCD application] ( https://github.com/com-pas/compas-open-scd ) .
107
146
108
- The application is now runnable using ` java -jar app/target/quarkus-app/quarkus-run.jar ` .
147
+ ## Docker Images
109
148
149
+ ### Creating a Docker image with native executable
150
+
151
+ The CoMPAS SCL Validator currently isn't build as Native executable, GraalVM has a lot of problems to strip the
152
+ Eclipse libraries and make them work as Native executable.
153
+
154
+ ### Creating a Docker image with JVM executable
155
+
156
+ The release action is creating a Docker Image which runs the application using a JVM. You can create a Docker Image
157
+ with JVM executable using:
158
+
159
+ ``` shell script
160
+ ./mvnw package -Pjvm-image
161
+ ```
0 commit comments