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

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

commit 698fa8a92111ef4ac7f0238840c7f0660f79fffb
Author: Stephen Mallette <[email protected]>
AuthorDate: Tue Jun 1 14:51:11 2021 -0400

    TINKERPOP-2551 Configure gremlint build into maven
    
    Should allow the deploy to npm by way of that maven plugin. Adjusted the 
Rat plugin exclusions a bit. Fixed NOTICE copyright years.
---
 gremlin-dotnet/NOTICE                              |   2 +-
 .../src/main/javascript/gremlin-javascript/NOTICE  |   2 +-
 gremlin-python/src/main/python/NOTICE              |   2 +-
 gremlint/.gitignore                                |  25 +--
 gremlint/NOTICE                                    |   5 +
 gremlint/README.md                                 |  32 +--
 gremlint/package.json                              |   9 +-
 gremlint/pom.xml                                   | 214 +++++++++++++++++++++
 pom.xml                                            |  26 ++-
 9 files changed, 250 insertions(+), 67 deletions(-)

diff --git a/gremlin-dotnet/NOTICE b/gremlin-dotnet/NOTICE
index e1bf73f..71f0464 100644
--- a/gremlin-dotnet/NOTICE
+++ b/gremlin-dotnet/NOTICE
@@ -1,5 +1,5 @@
 Apache TinkerPop
-Copyright 2015-2019 The Apache Software Foundation.
+Copyright 2015-2021 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/NOTICE 
b/gremlin-javascript/src/main/javascript/gremlin-javascript/NOTICE
index e1bf73f..71f0464 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/NOTICE
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/NOTICE
@@ -1,5 +1,5 @@
 Apache TinkerPop
-Copyright 2015-2019 The Apache Software Foundation.
+Copyright 2015-2021 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/gremlin-python/src/main/python/NOTICE 
b/gremlin-python/src/main/python/NOTICE
index e1bf73f..71f0464 100644
--- a/gremlin-python/src/main/python/NOTICE
+++ b/gremlin-python/src/main/python/NOTICE
@@ -1,5 +1,5 @@
 Apache TinkerPop
-Copyright 2015-2019 The Apache Software Foundation.
+Copyright 2015-2021 The Apache Software Foundation.
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/gremlint/.gitignore b/gremlint/.gitignore
index b476937..27694ba 100644
--- a/gremlint/.gitignore
+++ b/gremlint/.gitignore
@@ -1,19 +1,6 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#  http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-node_modules
-/lib
\ No newline at end of file
+node_modules/
+.idea/
+npm-debug.log
+# maven plugin com.github.eirslett frontend-maven-plugin installs node.js 
runtime in "node" folder
+node/
+lib/
\ No newline at end of file
diff --git a/gremlint/NOTICE b/gremlint/NOTICE
new file mode 100644
index 0000000..71f0464
--- /dev/null
+++ b/gremlint/NOTICE
@@ -0,0 +1,5 @@
+Apache TinkerPop
+Copyright 2015-2021 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
diff --git a/gremlint/README.md b/gremlint/README.md
index 005c3eb..c9773ee 100644
--- a/gremlint/README.md
+++ b/gremlint/README.md
@@ -21,7 +21,7 @@
 
 ### What is Gremlint?
 
-Gremlint is a code formatter which parses Gremlin queries and rewrites them to 
adhere to certain styling rules. It does so by parsing the query to an abstract 
syntax tree, and reprinting it from scratch.
+Gremlint is a code formatter, from [Apache TinkerPop™][tk] which parses 
Gremlin queries and rewrites them to adhere to certain styling rules. It does 
so by parsing the query to an abstract syntax tree, and reprinting it from 
scratch.
 
 ### But why?
 
@@ -31,10 +31,8 @@ Gremlint is a code formatter which parses Gremlin queries 
and rewrites them to a
 
 ### Install Gremlint as a JavaScript / TypeScript package
 
-Since Gremlint is not yet "published", it has to be installed from its GitHub 
repo:
-
 ```bash
-npm install OyvindSabo/gremlint#master
+npm install gremlint
 ```
 
 ### Basic example
@@ -114,28 +112,4 @@ console.log(formattedQuery);
 https://gremlint.com is a website which utilizes the Gremlint library to give 
