You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/05/03 16:21:58 UTC

[01/18] incubator-tinkerpop git commit: Deprecate ScriptExecutor.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1279 444778b59 -> 76d5be223


Deprecate ScriptExecutor.


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

Branch: refs/heads/TINKERPOP-1279
Commit: b1493b5b40434ff82c89790e3142819d569119ed
Parents: 0392734
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 07:39:55 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 07:39:55 2016 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b1493b5b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java
index 1d30a5d..8b0b7fd 100644
--- a/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java
+++ b/gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/ScriptExecutor.java
@@ -33,7 +33,9 @@ import java.util.List;
  * @author Pavel A. Yaskevich
  * @author Marko A. Rodriguez (http://markorodriguez.com)
  * @author Stephen Mallette (http://stephen.genoprime.com)
+ * @deprecated As of release 3.2.1, replaced by direct execution via gremlin.sh
  */
+@Deprecated
 public class ScriptExecutor {
     public static void main(final String[] arguments) throws IOException {
         if (arguments.length == 0) {


[07/18] incubator-tinkerpop git commit: Fixed up sections for console interactive/execute modes.

Posted by ok...@apache.org.
Fixed up sections for console interactive/execute modes.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 0e513cbc47f0885a0484b194ce81d31218dec6dd
Parents: 620f478
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 15:00:04 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 15:00:04 2016 -0400

----------------------------------------------------------------------
 .../src/reference/gremlin-applications.asciidoc | 66 +++++++++++++++-----
 1 file changed, 51 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0e513cbc/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index ee05a01..cf6abaa 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -106,7 +106,7 @@ These plugins can only be deactivated.
 The Gremlin Console is loaded and ready for commands. Recall that the console hosts the Gremlin-Groovy language.
 Please review link:http://groovy.codehaus.org/[Groovy] for help on Groovy-related constructs. In short, Groovy is a
 superset of Java. What works in Java, works in Groovy. However, Groovy provides many shorthands to make it easier
-to interact with the Java API.  Moreoever, Gremlin provides many neat shorthands to make it easier to express paths
+to interact with the Java API.  Moreover, Gremlin provides many neat shorthands to make it easier to express paths
 through a property graph.
 
 [gremlin-groovy]
@@ -220,24 +220,22 @@ TIP: It is possible to manage plugin activation and deactivation by manually edi
 contains the class names of the "active" plugins.  It is also possible to clear dependencies added by `:install` by
 deleting them from the `ext` directory.
 
-Script Executor
-~~~~~~~~~~~~~~~
+[[execution-mode]]
+Execution Mode
+~~~~~~~~~~~~~~
 
-For automated tasks and batch executions of Gremlin, it can be useful to execute Gremlin scripts from the command
-line.  Consider the following file named `gremlin.groovy`:
+For automated tasks and batch executions of Gremlin, it can be useful to execute Gremlin scripts in "execution" mode
+from the command line.  Consider the following file named `gremlin.groovy`:
 
 [source,groovy]
 ----
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.*
 graph = TinkerFactory.createModern()
 g = graph.traversal()
 g.V().each { println it }
 ----
 
-This script creates the toy graph and then iterates through all its vertices printing each to the system out.  Note
-that under this approach, "imports" need to be explicitly defined (except for "core" TinkerPop classes).  In addition,
-plugins and other dependencies should already be "installed" via console commands which cannot be used with this mode
-of execution.  To execute this script from the command line, `gremlin.sh` has the `-e` option used as follows:
+This script creates the toy graph and then iterates through all its vertices printing each to the system out.  To
+execute this script from the command line, `gremlin.sh` has the `-e` option used as follows:
 
 [source,bash]
 ----
@@ -257,7 +255,6 @@ to system out:
 
 [source,groovy]
 ----
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.*
 graph = TinkerFactory.createModern()
 g = graph.traversal()
 g.V().has('name',args[0]).each { println it }
@@ -273,10 +270,49 @@ $ bin/gremlin.sh -e gremlin.groovy vadas
 v[2]
 ----
 
-NOTE: The `ScriptExecutor` is for Gremlin Groovy scripts only.  It is not possible to include Console plugin commands
-such as `:remote` or `:>` when using `-e` in these scripts. That does not mean that it is impossible to script such
-commands, it just means that they need to be scripted manually.  For example, instead of trying to use the `:remote`
-command, manually construct a <<connecting-via-java,Gremlin Driver>> `Client` and submit scripts from there.
+[[interactive-mode]]
+Interactive Mode
+~~~~~~~~~~~~~~~~
+
+The Gremlin Console can be started in an "interactive" mode. Interactive mode is like <<execution-mode, execution mode>>
+but the console will not exit at the completion of the script, even if the script completes unsuccessfully. In such a
+case, it will simply stop processing on the line that of the script that failed. In this way the state of the console
+is such that a user could examine the state of things up to the point of failure which might make the script easier to
+debug.
+
+In addition to debugging, interactive mode is a helpful way for users to initialize their console environment to
+avoid otherwise repetitive typing. For example, a user who spends a lot of time working with the TinkerPop "modern"
+graph might create a script called `init.groovy` like:
+
+[source,groovy]
+----
+graph = TinkerFactory.createModern()
+g = graph.traversal()
+----
+
+and then start Gremlin Console as follows:
+
+[source,text]
+----
+$ bin/gremlin.sh -i init.groovy
+
+         \,,,/
+         (o o)
+-----oOOo-(3)-oOOo-----
+plugin activated: tinkerpop.server
+plugin activated: tinkerpop.utilities
+plugin activated: tinkerpop.tinkergraph
+gremlin> g.V()
+==>v[1]
+==>v[2]
+==>v[3]
+==>v[4]
+==>v[5]
+==>v[6]
+----
+
+Note that the user can now reference `g` (and `graph` for that matter) at startup without having to directly type that
+variable initialization code into the console.
 
 [[gremlin-server]]
 Gremlin Server


[03/18] incubator-tinkerpop git commit: Better exception messaging on failure of -e.

Posted by ok...@apache.org.
Better exception messaging on failure of -e.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 1ed7043721214b04ebb278ae45503fc893f2b960
Parents: b6853f0
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 14:01:53 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 14:01:53 2016 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/console/Console.groovy       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1ed70437/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index a35c44a..21ebc64 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -332,11 +332,14 @@ class Console {
                     lineNumber++
                     groovy.execute(line)
                 } catch (Exception ex) {
-                    io.err.println("Invalid line in $scriptFile at [$lineNumber: $line] - ${ex.message}")
+                    io.err.println("Error in $scriptFile at [$lineNumber: $line] - ${ex.message}")
                     if (interactive)
                         break
-                    else
+                    else {
+                        ex.printStackTrace(io.err)
                         System.exit(1)
+                    }
+
                 }
             }
 


[09/18] incubator-tinkerpop git commit: Added default args bindings when passing a script to the console.

Posted by ok...@apache.org.
Added default args bindings when passing a script to the console.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 1e83a3212f97dfe4ab3c601814a47028885c6e63
Parents: cd709ec
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon May 2 12:43:45 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon May 2 12:43:45 2016 -0400

----------------------------------------------------------------------
 .../groovy/org/apache/tinkerpop/gremlin/console/Console.groovy     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1e83a321/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 7ab8b57..564df32 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -322,6 +322,8 @@ class Console {
             if (scriptAndArgs.size() > 1) {
                 List<String> args = scriptAndArgs.subList(1, scriptAndArgs.size())
                 groovy.execute("args = [\"" + args.join('\",\"') + "\"]")
+            } else {
+                groovy.execute("args = []")
             }
 
             final File file = new File(scriptFile)


[18/18] incubator-tinkerpop git commit: added @spmallette recommended deprecation message and updated CHANGELOG.

Posted by ok...@apache.org.
added @spmallette recommended deprecation message and updated CHANGELOG.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 76d5be2237918eedffde35f33af70466b6aba6ce
Parents: 6f3026a
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue May 3 08:21:49 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue May 3 08:21:49 2016 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                                 | 1 +
 .../org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java  | 2 +-
 .../tinkerpop/gremlin/process/traversal/util/ConnectiveP.java      | 2 +-
 .../org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java   | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/76d5be22/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 399e2c2..338823d 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.2.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added `List<P<V>>` constructors to `ConnectiveP`, `AndP`, and `OrP` for ease of use.
 * Added support for interactive (`-i`) and execute (`-e`) modes for Gremlin Console.
 * Displayed line numbers for script execution failures of `-e` and `-i`.
 * Improved messaging around script execution errors in Gremlin Console.

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/76d5be22/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java
index 245c05f..db75641 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/AndP.java
@@ -39,7 +39,7 @@ public final class AndP<V> extends ConnectiveP<V> {
 
     @Deprecated
     /**
-     * @deprecated Since 3.2.0 -- use {@link AndP(List)}
+     * @deprecated As of release 3.2.0-incubating, replaced by {@link AndP(List)}
      */
     public AndP(final P<V>... predicates) {
         this(Arrays.asList(predicates));

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/76d5be22/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ConnectiveP.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ConnectiveP.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ConnectiveP.java
index f3f3e0b..70f008a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ConnectiveP.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/ConnectiveP.java
@@ -42,7 +42,7 @@ public abstract class ConnectiveP<V> extends P<V> {
 
     @Deprecated
     /**
-     * @deprecated Since 3.2.0 -- use {@link ConnectiveP(List)}
+     * @deprecated As of release 3.2.0-incubating, replaced by {@link ConnectiveP(List)}
      */
     public ConnectiveP(final P<V>... predicates) {
         this(Arrays.asList(predicates));

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/76d5be22/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java
index 7a62d81..e1ce7a2 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/OrP.java
@@ -39,7 +39,7 @@ public final class OrP<V> extends ConnectiveP<V> {
 
     @Deprecated
     /**
-     * @deprecated Since 3.2.0 -- use {@link OrP(List)}
+     * @deprecated As of release 3.2.0-incubating, replaced by {@link OrP(List)}
      */
     public OrP(final P<V>... predicates) {
         this(Arrays.asList(predicates));


[04/18] incubator-tinkerpop git commit: Updated changelog.

Posted by ok...@apache.org.
Updated changelog.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 3ce732a3e7113ea707dc39755c2fa2f06a5682b3
Parents: 1ed7043
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 14:08:44 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 14:08:44 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                             | 6 ++++++
 .../groovy/org/apache/tinkerpop/gremlin/console/Console.groovy | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3ce732a3/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6eb53da..6e3a1d5 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,12 @@ image::https://raw.githubusercontent.com/apache/incubator-tinkerpop/master/docs/
 TinkerPop 3.2.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added support for interactive (`-i`) and execute (`-e`) modes for Gremlin Console.
+* Displayed line numbers for script execution failures of `-e` and `-i`.
+* Improved messaging around script execution errors in Gremlin Console.
+* Added "help" support to Gremlin Console with the `-h` flag.
+* Added options to better control verbosity of Gremlin Console output with `-Q`, `-V` and `-D`.
+* Deprecated the `ScriptExecutor` - the `-e` option to `gremlin.sh` is now handled by `Console`.
 * Added a Gremlin language variant tutorial teaching people how to embed Gremlin in a host programming language.
 
 [[release-3.2.0-incubating]]

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3ce732a3/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 21ebc64..6e68d05 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -405,4 +405,4 @@ class Console {
                 (options.is != null && options.is ? options.is : null)
         new Console(io, scriptAndArgs, !options.e)
     }
-}
+}
\ No newline at end of file


[15/18] incubator-tinkerpop git commit: fixed a typo

Posted by ok...@apache.org.
fixed a typo


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

Branch: refs/heads/TINKERPOP-1279
Commit: 0f7e587d3cd9a1e87aa1e4ca6ee2a95cd4aaaefd
Parents: 383a7a2
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 15:53:52 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 15:53:52 2016 +0200

----------------------------------------------------------------------
 docker/scripts/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0f7e587d/docker/scripts/build.sh
----------------------------------------------------------------------
diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh
index 9bdf4ff..bc7464f 100755
--- a/docker/scripts/build.sh
+++ b/docker/scripts/build.sh
@@ -52,7 +52,7 @@ done
 TINKERPOP_BUILD_OPTIONS=""
 
 [ -z "${RUN_TESTS}" ] && TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DskipTests"
-[ -z "${RUN_INTEGRATION_TESTS}" ] || TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DskipIntegrationsTests=false"
+[ -z "${RUN_INTEGRATION_TESTS}" ] || TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DskipIntegrationTests=false"
 [ -z "${INCLUDE_NEO4J}" ] || TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -DincludeNeo4j"
 [ -z "${BUILD_JAVA_DOCS}" ] && TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -Dmaven.javadoc.skip=true"
 


[16/18] incubator-tinkerpop git commit: Merge branch 'tp31'

Posted by ok...@apache.org.
Merge branch 'tp31'


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

Branch: refs/heads/TINKERPOP-1279
Commit: a117232ad285724e0f81c09a4ae3e565009d0c61
Parents: 08d54c6 0f7e587
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 15:54:20 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 15:54:20 2016 +0200

----------------------------------------------------------------------
 docker/scripts/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[11/18] incubator-tinkerpop git commit: CTR: Removed wrong entry from .dockerignore file.

Posted by ok...@apache.org.
CTR: Removed wrong entry from .dockerignore file.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 00b8ea25e70b51892af4e470d2bda370ddc3853c
Parents: 14966d7
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 12:20:49 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 12:20:49 2016 +0200

----------------------------------------------------------------------
 .dockerignore | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/00b8ea25/.dockerignore
----------------------------------------------------------------------
diff --git a/.dockerignore b/.dockerignore
index 4749818..afe0e54 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -8,6 +8,5 @@
 .settings
 **/_bsp/
 docs/*.asciidoc
-**/ext
 Dockerfile
 .dockerignore


[12/18] incubator-tinkerpop git commit: Merge branch 'tp31' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop into tp31

Posted by ok...@apache.org.
Merge branch 'tp31' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop into tp31


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

Branch: refs/heads/TINKERPOP-1279
Commit: 383a7a2742f5fa98f61ad95963b19a6cf7eb9026
Parents: 00b8ea2 9a94872
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 12:21:47 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 12:21:47 2016 +0200

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  2 +
 .../src/reference/gremlin-applications.asciidoc |  4 +-
 .../upgrade/release-3.1.x-incubating.asciidoc   | 25 ++++++
 .../groovy/plugin/DriverRemoteAcceptor.java     | 32 ++++++--
 .../groovy/plugin/DriverRemoteAcceptorTest.java | 23 ++++++
 .../gremlin/structure/util/star/StarGraph.java  | 19 +++--
 .../structure/util/star/StarGraphTest.java      | 86 ++++++++++++++++++++
 7 files changed, 175 insertions(+), 16 deletions(-)
----------------------------------------------------------------------



[08/18] incubator-tinkerpop git commit: Update upgrade docs for Console changes

Posted by ok...@apache.org.
Update upgrade docs for Console changes


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

Branch: refs/heads/TINKERPOP-1279
Commit: cd709ecb549d88d13dce0694c2d2d25de70baaf4
Parents: 0e513cb
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 15:02:17 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 15:02:17 2016 -0400

----------------------------------------------------------------------
 .../upgrade/release-3.2.x-incubating.asciidoc   | 41 ++++++++++++++++++++
 1 file changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/cd709ecb/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 87e6cc8..7772e0f 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,47 @@ TinkerPop 3.2.1
 
 Please see the link:https://github.com/apache/incubator-tinkerpop/blob/3.2.1-incubating/CHANGELOG.asciidoc#tinkerpop-313-release-date-MONTH-DAY-YEAR[changelog] for a complete list of all the modifications that are part of this release.
 
+Upgrading for Users
+~~~~~~~~~~~~~~~~~~~
+
+Gremlin Console Flags
++++++++++++++++++++++
+
+Gremlin Console had several methods for executing scripts from file at the start-up of `bin/gremlin.sh`. There were
+two options:
+
+[source,text]
+bin/gremlin.sh script.groovy    <1>
+bin/gremlin.sh -e script.groovy <2>
+
+<1> The `script.groovy` would be executed as a console initialization script setting the console up for use and leaving
+it open when the script completed successfully or closing it if the script failed.
+<2> The `script.groovy` would be executed by the `ScriptExecutor` which meant that commands for the Gremlin Console,
+such as `:remote` and `:>` would not be respected.
+
+Changes in this version of TinkerPop have added much more flexibility here and only a minor breaking change should be
+considered when using this version. First of all, recognize that hese two lines are currently equivalent:
+
+[source,text]
+bin/gremlin.sh script.groovy
+bin/gremlin.sh -i script.groovy
+
+but users should start to explicitly specify the `-i` flag as TinkerPop will eventually remove the old syntax. Despite
+the one used beware of the fact that neither will close the console on script failure anymore. In that sense, this
+behavior represents a breaking change to consider. To ensure the console closes on failure or success, a script will
+have to use the `-e` option.
+
+The console also has a number of new features in addition to `-e` and `-i`:
+
+* View the available flags for the console with `-h`.
+* Control console output with `-D`, `-Q` and -`V`
+* Get line numbers on script failures passed to `-i` and `-e`.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1268[TINKERPOP-1268],
+link:https://issues.apache.org/jira/browse/TINKERPOP-1155[TINKERPOP-1155], link:https://issues.apache.org/jira/browse/TINKERPOP-1156[TINKERPOP-1156],
+link:https://issues.apache.org/jira/browse/TINKERPOP-1157[TINKERPOP-1157],
+link:http://tinkerpop.apache.org/docs/3.2.1-incubating/reference/#interactive-mode[Reference Documentation - Interactive Mode],
+link:http://tinkerpop.apache.org/docs/3.2.1-incubating/reference/#execution-mode[Reference Documentation - Execution Mode]
 
 TinkerPop 3.2.0
 ---------------


[02/18] incubator-tinkerpop git commit: Implemented more options for Gremlin Console startup.

Posted by ok...@apache.org.
Implemented more options for Gremlin Console startup.

Added -i for interactive mode and made -e execute in the Console rather than ScriptExecutor. Added switches to show/hide output and added a switch for "help". The existing method for -i still works as in "bin/gremlin.sh init.groovy"


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

Branch: refs/heads/TINKERPOP-1279
Commit: b6853f052fc2efcf76f9d8e30bf95e6a22349fcc
Parents: b1493b5
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 13:46:02 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 13:46:02 2016 -0400

----------------------------------------------------------------------
 gremlin-console/pom.xml                         |   5 +
 gremlin-console/src/main/bin/gremlin.bat        |  41 +----
 gremlin-console/src/main/bin/gremlin.sh         |  19 +--
 .../tinkerpop/gremlin/console/Console.groovy    | 157 +++++++++++++++----
 4 files changed, 136 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b6853f05/gremlin-console/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-console/pom.xml b/gremlin-console/pom.xml
index 1620bc5..98cccb0 100644
--- a/gremlin-console/pom.xml
+++ b/gremlin-console/pom.xml
@@ -42,6 +42,11 @@ limitations under the License.
             <version>4.5.1</version>
         </dependency>
         <dependency>
+            <groupId>commons-cli</groupId>
+            <artifactId>commons-cli</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.tinkerpop</groupId>
             <artifactId>gremlin-driver</artifactId>
             <version>${project.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b6853f05/gremlin-console/src/main/bin/gremlin.bat
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/bin/gremlin.bat b/gremlin-console/src/main/bin/gremlin.bat
index 481d5ac..1d5e9bd 100644
--- a/gremlin-console/src/main/bin/gremlin.bat
+++ b/gremlin-console/src/main/bin/gremlin.bat
@@ -39,45 +39,6 @@ set JAVA_OPTIONS=-Xms32m -Xmx512m -Djline.terminal=none
 
 :: Launch the application
 
-if "%1" == "" goto console
-if "%1" == "-e" goto script
-if "%1" == "-v" goto version
-
-:console
-
 java %JAVA_OPTIONS% %JAVA_ARGS% -cp %LIBDIR%/*;%EXTDIR%; org.apache.tinkerpop.gremlin.console.Console %*
 
-set CLASSPATH=%OLD_CLASSPATH%
-goto :eof
-
-:script
-
-set strg=
-
-FOR %%X IN (%*) DO (
-CALL :concat %%X %1 %2
-)
-
-java %JAVA_OPTIONS% %JAVA_ARGS% -cp %LIBDIR%/*;%EXTDIR%; org.apache.tinkerpop.gremlin.groovy.jsr223.ScriptExecutor %strg%
-goto :eof
-
-:version
-java %JAVA_OPTIONS% %JAVA_ARGS% -cp %LIBDIR%/*;%EXTDIR%; org.apache.tinkerpop.gremlin.util.Gremlin
-
-goto :eof
-
-:concat
-
-if %1 == %2 goto skip
-
-SET strg=%strg% %1
-
-:concatsep
-
-if "%CP%" == "" (
-set CP=%LIBDIR%\%1
-)else (
-set CP=%CP%;%LIBDIR%\%1
-)
-
-:skip
+set CLASSPATH=%OLD_CLASSPATH%
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b6853f05/gremlin-console/src/main/bin/gremlin.sh
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/bin/gremlin.sh b/gremlin-console/src/main/bin/gremlin.sh
index 84ba8179..6ff0254 100755
--- a/gremlin-console/src/main/bin/gremlin.sh
+++ b/gremlin-console/src/main/bin/gremlin.sh
@@ -76,15 +76,8 @@ if [ -z "${SCRIPT_DEBUG:-}" ]; then
 fi
 
 # Process options
-MAIN_CLASS=org.apache.tinkerpop.gremlin.console.Console
-while getopts "elv" opt; do
+while getopts ":l" opt; do
     case "$opt" in
-    e) MAIN_CLASS=org.apache.tinkerpop.gremlin.groovy.jsr223.ScriptExecutor
-       # For compatibility with behavior pre-Titan-0.5.0, stop
-       # processing gremlin.sh arguments as soon as the -e switch is
-       # seen; everything following -e becomes arguments to the
-       # ScriptExecutor main class
-       break;;
     l) eval GREMLIN_LOG_LEVEL=\$$OPTIND
        OPTIND="$(( $OPTIND + 1 ))"
        if [ "$GREMLIN_LOG_LEVEL" = "TRACE" -o \
@@ -92,22 +85,18 @@ while getopts "elv" opt; do
 	   SCRIPT_DEBUG=y
        fi
        ;;
-    v) MAIN_CLASS=org.apache.tinkerpop.gremlin.util.Gremlin
     esac
 done
 
-# Remove processed options from $@. Anything after -e is preserved by the break;; in the case
-shift $(( $OPTIND - 1 ))
-
 JAVA_OPTIONS="${JAVA_OPTIONS} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configuration=conf/log4j-console.properties -Dgremlin.log4j.level=$GREMLIN_LOG_LEVEL"
 JAVA_OPTIONS=$(awk -v RS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JAVA_OPTIONS}" | grep -v '^$' | paste -sd ' ' -)
 
 if [ -n "$SCRIPT_DEBUG" ]; then
+    # in debug mode enable debugging of :install command
+    JAVA_OPTIONS="${JAVA_OPTIONS} -Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true"
     echo "CLASSPATH: $CLASSPATH"
     set -x
 fi
 
-# include the following in $JAVA_OPTIONS "-Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true" to debug :install
-
 # Start the JVM, execute the application, and return its exit code
-exec $JAVA $JAVA_OPTIONS $MAIN_CLASS "$@"
+exec $JAVA $JAVA_OPTIONS org.apache.tinkerpop.gremlin.console.Console "$@"

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b6853f05/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index a13e785..a35c44a 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -18,11 +18,18 @@
  */
 package org.apache.tinkerpop.gremlin.console
 
-import org.apache.tinkerpop.gremlin.console.commands.*
+import org.apache.commons.cli.Option
+import org.apache.tinkerpop.gremlin.console.commands.GremlinSetCommand
+import org.apache.tinkerpop.gremlin.console.commands.InstallCommand
+import org.apache.tinkerpop.gremlin.console.commands.PluginCommand
+import org.apache.tinkerpop.gremlin.console.commands.RemoteCommand
+import org.apache.tinkerpop.gremlin.console.commands.SubmitCommand
+import org.apache.tinkerpop.gremlin.console.commands.UninstallCommand
 import org.apache.tinkerpop.gremlin.console.plugin.PluggedIn
 import org.apache.tinkerpop.gremlin.groovy.loaders.GremlinLoader
 import org.apache.tinkerpop.gremlin.groovy.plugin.GremlinPlugin
 import jline.console.history.FileHistory
+import org.apache.tinkerpop.gremlin.util.Gremlin
 import org.apache.tinkerpop.gremlin.util.iterator.ArrayIterator
 import org.codehaus.groovy.tools.shell.AnsiDetector
 import org.codehaus.groovy.tools.shell.ExitNotification
@@ -30,6 +37,7 @@ import org.codehaus.groovy.tools.shell.Groovysh
 import org.codehaus.groovy.tools.shell.IO
 import org.codehaus.groovy.tools.shell.InteractiveShellRunner
 import org.codehaus.groovy.tools.shell.commands.SetCommand
+import org.codehaus.groovy.tools.shell.util.HelpFormatter
 import org.codehaus.groovy.tools.shell.util.Preferences
 import org.fusesource.jansi.Ansi
 import org.fusesource.jansi.AnsiConsole
@@ -67,15 +75,28 @@ class Console {
 
     private Iterator tempIterator = Collections.emptyIterator()
 
-    private final IO io = new IO(System.in, System.out, System.err)
+    private final IO io
     private final Groovysh groovy
+    private final boolean interactive
 
-
+    /**
+     * @deprecated As of release 3.2.1-incubating.
+     */
+    @Deprecated
     public Console(final String initScriptFile) {
-        io.out.println()
-        io.out.println("         \\,,,/")
-        io.out.println("         (o o)")
-        io.out.println("-----oOOo-(3)-oOOo-----")
+        this(new IO(System.in, System.out, System.err), initScriptFile.size() != null ? [initScriptFile] : null, true)
+    }
+
+    public Console(final IO io, final List<String> scriptAndArgs, final boolean interactive) {
+        this.io = io
+        this.interactive = interactive
+
+        if (!io.quiet) {
+            io.out.println()
+            io.out.println("         \\,,,/")
+            io.out.println("         (o o)")
+            io.out.println("-----oOOo-(3)-oOOo-----")
+        }
 
         maxIteration = Integer.parseInt(Preferences.get(PREFERENCE_ITERATION_MAX, Integer.toString(DEFAULT_ITERATION_MAX)))
         Preferences.addChangeListener(new PreferenceChangeListener() {
@@ -128,7 +149,9 @@ class Console {
 
                 if (activePlugins.contains(plugin.class.name)) {
                     pluggedIn.activate()
-                    io.out.println("plugin activated: " + plugin.getName())
+
+                    if (!io.quiet)
+                        io.out.println("plugin activated: " + plugin.getName())
                 }
             }
         }
@@ -137,13 +160,14 @@ class Console {
         // deactivated, and are thus hanging about
         mediator.writePluginState()
 
-        // start iterating results to show as output
-        showShellEvaluationOutput(true)
-
         try {
             // if the init script contains :x command it will throw an ExitNotification so init script execution
             // needs to appear in the try/catch
-            if (initScriptFile != null) initializeShellWithScript(initScriptFile)
+            if (scriptAndArgs != null && scriptAndArgs.size() > 0) executeInShell(scriptAndArgs)
+
+            // start iterating results to show as output
+            showShellEvaluationOutput(true)
+
             runner.run()
         } catch (ExitNotification ignored) {
             // occurs on exit
@@ -167,7 +191,7 @@ class Console {
             groovy.setResultHook(handleResultShowNothing)
     }
 
-    private def handlePrompt = { STANDARD_INPUT_PROMPT }
+    private def handlePrompt = { interactive ? STANDARD_INPUT_PROMPT : "" }
 
     private def handleResultShowNothing = { args -> null }
 
@@ -252,21 +276,28 @@ class Console {
                     io.err.println(e)
                 }
 
-                io.err.print("Display stack trace? [yN] ")
-                io.err.flush()
-                String line = new BufferedReader(io.in).readLine()
-                if (null == line)
-                    line = ""
-                io.err.print(line.trim())
-                io.err.println()
-                if (line.trim().equals("y") || line.trim().equals("Y")) {
+                if (interactive) {
+                    io.err.print("Display stack trace? [yN] ")
+                    io.err.flush()
+                    String line = new BufferedReader(io.in).readLine()
+                    if (null == line)
+                        line = ""
+                    io.err.print(line.trim())
+                    io.err.println()
+                    if (line.trim().equals("y") || line.trim().equals("Y")) {
+                        e.printStackTrace(io.err)
+                    }
+                } else {
                     e.printStackTrace(io.err)
+                    System.exit(1)
                 }
             } catch (Exception ignored) {
                 io.err.println("An undefined error has occurred: " + err)
+                if (!interactive) System.exit(1)
             }
         } else {
             io.err.println("An undefined error has occurred: " + err.toString())
+            if (!interactive) System.exit(1)
         }
 
         return null
@@ -284,27 +315,91 @@ class Console {
         return STANDARD_RESULT_PROMPT
     }
 
-    private void initializeShellWithScript(final String initScriptFile) {
+    private void executeInShell(final List<String> scriptAndArgs) {
+        final String scriptFile = scriptAndArgs[0]
         try {
-            final File file = new File(initScriptFile)
-            file.eachLine { line ->
+            // check if this script comes with arguments. if so then set them up in an "args" bundle
+            if (scriptAndArgs.size() > 1) {
+                List<String> args = scriptAndArgs.subList(1, scriptAndArgs.size())
+                groovy.execute("args = [\"" + args.join('\",\"') + "\"]")
+            }
+
+            final File file = new File(scriptFile)
+            int lineNumber = 0
+            def lines = file.readLines()
+            for (String line : lines) {
                 try {
+                    lineNumber++
                     groovy.execute(line)
                 } catch (Exception ex) {
-                    io.err.println("Bad line in Gremlin initialization file at [$line] - ${ex.message}")
-                    System.exit(1)
+                    io.err.println("Invalid line in $scriptFile at [$lineNumber: $line] - ${ex.message}")
+                    if (interactive)
+                        break
+                    else
+                        System.exit(1)
                 }
             }
+
+            if (!interactive) System.exit(0)
         } catch (FileNotFoundException ignored) {
-            io.err.println("Gremlin initialization file not found at [$initScriptFile].")
-            System.exit(1)
+            io.err.println("Gremlin file not found at [$scriptFile].")
+            if (!interactive) System.exit(1)
         } catch (Exception ex) {
-            io.err.println("Error starting Gremlin with initialization script at [$initScriptFile] - ${ex.message}")
-            System.exit(1)
+            io.err.println("Failure processing Gremlin script [$scriptFile] - ${ex.message}")
+            if (!interactive) System.exit(1)
         }
     }
 
     public static void main(final String[] args) {
-        new Console(args.length == 1 ? args[0] : null)
+        // need to do some up front processing to try to support "bin/gremlin.sh init.groovy" until this deprecated
+        // feature can be removed. ultimately this should be removed when a breaking change can go in
+        IO io = new IO(System.in, System.out, System.err)
+        if (args.length == 1 && !args[0].startsWith("-"))
+            new Console(io, [args[0]], true)
+
+        final CliBuilder cli = new CliBuilder(usage: 'gremlin.sh [options] [...]', formatter: new HelpFormatter(), stopAtNonOption: false)
+
+        // note that the inclusion of -l is really a setting handled by gremlin.sh and not by Console class itself.
+        // it is mainly listed here for informational purposes when the user starts things up with -h
+        cli.with {
+            h(longOpt: 'help', "Display this help message")
+            v(longOpt: 'version', "Display the version")
+            l("Set the logging level of components that use standard logging output independent of the Console")
+            V(longOpt: 'verbose', "Enable verbose Console output")
+            Q(longOpt: 'quiet', "Suppress superfluous Console output")
+            D(longOpt: 'debug', "Enabled debug Console output")
+            i(longOpt: 'interactive', argName: "SCRIPT ARG1 ARG2 ...", args: Option.UNLIMITED_VALUES, valueSeparator: ' ' as char, "Execute the specified script and leave the console open on completion")
+            e(longOpt: 'execute', argName: "SCRIPT ARG1 ARG2 ...", args: Option.UNLIMITED_VALUES, valueSeparator: ' ' as char, "Execute the specified script (SCRIPT ARG1 ARG2 ...) and close the console on completion")
+        }
+        OptionAccessor options = cli.parse(args)
+
+        if (options == null) {
+            // CliBuilder prints error, but does not exit
+            System.exit(22) // Invalid Args
+        }
+
+        if (options.h) {
+            cli.usage()
+            System.exit(0)
+        }
+
+        if (options.v) {
+            println("gremlin " + Gremlin.version())
+            System.exit(0)
+        }
+
+        if (options.V) io.verbosity = IO.Verbosity.VERBOSE
+        if (options.D) io.verbosity = IO.Verbosity.DEBUG
+        if (options.Q) io.verbosity = IO.Verbosity.QUIET
+
+        if (options.i && options.e) {
+            println("-i and -e options are mutually exclusive - provide one or the other")
+            System.exit(0)
+        }
+
+        List<String> scriptAndArgs = options.e ?
+                (options.es != null && options.es ? options.es : null) :
+                (options.is != null && options.is ? options.is : null)
+        new Console(io, scriptAndArgs, !options.e)
     }
 }


[05/18] incubator-tinkerpop git commit: Allow override of verbosity to quiet when using -e.

Posted by ok...@apache.org.
Allow override of verbosity to quiet when using -e.

Only override if the verbosity is not explicitly set.


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

Branch: refs/heads/TINKERPOP-1279
Commit: 05be605cd3df603772b15aad751310ea2d4b4b89
Parents: 3ce732a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 14:39:21 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 14:39:21 2016 -0400

----------------------------------------------------------------------
 .../groovy/org/apache/tinkerpop/gremlin/console/Console.groovy   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/05be605c/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index 6e68d05..7ab8b57 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -395,6 +395,10 @@ class Console {
         if (options.D) io.verbosity = IO.Verbosity.DEBUG
         if (options.Q) io.verbosity = IO.Verbosity.QUIET
 
+        // override verbosity if not explicitly set and -e is used
+        if (options.e && (!options.V && !options.D && !options.Q))
+            io.verbosity = IO.Verbosity.QUIET
+
         if (options.i && options.e) {
             println("-i and -e options are mutually exclusive - provide one or the other")
             System.exit(0)


[10/18] incubator-tinkerpop git commit: Merge remote-tracking branch 'origin/TINKERPOP-1268'

Posted by ok...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1268'


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

Branch: refs/heads/TINKERPOP-1279
Commit: 3225fbc5995156818b73ee757b91768ae7087f00
Parents: 64b09df 1e83a32
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon May 2 14:09:56 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon May 2 14:09:56 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   6 +
 .../src/reference/gremlin-applications.asciidoc |  66 ++++++--
 .../the-gremlin-console/index.asciidoc          |  11 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   |  41 +++++
 gremlin-console/pom.xml                         |   5 +
 gremlin-console/src/main/bin/gremlin.bat        |  41 +----
 gremlin-console/src/main/bin/gremlin.sh         |  19 +--
 .../tinkerpop/gremlin/console/Console.groovy    | 168 +++++++++++++++----
 .../gremlin/groovy/jsr223/ScriptExecutor.java   |   2 +
 9 files changed, 252 insertions(+), 107 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3225fbc5/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3225fbc5/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------


[17/18] incubator-tinkerpop git commit: Merge branch 'master' into TINKERPOP-1279

Posted by ok...@apache.org.
Merge branch 'master' into TINKERPOP-1279


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

Branch: refs/heads/TINKERPOP-1279
Commit: 6f3026a26206d16ee73a7d5a7d009457b5ee02c6
Parents: 444778b a117232
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue May 3 08:19:38 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue May 3 08:19:38 2016 -0600

----------------------------------------------------------------------
 .dockerignore                                   |   1 -
 CHANGELOG.asciidoc                              |   6 +
 docker/scripts/build.sh                         |   2 +-
 .../src/reference/gremlin-applications.asciidoc |  66 ++++++--
 .../the-gremlin-console/index.asciidoc          |  11 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   |  41 +++++
 gremlin-console/pom.xml                         |   5 +
 gremlin-console/src/main/bin/gremlin.bat        |  41 +----
 gremlin-console/src/main/bin/gremlin.sh         |  19 +--
 .../tinkerpop/gremlin/console/Console.groovy    | 168 +++++++++++++++----
 .../gremlin/groovy/jsr223/ScriptExecutor.java   |   2 +
 11 files changed, 253 insertions(+), 109 deletions(-)
----------------------------------------------------------------------



[06/18] incubator-tinkerpop git commit: Use -i as this is now the preferred way of starting interactive mode

Posted by ok...@apache.org.
Use -i as this is now the preferred way of starting interactive mode


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

Branch: refs/heads/TINKERPOP-1279
Commit: 620f4787b3b6da01679e2f6b80aa3b1a9693f33a
Parents: 05be605
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 28 14:59:37 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 28 14:59:37 2016 -0400

----------------------------------------------------------------------
 docs/src/tutorials/the-gremlin-console/index.asciidoc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/620f4787/docs/src/tutorials/the-gremlin-console/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/the-gremlin-console/index.asciidoc b/docs/src/tutorials/the-gremlin-console/index.asciidoc
index db6d04e..8a90056 100644
--- a/docs/src/tutorials/the-gremlin-console/index.asciidoc
+++ b/docs/src/tutorials/the-gremlin-console/index.asciidoc
@@ -616,11 +616,12 @@ Display stack trace? [yN] n
 ----
 
 TIP: If you find that you always work with a particular library, consider starting the console with an initialization
-script that prepares your environment for you. An "initialization script" is just a Groovy script that contains the
-initial commands to execute when the console starts.  Following the use case, it would be nice if the initialization
-script contained the `import` statement for the driver and possibly the code to get the `Session` object ready for use.
-Start the Gremlin Console with that script by just adding it as an argument on the command line:
-`bin/gremlin.sh init.groovy`.
+script that prepares your environment for you and start Gremlin Console in
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#interactive-mode[interactive mode]. An "initialization script"
+is just a Groovy script that contains the initial commands to execute when the console starts.  Following the use case,
+it would be nice if the initialization script contained the `import` statement for the driver and possibly the code to
+get the `Session` object ready for use. Start the Gremlin Console with that script by just adding it as an argument on
+the command line: `bin/gremlin.sh -i init.groovy`.
 
 This use case focused on using a Cassandra related library, but it should be evident that it would be equally
 straightforward to perform this same data dump to link:https://hbase.apache.org/[HBase],


[13/18] incubator-tinkerpop git commit: Merge branch 'tp31'

Posted by ok...@apache.org.
Merge branch 'tp31'


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

Branch: refs/heads/TINKERPOP-1279
Commit: 899650bb52864bae7d837460446ab6e12ea63f63
Parents: 64b09df 383a7a2
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 12:22:17 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 12:22:17 2016 +0200

----------------------------------------------------------------------
 .dockerignore | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------



[14/18] incubator-tinkerpop git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop

Posted by ok...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-tinkerpop


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

Branch: refs/heads/TINKERPOP-1279
Commit: 08d54c6b0a0567689d331dd1fa2507ff310efe5f
Parents: 899650b 3225fbc
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue May 3 12:22:36 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue May 3 12:22:36 2016 +0200

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   6 +
 .../src/reference/gremlin-applications.asciidoc |  66 ++++++--
 .../the-gremlin-console/index.asciidoc          |  11 +-
 .../upgrade/release-3.2.x-incubating.asciidoc   |  41 +++++
 gremlin-console/pom.xml                         |   5 +
 gremlin-console/src/main/bin/gremlin.bat        |  41 +----
 gremlin-console/src/main/bin/gremlin.sh         |  19 +--
 .../tinkerpop/gremlin/console/Console.groovy    | 168 +++++++++++++++----
 .../gremlin/groovy/jsr223/ScriptExecutor.java   |   2 +
 9 files changed, 252 insertions(+), 107 deletions(-)
----------------------------------------------------------------------