You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/01/30 13:10:37 UTC

[tinkerpop] 01/03: Minor doc fixes around grapeConfig.xml CTR

This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 1da83dabe4e2b4d8d0bc051b53717e27a256ca39
Author: stephen <sp...@gmail.com>
AuthorDate: Thu Jan 30 08:09:04 2020 -0500

    Minor doc fixes around grapeConfig.xml CTR
---
 .../dev/developer/development-environment.asciidoc | 57 ++++++++++++++++++++++
 docs/src/reference/gremlin-applications.asciidoc   | 44 ++++-------------
 2 files changed, 67 insertions(+), 34 deletions(-)

diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index a84caed..d8dbd9f 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -41,6 +41,63 @@ when submitting a pull request. Consider setting up the full environment.
 NOTE: For those using Windows, efforts have been made to keep the build OS independent, but, in practice, it is likely
 that TinkerPop's build system will only allow for a minimum build at best.
 
+[[groovy-environment]]
+=== Groovy Environment
+
+Groovy is not used in the standard build, but when generating documentation it does require the loading of a Gremlin
+Console instance. The Gremlin Console is Groovy-based and the documentation bootstrapping loads TinkerPop plugins
+which requires proper configuration of Graph/Ivy dependency loaders as described in the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-applications[Gremlin Applications Section] of the
+Reference Documentation.
+
+The base configuration described in that link may need to be modified if there is a desire to work with the Gremlin
+Console (for documentation generation or just general testing) in a way that utilizes SNAPSHOT releases in the
+Apache Snapshots Repository. In that case, the `grapeConfig.xml` will need to include a resolver for that repository
+and the basic Ivy configuration will look as follows:
+
+[source,xml]
+----
+<ivysettings>
+  <settings defaultResolver="downloadGrapes"/>
+  <resolvers>
+    <chain name="downloadGrapes" returnFirst="true">
+      <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](-[classifier]).[ext]"/>
+      </filesystem>
+      <ibiblio name="localm2" root="${user.home.url}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
+      <ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
+      <ibiblio name="ibiblio" m2compatible="true"/>
+      <ibiblio name="apache-snapshots" root="http://repository.apache.org/snapshots/" m2compatible="true"/>
+    </chain>
+  </resolvers>
+</ivysettings>
+----
+
+The above configuration is just a modification of the default. Perhaps the most lean common configuration might just
+be:
+
+[source,xml]
+----
+<ivysettings>
+  <settings defaultResolver="downloadGrapes"/>
+  <resolvers>
+    <chain name="downloadGrapes">
+      <ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
+      <ibiblio name="central" root="https://repo1.maven.org/maven2/" m2compatible="true"/>
+    </chain>
+  </resolvers>
+</ivysettings>
+----
+
+In the above case, the configuration largely relies on the standard Maven builds to create a well cached `.m2`
+directory. Under typical development circumstances, SNAPSHOT will find themselves deployed there locally and that
+is all that will be required for Grape to do its work.
+
+As a final word, 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.
+
 [[documentation-environment]]
 === Documentation Environment
 
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 2e9e12f..fa753a4 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -36,53 +36,29 @@ use the automated capabilities of plugin installation.  Grape is configured by `
 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://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]
-<ivysettings>
-  <settings defaultResolver="downloadGrapes"/>
-  <resolvers>
-    <chain name="downloadGrapes">
-      <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"/>
-    </chain>
-  </resolvers>
-</ivysettings>
-
-The Graph configuration can also be modified to include the local system's Maven `.m2` directory:
+the defaults. For current TinkerPop plugins and dependencies the following configuration which is also the default
+for Ivy should be acceptable:
 
 [source,xml]
+----
 <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>
+    <chain name="downloadGrapes" returnFirst="true">
       <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]"/>
+        <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]"/>
       </filesystem>
+      <ibiblio name="localm2" root="${user.home.url}/.m2/repository/" checkmodified="true" changingPattern=".*" changingMatcher="regexp" m2compatible="true"/>
+      <ibiblio name="jcenter" root="https://jcenter.bintray.com/" m2compatible="true"/>
       <ibiblio name="ibiblio" 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.
+TIP: Please see the link:http://tinkerpop.apache.org/docs/x.y.z/dev/developer/#groovy-environment[Developer Documentation]
+for additional configuration options when working with "snapshot" releases.
 
 [[gremlin-console]]
 == Gremlin Console