users an online "living" style guide for Gremlin queries. It also serves as a 
platform for showcasing the features of Gremlint. Its source code is available 
[here](https://github.com/apache/tinkerpop/tree/master/docs/site/home/gremlint).
 ![Gremlint V2 
Screenshot](https://user-images.githubusercontent.com/25663729/88488518-f078ac00-cf8d-11ea-9e1c-01edec285751.png)
 
-### For contributors
-
-**Install dependencies**
-
-`npm install`
-
-**Lint source files**
-
-`npm run lint`
-
-**Format source files**
-
-`npm run format`
-
-**Run tests**
-
-`npm test`
-
-**Compile the TypeScript source code**
-
-`npm run build`
-
-**Bump version**
-
-`npm version [major | minor | patch]`
+[tk]: https://tinkerpop.apache.org
\ No newline at end of file
diff --git a/gremlint/package.json b/gremlint/package.json
index 9ff8f63..d170a9e 100644
--- a/gremlint/package.json
+++ b/gremlint/package.json
@@ -1,6 +1,6 @@
 {
   "name": "gremlint",
-  "version": "1.0.0",
+  "version": "3.5.1-alpha1",
   "description": "Linter/code formatter for Gremlin",
   "main": "lib/index.js",
   "types": "lib/index.d.ts",
@@ -23,6 +23,8 @@
     "code",
     "formatter",
     "graph",
+    "graphdb",
+    "tinkerpop",
     "gremlin",
     "query"
   ],
@@ -44,5 +46,8 @@
   "files": [
     "lib/**/*"
   ],
-  "dependencies": {}
+  "dependencies": {},
+  "engines": {
+    "node": ">=10"
+  }
 }
diff --git a/gremlint/pom.xml b/gremlint/pom.xml
new file mode 100644
index 0000000..de2d067
--- /dev/null
+++ b/gremlint/pom.xml
@@ -0,0 +1,214 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tinkerpop</groupId>
+        <artifactId>tinkerpop</artifactId>
+        <version>3.5.1-SNAPSHOT</version>
+    </parent>
+    <artifactId>gremlint</artifactId>
+    <name>Apache TinkerPop :: Gremlin Javascript</name>
+    <properties>
+        <maven.test.skip>false</maven.test.skip>
+        <skipTests>${maven.test.skip}</skipTests>
+        <npm.version>6.14.6</npm.version>
+        <node.version>v10.22.0</node.version>
+    </properties>
+    <build>
+        <directory>${basedir}/target</directory>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>com.github.eirslett</groupId>
+                    <artifactId>frontend-maven-plugin</artifactId>
+                    <version>1.10.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <!--
+                Use gmavenplus-plugin to:
+                    - Generate js sources
+                    - Start and stop gremlin server for integration tests
+                -->
+                <groupId>org.codehaus.gmavenplus</groupId>
+                <artifactId>gmavenplus-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-all</artifactId>
+                        <version>${groovy.version}</version>
+                        <type>pom</type>
+                        <scope>runtime</scope>
+                    </dependency>
+                </dependencies>
+                <executions>
+                    <execution>
+                        <id>update-version</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <scripts>
+                                <script>
+                                    def mavenVersion = "${project.version}"
+                                    def versionForJs = 
mavenVersion.replace("-SNAPSHOT", "-alpha1")
+                                    def file = new 
File("${project.basedir}/package.json")
+                                    
file.write(file.getText("UTF-8").replaceFirst(/"version": "(.*)",/, 
"\"version\": \"" + versionForJs + "\","))
+                                </script>
+                            </scripts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-clean-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>clean</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>com.github.eirslett</groupId>
+                <artifactId>frontend-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>install node and npm</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>install-node-and-npm</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>npm install</id>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <arguments>install</arguments>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>npm test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>npm</goal>
+                        </goals>
+                        <configuration>
+                            <skip>${skipTests}</skip>
+                            <arguments>test --exit</arguments>
+                            <failOnError>true</failOnError>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <nodeVersion>${node.version}</nodeVersion>
+                    <npmVersion>${npm.version}</npmVersion>
+                </configuration>
+            </plugin>
+            <!--
+            there is no point to building/deploying the jvm stuff - there is 
no java source really - just poms
+            -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <configuration>
+                    <skipSource>true</skipSource>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-install-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <!--
+        Provides a way to deploy the gremlin-javascript GLV to npm. This 
cannot be part of the standard maven execution
+        because npm 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>javascript-deploy</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>npm</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.github.eirslett</groupId>
+                        <artifactId>frontend-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>npm publish</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <configuration>
+                                    <arguments>publish</arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <!--
+                            skip needs to be overridden given how the 
<configuration> is specified in the main build.
+                            it should be fine to just always deploy because 
this <profile> needs to be manually
+                            activated and that should be good enough given our 
deployment process.
+                            -->
+                            <skip>false</skip>
+                            <nodeVersion>${node.version}</nodeVersion>
+                            <npmVersion>${npm.version}</npmVersion>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/pom.xml b/pom.xml
index 99f4a55..2e0221c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -140,6 +140,7 @@ limitations under the License.
         <module>gremlin-server</module>
         <module>gremlin-archetype</module>
         <module>gremlin-tools</module>
+        <module>gremlint</module>
     </modules>
     <scm>
         <connection>scm:git:[email protected]:apache/tinkerpop.git</connection>
@@ -380,9 +381,14 @@ limitations under the License.
                         <exclude>**/.settings/**</exclude>
                         <exclude>**/.idea/**</exclude>
                         <exclude>.repository/**</exclude>
-                        <exclude>docs/static/**</exclude>
                         <exclude>**/target/**</exclude>
                         <exclude>data/*.txt</exclude>
+                        <exclude>bin/gremlin.sh</exclude>
+                        <exclude>docs/static/**</exclude>
+                        <exclude>docs/site/home/css/**</exclude>
+                        <exclude>docs/site/home/js/**</exclude>
+                        <exclude>docs/gremlint/build/**</exclude>
+                        <exclude>docs/gremlint/public/CNAME</exclude>
                         <exclude>**/*.kryo</exclude>
                         <exclude>**/*.gbin</exclude>
                         <exclude>**/*.iml</exclude>
@@ -403,14 +409,6 @@ limitations under the License.
                         <exclude>**/_bsp/**</exclude>
                         <exclude>DEPENDENCIES</exclude>
                         <exclude>**/.glv</exclude>
-                        <exclude>bin/gremlin.sh</exclude>
-                        <exclude>gremlin-console/bin/gremlin.sh</exclude>
-                        <exclude>docs/site/home/css/**</exclude>
-                        <exclude>docs/site/home/js/**</exclude>
-                        <exclude>docs/gremlint/build/**</exclude>
-                        <exclude>docs/gremlint/node_modules/**</exclude>
-                        <exclude>docs/gremlint/public/CNAME</exclude>
-                        <exclude>docs/gremlint/.prettierrc</exclude>
                         <exclude>**/Debug/**</exclude>
                         <exclude>**/Release/**</exclude>
                         <exclude>**/obj/**</exclude>
@@ -421,17 +419,17 @@ limitations under the License.
                         <exclude>**/NuGet.Config</exclude>
                         <exclude>**/*.nuspec</exclude>
                         <exclude>**/BenchmarkDotNet.Artifacts/**</exclude>
-                        
<exclude>**/gremlin-javascript/node_modules/**</exclude>
-                        <exclude>**/gremlin-javascript/doc/**</exclude>
                         <exclude>**/node/**</exclude>
+                        <exclude>**/node_modules/**</exclude>
                         <exclude>**/npm-debug.log</exclude>
+                        <!-- javascript docs/lib -->
+                        <exclude>**/doc/**</exclude>
+                        <exclude>**/lib/**</exclude>
+                        <exclude>**/.prettierrc</exclude>
                         <exclude>**/_site/**</exclude>
                         <exclude>**/.pytest_cache/**</exclude>
                         <exclude>**/venv/**</exclude>
                         <exclude>**/docfx/**</exclude>
-                        <exclude>**/gremlint/lib/**</exclude>
-                        <exclude>**/gremlint/node_modules/**</exclude>
-                        <exclude>**/gremlint/.prettierrc</exclude>
                     </excludes>
                     <licenses>
                         <license 
implementation="org.apache.rat.analysis.license.ApacheSoftwareLicense20"/>

Reply via email to