Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
open-bpmn
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
imixs
open-bpmn
Commits
97bfe513
Commit
97bfe513
authored
1 year ago
by
Ralph Soika
Browse files
Options
Downloads
Patches
Plain Diff
impl
Issue #226
parent
f4965abe
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
open-bpmn.glsp-server/pom.xml
+7
-0
7 additions, 0 deletions
open-bpmn.glsp-server/pom.xml
open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/BPMNServerLauncher.java
+25
-0
25 additions, 0 deletions
...r/src/main/java/org/openbpmn/glsp/BPMNServerLauncher.java
with
32 additions
and
0 deletions
open-bpmn.glsp-server/pom.xml
+
7
−
0
View file @
97bfe513
...
...
@@ -21,6 +21,13 @@
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.maven
</groupId>
<artifactId>
maven-model
</artifactId>
<version>
3.3.9
</version>
</dependency>
<dependency>
<groupId>
org.eclipse.glsp
</groupId>
<artifactId>
org.eclipse.glsp.server
</artifactId>
...
...
This diff is collapsed.
Click to expand it.
open-bpmn.glsp-server/src/main/java/org/openbpmn/glsp/BPMNServerLauncher.java
+
25
−
0
View file @
97bfe513
...
...
@@ -15,9 +15,13 @@
********************************************************************************/
package
org.openbpmn.glsp
;
import
java.io.FileReader
;
import
java.io.IOException
;
import
org.apache.commons.cli.ParseException
;
import
org.apache.maven.model.Model
;
import
org.apache.maven.model.io.xpp3.MavenXpp3Reader
;
import
org.codehaus.plexus.util.xml.pull.XmlPullParserException
;
import
org.eclipse.glsp.server.di.ServerModule
;
import
org.eclipse.glsp.server.launch.DefaultCLIParser
;
import
org.eclipse.glsp.server.launch.GLSPServerLauncher
;
...
...
@@ -25,12 +29,15 @@ import org.eclipse.glsp.server.launch.SocketGLSPServerLauncher;
import
org.eclipse.glsp.server.utils.LaunchUtil
;
public
final
class
BPMNServerLauncher
{
private
BPMNServerLauncher
()
{
}
@SuppressWarnings
(
"uncommentedmain"
)
public
static
void
main
(
final
String
[]
args
)
{
try
{
System
.
out
.
println
(
"[Open-BPMN-Server] Version "
+
getMavenProjectVersion
());
DefaultCLIParser
cliParser
=
new
DefaultCLIParser
(
args
,
"bpmn server"
);
LaunchUtil
.
configure
(
cliParser
);
int
port
=
cliParser
.
parsePort
();
...
...
@@ -43,4 +50,22 @@ public final class BPMNServerLauncher {
}
}
/**
* Helper method to receive dynamically the maven version
* See:
* https://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code
*
* @return
*/
private
static
String
getMavenProjectVersion
()
{
try
{
MavenXpp3Reader
reader
=
new
MavenXpp3Reader
();
Model
model
=
reader
.
read
(
new
FileReader
(
"pom.xml"
));
return
model
.
getVersion
();
}
catch
(
IOException
|
XmlPullParserException
e
)
{
System
.
out
.
println
(
"Failed to read server version: "
+
e
.
getMessage
());
}
return
""
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment