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 2017/07/18 13:09:27 UTC

[35/43] tinkerpop git commit: TINKERPOP-1552 Added basic deployment options for nuget

TINKERPOP-1552 Added basic deployment options for nuget

Can't use the dotnet maven plugin on linux. it makes direct calls to nuget, which on linux requires mono. Used antrun plugin instead which is what was used with gremlin-python and works fine. Accomplished a basic push to the nuget staging environment. Still some bumps to sort out before this is good.


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

Branch: refs/heads/tp32
Commit: 703e6f2461f176319227e2244c4cd9be2155bafe
Parents: 2274482
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Jun 23 15:43:40 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jun 28 15:13:12 2017 -0400

----------------------------------------------------------------------
 .../developer/development-environment.asciidoc  |  6 +-
 docs/src/dev/developer/release.asciidoc         |  1 +
 gremlin-dotnet/pom.xml                          | 10 +++
 .../src/Gremlin.Net/Gremlin.Net.csproj          | 25 ++++--
 gremlin-dotnet/src/pom.xml                      | 86 +++++++++++++++++++-
 gremlin-dotnet/test/pom.xml                     | 10 +++
 6 files changed, 130 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/docs/src/dev/developer/development-environment.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc
index ddba0a0..f56bcae 100644
--- a/docs/src/dev/developer/development-environment.asciidoc
+++ b/docs/src/dev/developer/development-environment.asciidoc
@@ -117,7 +117,11 @@ mvn clean install -Pgremlin-dotnet
 which enables the "gremlin-dotnet" Maven profile or in a more automated fashion simply add a `.glv` file to the `src`
 and `test` directories of the `gremlin-dotnet` module  which will signify to Maven that the environment is .NET-ready.
 The `.glv` file need not have any contents and is ignored by Git. A standard `mvn clean install` will then build
-`gremlin-dotnet` in full. 
+`gremlin-dotnet` in full.
+
+For those who will release TinkerPop, it is also necessary to install link:http://www.mono-project.com/[Mono]. The
+release process is known to work with 5.0.1, so it is best to probably install that version if possible. See release
+documentation for more information on configuration for release.
 
 [[release-environment]]
 Release Environment

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/docs/src/dev/developer/release.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/dev/developer/release.asciidoc b/docs/src/dev/developer/release.asciidoc
index 121bbb6..48e1132 100644
--- a/docs/src/dev/developer/release.asciidoc
+++ b/docs/src/dev/developer/release.asciidoc
@@ -220,6 +220,7 @@ Release & Promote
 .. This build will likely occur from the tag for the release, so be sure to checkout the tag first before executing this step.
 .. `mvn clean install -DskipTests`
 .. `mvn deploy -pl gremlin-python -DskipTests -Dpypi`
+.. `mvn deploy -pl :gremlin-dotnet-source -DskipTests -Dnuget`
 . `svn co --depth empty https://dist.apache.org/repos/dist/dev/tinkerpop dev; svn up dev/xx.yy.zz`
 . `svn co --depth empty https://dist.apache.org/repos/dist/release/tinkerpop release; mkdir release/xx.yy.zz`
 . Copy release files from `dev/xx.yy.zz` to `release/xx.yy.zz`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/gremlin-dotnet/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/pom.xml b/gremlin-dotnet/pom.xml
index 3360bbc..6cd7da3 100644
--- a/gremlin-dotnet/pom.xml
+++ b/gremlin-dotnet/pom.xml
@@ -267,6 +267,16 @@ namingConversionsFile.newWriter().withWriter{ it << namingConversionsTemplate }
                     </execution>
                 </executions>
             </plugin>
+            <!--
+            there is no point to deploying the jvm stuff - there is no java source really - just poms
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
index 0ff4537..7ac6f8d 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
+++ b/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj
@@ -8,16 +8,29 @@
 
   <PropertyGroup Label="Package">
     <Version>3.2.6-beta1</Version>
-    <Title>Gremlin-DotNet</Title>
+    <Title>Gremlin.Net</Title>
     <Authors>Apache TinkerPop</Authors>
     <Description>
-      Apache TinkerPop’s Gremlin-DotNet implements Gremlin within the C# language.
-
-Gremlin-DotNet is an extended version of the Gremlin.Net driver (versions &lt;= 0.X). It includes an implementation of Gremlin in C#. This extended version is now part of the Apache TinkerPop project.
-The 'old' Gremlin.Net driver is however still supported. Head to https://github.com/FlorianHockmann/Gremlin.Net for more information.
+      Gremlin.Net for Apache TinkerPop™ is a language variant and driver for .NET.
     </Description>
+    <Summary>
+      Apache TinkerPop™ is a graph computing framework for both graph databases (OLTP) and graph analytic systems (OLAP).
+      Gremlin is the graph traversal language of TinkerPop. It can be described as a functional, data-flow language
+      that enables users to succinctly express complex traversals on (or queries of) their application’s property graph.
+
+      Gremlin.Net implements Gremlin within .NET. C# syntax has the same constructs as Java including “dot notation”
+      for function chaining (a.b.c), round bracket function arguments (a(b,c))`, and support for global namespaces
+      (a(b()) vs a(__.b()))`. As such, anyone familiar with Gremlin-Java will immediately be able to work with
+      Gremlin-DotNet. Moreover, there are a few added constructs to Gremlin-DotNet that make traversals a bit more succinct.
+
+      Please see the reference documentation at Apache TinkerPop for more information on usage.
+
+      NOTE: Gremlin.Net is an extension of the Gremlin.Net driver by Florian Hockmann (versions &lt;= 0.X) and is now
+      included as part of the Apache TinkerPop project. The 'old' Gremlin.Net driver is however still supported.
+      Head to https://github.com/FlorianHockmann/Gremlin.Net for more information.
+    </Summary>
     <PackageId>Gremlin.Net</PackageId>
-    <PackageTags>gremlin;tinkerpop;tinkerpop3</PackageTags>
+    <PackageTags>gremlin;tinkerpop;apache</PackageTags>
     <PackageProjectUrl>http://tinkerpop.apache.org</PackageProjectUrl>
     <PackageLicenseUrl>https://github.com/apache/tinkerpop/blob/master/LICENSE</PackageLicenseUrl>
     <RepositoryUrl>https://github.com/apache/tinkerpop</RepositoryUrl>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/gremlin-dotnet/src/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml
index 50d4d56..645921f 100644
--- a/gremlin-dotnet/src/pom.xml
+++ b/gremlin-dotnet/src/pom.xml
@@ -40,6 +40,16 @@ limitations under the License.
                     </execution>
                 </executions>
             </plugin>
+            <!--
+            there is no point to deploying the jvm stuff - there is no java source really - just poms
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
@@ -74,11 +84,85 @@ limitations under the License.
                         <artifactId>dotnet-maven-plugin</artifactId>
                         <extensions>true</extensions>
                         <configuration>
-                            <packOutput>${project.parent.basedir}/target/nuget</packOutput>
+                            <packEnabled>true</packEnabled>
+                            <nugetPushEnabled>false</nugetPushEnabled>
+                            <nugetAddEnabled>false</nugetAddEnabled>
                         </configuration>
                     </plugin>
                 </plugins>
             </build>
         </profile>
+        <!--
+        Provides a way to deploy the gremlin-dotnet GLV to nuget. This cannot be part of the standard maven execution
+        because nuget does not have a staging environment like sonatype for releases. As soon as the release is
+        published it is public. In our release workflow, deploy occurs prior to vote on the release and we can't
+        make this stuff public until the vote is over.
+        -->
+        <profile>
+            <id>glv-dotnet-deploy</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>nuget</name>
+                </property>
+            </activation>
+            <properties>
+                <packaging.type>dotnet-library</packaging.type>
+            </properties>
+            <build>
+                <plugins>
+                    <!--
+                      not seeing much point to making this OS agnostic really. as far as it is known, no one who does
+                      deployments will do so from a windows machine. this part of the build requires mono. note that
+                      the "correct" version of nuget is downloaded as part of the process.
+                     -->
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>deploy-nuget</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+                                        <if>
+                                            <available file="Gremlin.Net/bin/nuget.exe"/>
+                                            <then>
+                                                <echo>nuget.exe already downloaded and at Gremlin.Net/bin/nuget.exe.</echo>
+                                            </then>
+
+                                            <else>
+                                                <!--
+                                                specifically using 3.4.4 given some bug that seems to pin us to this
+                                                version - https://github.com/NuGet/Home/issues/4090 - it might work
+                                                with newer versions but definitely failed with 4.1.0
+                                                -->
+                                                <exec dir="Gremlin.Net/bin" executable="wget" failonerror="true">
+                                                    <arg line="https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe"/>
+                                                </exec>
+                                            </else>
+                                        </if>
+                                        <exec dir="Gremlin.Net/bin" executable="mono" failonerror="true">
+                                            <arg line="nuget.exe push Gremlin.Net.3.2.6-beta1.nupkg -Source https://staging.nuget.org/api/v2/package"/>
+                                        </exec>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                        <dependencies>
+                            <dependency>
+                                <groupId>ant-contrib</groupId>
+                                <artifactId>ant-contrib</artifactId>
+                                <version>20020829</version>
+                            </dependency>
+                        </dependencies>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/703e6f24/gremlin-dotnet/test/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml
index 2cf2785..7fa75fa 100644
--- a/gremlin-dotnet/test/pom.xml
+++ b/gremlin-dotnet/test/pom.xml
@@ -47,6 +47,16 @@ limitations under the License.
                     </execution>
                 </executions>
             </plugin>
+            <!--
+            there is no point to deploying the jvm stuff - there is no java source really - just poms
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
         </plugins>
     </build>