You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2016/12/02 17:36:50 UTC

[2/3] tinkerpop git commit: Updated grapeConfig.xml for both - Docker's build script and the docs. Also fixed some issues in the plugin installation script.

Updated grapeConfig.xml for both - Docker's build script and the docs.
Also fixed some issues in the plugin installation script.


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

Branch: refs/heads/master
Commit: dfe0be596a8455c6caaceb01adf13a87720a5a9f
Parents: d4cf1f2
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Nov 28 19:22:05 2016 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Nov 30 01:24:31 2016 +0100

----------------------------------------------------------------------
 docker/resources/groovy/grapeConfig.xml         | 15 ++++++--
 docker/scripts/build.sh                         | 12 ++++--
 docs/preprocessor/install-plugins.sh            |  6 ++-
 .../src/reference/gremlin-applications.asciidoc | 40 ++++++++++++++------
 4 files changed, 52 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dfe0be59/docker/resources/groovy/grapeConfig.xml
----------------------------------------------------------------------
diff --git a/docker/resources/groovy/grapeConfig.xml b/docker/resources/groovy/grapeConfig.xml
index 1cdfeb4..fca3ba2 100644
--- a/docker/resources/groovy/grapeConfig.xml
+++ b/docker/resources/groovy/grapeConfig.xml
@@ -1,15 +1,22 @@
 <ivysettings>
   <settings defaultResolver="downloadGrapes"/>
+  <property name="m2-pattern" value="${user.home}/.m2/repository/org/apache/tinkerpop/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" />
+  <property name="m2-pattern-ivy" value="${user.home}/.m2/repository/org/apache/tinkerpop/[module]/[revision]/[module]-[revision](-[classifier]).pom" />
+  <caches>
+    <cache name="nocache" useOrigin="true" />
+  </caches>
   <resolvers>
     <chain name="downloadGrapes">
+      <filesystem name="local-maven2" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true" cache="nocache">
+        <artifact pattern="${m2-pattern}"/>
+        <ivy pattern="${m2-pattern-ivy}"/>
+      </filesystem>
       <filesystem name="cachedGrapes">
         <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
         <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
       </filesystem>
-      <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
-      <ibiblio name="central" root="http://central.maven.org/maven2/" m2compatible="true"/>
-      <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
-      <ibiblio name="hyracs-releases" root="http://obelix.ics.uci.edu/nexus/content/groups/hyracks-public-releases/" m2compatible="true"/>
+      <ibiblio name="ibiblio" m2compatible="true"/>
+      <ibiblio name="jitpack" root="https://jitpack.io" m2compatible="true"/>
       <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
     </chain>
   </resolvers>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dfe0be59/docker/scripts/build.sh
----------------------------------------------------------------------
diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh
index 14e83c2..980b1db 100755
--- a/docker/scripts/build.sh
+++ b/docker/scripts/build.sh
@@ -57,10 +57,14 @@ TINKERPOP_BUILD_OPTIONS=""
 [ -z "${BUILD_JAVA_DOCS}" ] && TINKERPOP_BUILD_OPTIONS="${TINKERPOP_BUILD_OPTIONS} -Dmaven.javadoc.skip=true"
 
 # If the tmpfs (in-memory filesystem exists, use it)
-if [ -d "/usr/src/tinkermem" ]; then
-  echo Copying source to in-memory tmpfs
-  rsync -a . /usr/src/tinkermem
-  cd /usr/src/tinkermem
+TINKERMEM_PATH=$(cd .. ; echo `pwd`/tinkermem)
+if [ -d "${TINKERMEM_PATH}" ]; then
+  echo "Moving source to in-memory tmpfs"
+  rsync --remove-source-files -a . ${TINKERMEM_PATH}
+  cd ..
+  rm -rf ${OLDPWD}
+  ln -s ${TINKERMEM_PATH} ${OLDPWD}
+  cd ${TINKERMEM_PATH}
 fi
 
 touch gremlin-python/.glv

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dfe0be59/docs/preprocessor/install-plugins.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/install-plugins.sh b/docs/preprocessor/install-plugins.sh
index d37489e..990dbe4 100755
--- a/docs/preprocessor/install-plugins.sh
+++ b/docs/preprocessor/install-plugins.sh
@@ -59,7 +59,11 @@ echo "System.exit(0)" >> ${INSTALL_FILE}
 echo -ne " * tinkerpop-sugar ... "
 
 pushd ${CONSOLE_HOME} > /dev/null
-bin/gremlin.sh ${INSTALL_FILE} > /dev/null
+
+mkdir -p ~/.java/.userPrefs
+chmod 700 ~/.java/.userPrefs
+
+bin/gremlin.sh -e ${INSTALL_FILE} > /dev/null
 
 if [ ${PIPESTATUS[0]} -ne 0 ]; then
   popd > /dev/null

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/dfe0be59/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 7d14e46..9525fa0 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -31,12 +31,12 @@ Console and Server, where a universal plugin system makes it possible to extend
 important aspects of the plugin system is the ability to help the user install the plugins through the command line
 thus automating the process of gathering dependencies and other error prone activities.
 
-The process of plugin installation is handled by link:http://groovy.codehaus.org/Grape[Grape], which helps resolve
+The process of plugin installation is handled by link:http://www.groovy-lang.org/Grape[Grape], which helps resolve
 dependencies into the classpath.  It is therefore important to ensure that Grape is properly configured in order to
 use the automated capabilities of plugin installation.  Grape is configured by `~/.groovy/grapeConfig.xml` and
 generally speaking, if that file is not present, the default settings will suffice.  However, they will not suffice
 if a required dependency is not in one of the default configured repositories. Please see the
-link:http://groovy.codehaus.org/Grape[Custom Ivy Settings] section of the Grape documentation for more details on
+link:http://www.groovy-lang.org/Grape#Grape-CustomizeIvysettings[Customize Ivy settings] section of the Grape documentation for more details on
 the defaults.  TinkerPop recommends the following configuration in that file:
 
 [source,xml]
@@ -48,29 +48,45 @@ the defaults.  TinkerPop recommends the following configuration in that file:
         <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
         <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
       </filesystem>
-      <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
-      <ibiblio name="central" root="http://central.maven.org/maven2/" m2compatible="true"/>
+      <ibiblio name="ibiblio" m2compatible="true"/>
       <ibiblio name="jitpack" root="https://jitpack.io" m2compatible="true"/>
-      <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
     </chain>
   </resolvers>
 </ivysettings>
 
-The Graph configuration can also be modified to include the local system's Maven `.m2` directory by one or both
-of the following entries:
+The Graph configuration can also be modified to include the local system's Maven `.m2` directory:
 
 [source,xml]
-<ibiblio name="apache-snapshots" root="http://repository.apache.org/snapshots/" m2compatible="true"/>
-<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
+<ivysettings>
+  <settings defaultResolver="downloadGrapes"/>
+  <property name="m2-pattern" value="${user.home}/.m2/repository/org/apache/tinkerpop/[module]/[revision]/[module]-[revision](-[classifier]).[ext]" />
+  <property name="m2-pattern-ivy" value="${user.home}/.m2/repository/org/apache/tinkerpop/[module]/[revision]/[module]-[revision](-[classifier]).pom" />
+  <caches>
+    <cache name="nocache" useOrigin="true" />
+  </caches>
+  <resolvers>
+    <chain name="downloadGrapes">
+      <!-- https://mvmn.wordpress.com/2016/02/02/grape-config-for-local-maven-repo/ -->
+      <filesystem name="local-maven2" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true" cache="nocache">
+        <artifact pattern="${m2-pattern}"/>
+        <ivy pattern="${m2-pattern-ivy}"/>
+      </filesystem>
+      <filesystem name="cachedGrapes">
+        <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
+        <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
+      </filesystem>
+      <ibiblio name="ibiblio" m2compatible="true"/>
+      <ibiblio name="jitpack" root="https://jitpack.io" m2compatible="true"/>
+      <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
+    </chain>
+  </resolvers>
+</ivysettings>
 
 These configurations are useful during development (i.e. if one is working with locally built artifacts) of TinkerPop
 Plugins.  It is important to take note of the order used for these references as Grape will check them in the order
 they are specified and depending on that order, an artifact other than the one expected may be used which is typically
 an issue when working with SNAPSHOT dependencies.
 
-WARNING: If building TinkerPop from source, be sure to clear TinkerPop-related jars from the `~/.groovy/grapes`
-directory as they can become stale on some systems and not re-import properly from the local `.m2` after fresh rebuilds.
-
 [[gremlin-console]]
 Gremlin Console
 ---------------