Skip to content

Commit d9e9146

Browse files
authored
Fix overriding semantics messaging version in newer openjdk 8 versions (#252)
* Fix overriding semantics messaging version in newer openjdk 8 versions * Added how to run application and override eiffel-semantic version documentation
1 parent 8d860e5 commit d9e9146

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Visit [Eiffel Community](https://eiffel-community.github.io) to get started and
4646
2. [**Installation**](wiki/markdown/installation.md)
4747

4848
3. [**Running RemRem-Publish service**](wiki/markdown/running-remrem-publish.md)
49+
- [**Run Application**](wiki/markdown/run.md)
4950
- [**Run in Docker**](wiki/markdown/docker.md)
5051
- [**Configuration**](wiki/markdown/configuration.md)
5152

publish-service/src/main/java/com/ericsson/eiffel/remrem/publish/controller/VersionService.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public Map<String, Map<String, String>> getMessagingVersions() {
7979
if (version != null) {
8080

8181
if (mainAttribs.getValue(IS_ENDPOINT_VERSION) != null) {
82-
endpointVersions.put(versionKey, version);
82+
if(endpointVersions.get(versionKey) == null) {
83+
endpointVersions.put(versionKey, version);
84+
}
8385
} else {
8486
serviceVersion.put(versionKey, version);
8587
}

wiki/markdown/run.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Run RemRem-Publish Applciation
2+
3+
RemRem-Publish application can be executed with Maven command or with the maven built war file.
4+
5+
## Requirements
6+
7+
- Java
8+
- Maven
9+
10+
## Run RemRem-Publish With Maven Command
11+
12+
1. Change to service directory:
13+
`cd publish-service`
14+
15+
2. Execute maven command to build and run RemRem-Publish:
16+
`mvn spring-boot:run`
17+
18+
19+
## Run RemRem-Publish With Java Command
20+
21+
1. Go to RemRem-Publish git root directory
22+
23+
2. Execute maven package command to build the RemRem-Publish war file:
24+
`mvn package -DskipTests`
25+
26+
This will produce a war file in the "target" folder.
27+
The RemRem-Publish released war file can be downloaded from JitPack.
28+
29+
3. Run RemRem-Publish application war file
30+
There is some alternatives to execute the war file with java command.
31+
`java -classpath publish-service/target/publish-service-2.0.26.war org.springframework.boot.loader.WarLauncher`
32+
or
33+
`java -jar publish-service/target/publish-service-2.0.26.war`
34+
35+
36+
Provide customized RemRem-Publish application.properties configuration via the spring.config.location java flag which need to be appended to the java command line:
37+
`-Dspring.config.location=/path/to/application.properties`
38+
39+
40+
## Override RemRem-Publish Eiffel Protocol Version
41+
42+
Eiffel-RemRem Protocol versions is developed and released by Github project:
43+
https://github.com/eiffel-community/eiffel-remrem-semantics
44+
45+
Eiffel-RemRem-Semantic versions is released in Jitpack and can be downloaded as jar file.
46+
Eiffel-Remrem-Semantic releases version jar files:
47+
https://jitpack.io/com/github/eiffel-community/eiffel-remrem-semantics
48+
49+
Example of one Eiffel-Semantic-version Jitpack download url address:
50+
https://jitpack.io/com/github/eiffel-community/eiffel-remrem-semantics/2.2.1/eiffel-remrem-semantics-2.2.1.jar
51+
52+
Eiffel-RemRem-Publish is released with a built-in eiffel-semantic protocol version which can be overridden with a different eiffel-semantic version by adding the external eiffel-semantic version jar file to classpath.
53+
54+
Execute RemRem-Publish application with external eiffel-semantic version jar file to classpath:
55+
`java -classpath /path/to/protocol/eiffel-remrem-semantics-2.2.2.jar:publish-service/target/publish-service-2.0.26.war org.springframework.boot.loader.WarLauncher`
56+
57+
Another alternative (works only with Java 8):
58+
`java -Djava.ext.dirs=/path/to/protocol/eiffel-remrem-semantics-2.2.2.jar -jar publish-service/target/publish-service-2.0.26.war`
59+
60+
Go to http://localhost:8080/versions and "semanticsVersion" field should show the overridden eiffel-semantic version.
61+

0 commit comments

Comments
 (0)