tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [2/5] tinkerpop git commit: TINKERPOP-2024 Made port configurable in archetype
Date Thu, 16 Aug 2018 19:15:15 GMT
TINKERPOP-2024 Made port configurable in archetype

The port is defaulted to the gremlin server test port, which is not the same as the standard
8182 so the usage instructions were somewhat not right in an out-of-the-box way.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/575cecf1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/575cecf1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/575cecf1

Branch: refs/heads/tp33
Commit: 575cecf1d648cd7453ffa9b69fe12b8f10117d9c
Parents: 1a3549f
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Aug 13 11:39:59 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Aug 13 11:39:59 2018 -0400

----------------------------------------------------------------------
 .../src/main/resources/archetype-resources/README.asciidoc       | 2 +-
 .../resources/archetype-resources/src/main/java/Service.java     | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/575cecf1/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/README.asciidoc
----------------------------------------------------------------------
diff --git a/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/README.asciidoc
b/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/README.asciidoc
index 04ea28e..d4a0eb1 100644
--- a/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/README.asciidoc
+++ b/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/README.asciidoc
@@ -65,4 +65,4 @@ $ bin/gremlin-server.sh  conf/gremlin-server-modern.yaml
 Run this project as follows:
 
 [source,text]
-mvn exec:java -Dexec.mainClass="${package}.App" -Dlog4j.configuration=file:conf/log4j.properties
+mvn exec:java -Dexec.mainClass="${package}.App" -Dlog4j.configuration=file:conf/log4j.properties
-Dport=8182

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/575cecf1/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/src/main/java/Service.java
----------------------------------------------------------------------
diff --git a/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/src/main/java/Service.java
b/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/src/main/java/Service.java
index a79bdaa..bb3fc68 100644
--- a/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/src/main/java/Service.java
+++ b/gremlin-archetype/gremlin-archetype-server/src/main/resources/archetype-resources/src/main/java/Service.java
@@ -27,10 +27,12 @@ import java.util.List;
 
 public class Service implements AutoCloseable {
 
+    private final int port = Integer.parseInt(System.getProperty("port", "45940"));
+
     /**
      * There typically needs to be only one Cluster instance in an application.
      */
-    private final Cluster cluster = Cluster.build().port(45940).create();
+    private final Cluster cluster = Cluster.build().port(port).create();
 
     /**
      * Construct a remote GraphTraversalSource using the above created Cluster instance that
will connect to Gremlin


Mime
View raw message